/* =========================================================
   HOME PAGE UI BASE
========================================================= */

html, body {
    margin: 0;
    padding: 0;
    background: #f5f6f7;
}

.div-body {
    max-width: 1300px;
    margin: 0 auto;
}

.home-ui {
    background: #f5f6f7;
    padding: 15px;
}

/* =========================
   ADVERTISEMENT SLOTS
========================= */

.ad-slot {
    background: #f5f5f5;
    border: 1px solid #ddd;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    font-size: 14px;
    color: #666;
}

.ad-top,
.ad-mid,
.ad-inline {
    max-width: 1200px;
    margin: 15px auto;
}

.ad-side {
    margin-top: 15px;
}

.ad-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sizes */
.ad-leaderboard {
    height: 90px;       /* 728x90 */
}

.ad-rectangle {
    height: 250px;      /* 300x250 */
}

.ad-sticky {
    height: 600px;      /* 300x600 */
}


/* =========================================================
   HERO SLIDER – FULL CSS (MAIN + SIDE)
========================================================= */

.hero-slider-section {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    gap: 15px;
}

/* MAIN SLIDER */
.hero-main-slider {
    width: 70%;
    height: auto;
    position: relative;
    overflow: hidden;
    background: #000;
    flex: 0 0 70%;
}

.hero-main-slider .slide {
    height: 410px;
}

.hero-main-slider img {
    width: 100%;
    height: auto;
    object-fit: unset;
}

.hero-main-slider .slide-caption {
    z-index: 20;
}

.hero-main-slider .slide-caption {
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85),
        rgba(0,0,0,0.4),
        rgba(0,0,0,0)
    );
    
    margin: 10px;
}


/* SLIDES */
.slider-track {
    position: relative;
    z-index:9;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    background: none;
   
}

/* CATEGORY LABEL */
.slide-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #d60000;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 2px;
    z-index: 5;
    text-transform: uppercase;
}

.slide-category.small {
    font-size: 11px;
    padding: 3px 6px;
}

/* CAPTION */
.slide-caption {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    padding: 8px 12px;
    max-width: 90%;
}

.slide-caption.small {
    font-size: 15px;
}

/* TITLE LINK (ONLY CLICKABLE PART) */
.slide-title-link {
    color: #fff;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.slide-caption.small .slide-title-link {
    font-size: 15px;
}

/* HOVER EFFECT ONLY ON TITLE */
.slide-title-link:hover {
    color: #f4c842;
    transform: scale(1.05);
}

/* UNDERLINE ANIMATION */
.slide-title-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #f4c842;
    transition: width 0.3s ease;
}

.slide-title-link:hover::after {
    width: 100%;
}

/* NAV BUTTONS */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

.slider-btn.small {
    font-size: 14px;
    padding: 6px;
}

.hero-small-slider .slider-btn.prev {
    left: 5px;
}

.hero-small-slider .slider-btn.next {
    right: 5px;
}

/* SIDE SLIDERS */
.hero-side-sliders {
    width: 30%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 calc(30% - 15px);
}

.hero-small-slider {
    position: relative;
    background: #000;
    overflow: hidden;
    height: 200px;
}

.hero-small-slider img {
    width: 100%;
    height: 200px;
    object-fit: unset;
}

.hero-small-slider .slide-caption {
    z-index: 15;
    background: rgba(0,0,0,0.75);
    padding: 8px 10px;
}

.hero-small-slider .slide-title-link {
    font-size: 14px;
    line-height: 1.3;
}


/* =========================================================
   BIG HEADLINES (LEFT GRID)
========================================================= */
/* =========================================================
   BIG HEADLINES – IMPROVED UX (TOI STYLE)
========================================================= */

/* Layout wrapper */
.big-headlines-layout {
    max-width: 1200px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: 1fr 320px; /* headlines + sidebar */
    gap: 20px;
}

/* Headlines grid */
.big-headlines-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Headline card */
.headline-card {
    display: flex;
    gap: 12px;
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.headline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* Thumbnail wrapper */
/* Thumbnail wrapper – fixed size */
.headline-thumb {
    width: 130px;          /* fixed width */
    height: 100px;          /* fixed height */
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
    background: #000;      /* fallback while image loads */
}

/* Image – center crop */
.headline-thumb img {
    width: 100%;
    height: 100%;
    object-fit: unset;     /* critical: prevents distortion */
    object-position: center;
    transition: transform 0.4s ease;
}

/* Hover zoom stays clean */
.headline-card:hover .headline-thumb img {
    transform: scale(1.08);
}

/* Text area */
.headline-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category badge */
.headline-category {
    display: inline-block;
    font-size: 11px;
    background: #f4c842;
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    align-self: flex-start;
}

/* Title */
.headline-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    color: #111;

    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Optional subtle hover title color */
.headline-card:hover .headline-title {
    color: #d60000;
}

/* =========================================================
   RESPONSIVE – BIG HEADLINES
========================================================= *

@media (max-width: 992px) {
    .big-headlines-layout {
        grid-template-columns: 1fr;
    }

    .big-headlines-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   TOP 20 HEADLINES (RIGHT SIDEBAR)
========================================================= */

.big-headlines-sidebar {
    position: sticky;
    top: 20px;
}

.top20-box {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
}

.top20-box h3 {
    font-size: 16px;
    margin-bottom: 8px;
    border-bottom: 2px solid #f4c842;
    padding-bottom: 5px;
}

.top20-wrapper {
    height: 260px;
    overflow: hidden;
}

.top20-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.top20-list li {
    border-bottom: 1px dotted #ccc;
}

.top20-list li a {
    display: block;
    padding: 6px 0;
    font-size: 14px;
    color: #222;
    text-decoration: none;
    transition: color 0.25s ease, padding-left 0.25s ease;
}

.top20-list li a:hover {
    color: #d60000;
    padding-left: 6px;
}


/* =========================================================
   ADVERTISEMENT BLOCKS (RIGHT SIDE)
========================================================= */

.ad-box {
    margin-top: 15px;
    height: 250px;
    background: #f2f2f2;
    border: 1px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #555;
}



/* =========================================================
   RESPONSIVE (HOME PAGE)
========================================================= */

@media (max-width: 992px) {

    .hero-slider-section {
        flex-direction: column;
    }

    .hero-main-slider {
        width: 100%;
        aspect-ratio: 21 / 9;
    }

    .hero-main-slider img {
        height: 100%;
    }  
    .big-headlines-layout {
        grid-template-columns: 50%;
        display:flex;
    }

    .big-headlines-grid {
        display: block;
        /*grid-template-columns: 1fr;*/
    }     

    .big-headlines-sidebar {
        position: relative;
        top: 10px;
    }

    .hero-side-sliders{
        width: 45%;
    }
    .ad-sticky{display: none;}
    #hero-side-sliders{display: none ;}

    .headline-card {
        display: flex;
     margin: 10px;
    }

    .hero-main-slider .slide {
    /*height: 400px;*/
    height: auto;
    }
}

@media (min-width: 920px) {
    .hero-main-slider .slide-caption {   
        margin: 30px;
    }
}

/* BIG HEADLINES – DESKTOP SCROLL */
@media (min-width: 769px) {
    .slider-track {
    position: relative;
    z-index: 9;
}
    .big-headlines-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;

        max-height: 880px;      /* ~10 rows */
        overflow-y: auto;
        padding-right: 6px;
    }

    /* Optional scrollbar polish */
    .big-headlines-grid::-webkit-scrollbar {
        width: 6px;
    }

    .big-headlines-grid::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 6px;
    }
}


@media (max-width: 768px) {

    .hero-slider-section {
        flex-direction: column;
    }

    .hero-main-slider {
        width: 100%;
        aspect-ratio: 21 / 9;
    }

    .hero-main-slider img {
        width: 100%;
        object-fit: unset;
        height: auto;
    }
    

    /*added*/
     .big-headlines-layout {
        display: block;
    }

    .big-headlines-layout::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40px;
        background: linear-gradient(
            to bottom,
            rgba(245,246,247,0),
            rgba(245,246,247,1)
        );
        pointer-events: none;
    }

     /* BIG HEADLINES – MOBILE SCROLL */
    .big-headlines-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;

        max-height: 480px;        /* ~3–4 cards */
        overflow-y: auto;
        padding-right: 6px;
    }

    /* Smooth scrolling */
    .big-headlines-grid {
        scroll-behavior: smooth;
    }

    /* Optional: hide ugly scrollbar (Chrome) */
    .big-headlines-grid::-webkit-scrollbar {
        width: 4px;
    }

    .big-headlines-grid::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }
       .big-headlines-grid {
        order: 1;
        max-height: 420px;      /* 3–4 items */
        overflow-y: auto;
        margin-bottom: 15px;
    }

    .big-headlines-sidebar {
        order: 2;
        width: 100%;
    }

    .headline-thumb {
        width: 50%;
        
    }

    .hero-side-sliders{
        width: 45%;
    }
    .ad-sticky{display: none;}
    #hero-side-sliders{display: none ;}

    .headline-card {
        display: flex;
     margin: 10px;
    }

    .slide-title-link {
        font-size: 18px;
    }

}


@media (max-width: 690px) {
    .slide-title-link {
        font-size: 15px;
    }
    .hero-main-slider .slide-caption
    {
        margin: 0px;
    }
}