/*!
Srujana v2 — Homepage magazine layout
--------------------------------------------------------------
Loaded only on the front page (see functions.php). Builds the
hero + grid + sidebar layout on top of the existing theme /
Eenadu skin styles.
--------------------------------------------------------------*/

:root {
    --home-navy:   #14284f;
    --home-blue:   #1c4faa;
    --home-orange: #f3811e;
    --home-red:    #e13333;
    --home-border: #e4e8ee;
    --home-bg:     #f4f6f9;
    --home-ink:    #1b1f27;
    --home-muted:  #70798a;
}

.mt-home-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 26px;
}

.mt-home-main-col { flex: 1 1 auto; min-width: 0; width: 74%; }
.mt-home-sidebar-col { flex: 0 0 auto; width: 26%; }

/* -----------------------------------------------------------
   Shared: section tabs
----------------------------------------------------------- */
.mt-home-section-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 16px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--news-headline-font, Georgia, serif);
    margin-bottom: 14px;
}
.mt-home-tab-blue   { background-color: var(--home-blue); }
.mt-home-tab-navy   { background-color: var(--home-navy); }
.mt-home-tab-orange { background-color: var(--home-orange); }
.mt-home-tab-plain  { background: none; color: var(--home-ink); padding-left: 0; border-bottom: 2px solid var(--home-border); }
.mt-home-tab-plain small { color: var(--home-muted); font-weight: 500; font-size: 1.1rem; }
.mt-home-tab-icon::before { content: '📰'; margin-right: 6px; }
.mt-home-tab-viewall { color: #fff; text-decoration: none; font-size: 1.3rem; }

/* -----------------------------------------------------------
   Hero row: slider + latest news
----------------------------------------------------------- */
.mt-home-hero-row {
    display: flex;
    gap: 20px;
    margin-bottom: 26px;
}

.mt-home-hero-slider {
    position: relative;
    flex: 0 0 66%;
    width: 66%;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 16 / 9;
}
.mt-home-hero-slider-track { position: relative; width: 100%; height: 100%; }
.mt-home-slide {
    position: absolute;
    inset: 0;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease;
}
.mt-home-slide.is-active { opacity: 1; visibility: visible; }
.mt-home-slide-link { position: absolute; inset: 0; z-index: 2; }
.mt-home-slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 1;
    padding: 40px 20px 18px;
    background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
}
.mt-home-slide-caption .post-cats-list { position: static; margin-bottom: 6px; }
.mt-home-slide-caption .entry-title { margin: 0; }
.mt-home-slide-caption .entry-title a {
    color: #fff;
    font-size: 2rem;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.mt-home-slide-nav {
    position: absolute;
    top: 40%;
    z-index: 3;
    width: 34px; height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 1.8rem;
    line-height: 34px;
    cursor: pointer;
}
.mt-home-slide-nav.prev { left: 10px; }
.mt-home-slide-nav.next { right: 10px; }
.mt-home-slide-nav:hover { background: var(--home-red); }
.mt-home-slide-counter {
    position: absolute;
    top: 12px; right: 14px;
    z-index: 3;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 3px;
}
.mt-home-slide-dots {
    position: absolute;
    bottom: 10px; left: 0; right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.mt-home-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
}
.mt-home-dot.is-active { background: var(--home-red); }

.mt-home-latest-news {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--home-border);
    padding: 0 0 8px;
}
.mt-home-latest-news .mt-home-section-tab { margin-bottom: 8px; }
.mt-home-latest-list { list-style: none; margin: 0; padding: 0 14px; }
.mt-home-latest-list li {
    position: relative;
    padding: 8px 0 8px 16px;
    border-bottom: 1px solid var(--home-border);
    font-size: 1.3rem;
    line-height: 1.4;
}
.mt-home-latest-list li:last-child { border-bottom: none; }
.mt-home-latest-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 15px;
    width: 7px; height: 7px;
    background: var(--home-red);
}
.mt-home-latest-list li a { color: var(--home-ink); }
.mt-home-latest-list li a:hover { color: var(--home-blue); }

/* -----------------------------------------------------------
   6-post grid
----------------------------------------------------------- */
.mt-home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.mt-home-grid-card {
    display: flex;
    gap: 14px;
    border: 1px solid var(--home-border);
    padding: 10px;
}
.mt-home-grid-thumb {
    flex: 0 0 130px;
    width: 130px;
    height: 90px;
    overflow: hidden;
    display: block;
}
.mt-home-grid-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mt-home-grid-body { flex: 1 1 auto; min-width: 0; }
.mt-home-grid-body .post-cats-list { position: static; margin-bottom: 4px; }
.mt-home-grid-body .entry-title { margin: 0; font-size: 1.4rem; line-height: 1.4; }

/* -----------------------------------------------------------
   Video gallery
----------------------------------------------------------- */
.mt-home-block { margin-bottom: 30px; }
.mt-home-video-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.mt-home-video-card { display: block; color: var(--home-ink); }
.mt-home-video-thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111;
}
.mt-home-video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mt-home-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.6rem;
    background: rgba(0,0,0,.15);
}
.mt-home-video-title {
    display: block;
    margin-top: 8px;
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--home-ink);
}
.mt-home-video-card:hover .mt-home-video-title { color: var(--home-blue); }

/* -----------------------------------------------------------
   Web stories + photo gallery row
----------------------------------------------------------- */
.mt-home-stories-photos-row {
    display: flex;
    gap: 24px;
}
.mt-home-web-stories { flex: 0 0 58%; width: 58%; }
.mt-home-photo-gallery { flex: 1 1 auto; }

.mt-home-stories-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.mt-home-story-card {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.6;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
}
.mt-home-story-card img { width: 100%; height: 100%; object-fit: cover; }
.mt-home-story-title {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 10px 8px;
    background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0));
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.3;
}

.mt-home-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.mt-home-photo-card {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.mt-home-photo-card img { width: 100%; height: 100%; object-fit: cover; }
.mt-home-photo-icon {
    position: absolute;
    right: 6px; bottom: 6px;
    color: #fff;
    font-size: 1.3rem;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* -----------------------------------------------------------
   Cinema / Business / Sports strip
----------------------------------------------------------- */
.mt-home-catstrip-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.mt-home-catstrip-feature { display: block; margin-bottom: 10px; }
.mt-home-catstrip-feature img { width: 100%; height: auto; display: block; margin-bottom: 8px; }
.mt-home-catstrip-feature .entry-title {
    display: block;
    font-size: 1.4rem;
    line-height: 1.4;
    color: var(--home-ink);
}
.mt-home-catstrip-link {
    display: block;
    padding: 7px 0;
    border-bottom: 1px solid var(--home-border);
    font-size: 1.25rem;
    color: var(--home-ink);
}
.mt-home-catstrip-link:hover { color: var(--home-blue); }

/* -----------------------------------------------------------
   Sidebar widgets (District News / Lifestyle / Sunday Magazine / Most Read)
----------------------------------------------------------- */
.mt-home-sidebar-widget { margin-bottom: 26px; border: 1px solid var(--home-border); padding-bottom: 10px; }
.mt-home-sidebar-widget .mt-home-section-tab { margin-bottom: 10px; }

.mt-home-district-tabs { display: flex; border-bottom: 1px solid var(--home-border); margin-bottom: 4px; }
.mt-home-district-tab-btn {
    flex: 1 1 50%;
    background: var(--home-bg);
    border: none;
    padding: 9px 4px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--home-muted);
    cursor: pointer;
}
.mt-home-district-tab-btn.is-active { background: #fff; color: var(--home-blue); box-shadow: inset 0 -2px 0 var(--home-blue); }
.mt-home-district-panel { display: none; padding: 0 12px; }
.mt-home-district-panel.is-active { display: block; }

.mt-home-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--home-border);
    color: var(--home-ink);
}
.mt-home-lifestyle .mt-home-list-item,
.mt-home-most-read .mt-home-list-item { padding: 9px 12px; }
.mt-home-list-item:last-child { border-bottom: none; }
.mt-home-list-thumb {
    flex: 0 0 52px;
    width: 52px; height: 52px;
    overflow: hidden;
    display: block;
    background: var(--home-bg);
}
.mt-home-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mt-home-list-title { flex: 1 1 auto; font-size: 1.25rem; line-height: 1.4; }
.mt-home-list-item:hover .mt-home-list-title { color: var(--home-blue); }

.mt-home-sundaymag-feature { display: block; padding: 0 12px 10px; }
.mt-home-sundaymag-feature img { width: 100%; height: auto; display: block; margin-bottom: 8px; }
.mt-home-sundaymag-feature .entry-title { display: block; font-size: 1.35rem; line-height: 1.4; color: var(--home-ink); }

.mt-home-mostread-list { list-style: none; margin: 0; padding: 0 12px; counter-reset: mt-home-rank; }
.mt-home-mostread-list li { counter-increment: mt-home-rank; position: relative; }
.mt-home-mostread-list li .mt-home-list-item { padding-left: 30px; }
.mt-home-mostread-list li::before {
    content: counter(mt-home-rank);
    position: absolute;
    left: 0; top: 15px;
    width: 20px; height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: var(--home-red);
}
.mt-home-mostread-list li:nth-child(2)::before { background: var(--home-blue); }
.mt-home-mostread-list li:nth-child(3)::before { background: #7a4fc4; }
.mt-home-mostread-list li:nth-child(4)::before { background: var(--home-orange); }
.mt-home-mostread-list li:nth-child(5)::before { background: #2f9e5c; }

.mt-home-empty { padding: 10px 12px; color: var(--home-muted); font-size: 1.2rem; }

/* -----------------------------------------------------------
   Responsive
----------------------------------------------------------- */
@media (max-width: 991px) {
    .mt-home-wrapper { flex-direction: column; }
    .mt-home-main-col, .mt-home-sidebar-col { width: 100%; }
    .mt-home-hero-row { flex-direction: column; }
    .mt-home-hero-slider { flex: 1 1 auto; width: 100%; }
    .mt-home-grid { grid-template-columns: 1fr; }
    .mt-home-video-row { grid-template-columns: repeat(2, 1fr); }
    .mt-home-stories-photos-row { flex-direction: column; }
    .mt-home-web-stories, .mt-home-photo-gallery { width: 100%; flex: 1 1 auto; }
    .mt-home-catstrip-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .mt-home-video-row { grid-template-columns: 1fr; }
    .mt-home-stories-row { grid-template-columns: repeat(2, 1fr); }
    .mt-home-grid-card { flex-direction: column; }
    .mt-home-grid-thumb { width: 100%; }
}
