/* =========================================
   CINEMA NEWS - YALE BLUE & SILVER THEME
   ========================================= */

:root {
    --yale-blue: #074575;
    /* Main Brand Color */
    --silver: #c0c0c0;
    /* Silver Color for borders/hover */
    --pale-blue: #e3f2fd;
    /* Light blue for pagination bg */
    --white: #ffffff;
    --light-gray: #f4f4f4;
    /* Background color */
    --dark-bg: #002347;
    /* Top bar dark blue */
    --border-color: #ddd;
}

/* மெயின் பேக்கிரவுண்ட் */
.news-page-content {
    background-color: var(--light-gray);
    padding: 30px 15px 100px 15px;
    /* Added 100px bottom padding for scroll and mobile nav space */
    font-family: 'Segoe UI', Roboto, sans-serif;
    color: #333;
    min-height: 80vh;
    /* Ensure there is enough height for the page */
}

/* MAIN PAGE HEADER - இடது பக்கம் மாற்றப்பட்டது */
.main-page-header {
    font-size: 28px;
    color: var(--yale-blue);
    text-align: left;
    /* இடது பக்கம் சீரமைக்கப்பட்டது */
    margin-bottom: 35px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 6px solid var(--yale-blue);
    /* இடது பக்க ஸ்டைலிஷ் பார்டர் */
    padding-left: 15px;
    display: block;
    width: 100%;
}

/* SECTION LABELS - Silver Line with Yale Blue Text */
.section-label {
    font-size: 14px;
    font-weight: 800;
    color: var(--yale-blue);
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--silver);
}

/* -----------------------------------------
   TOP SECTION: 2 Columns (Featured + Trending)
   ----------------------------------------- */
.news-top-flex {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
}

.featured-cinema {
    flex: 2;
    min-width: 0;
}

.trending-section {
    flex: 1;
    background: #fff;
    border: 1px solid var(--silver);
    border-radius: 12px;
    padding: 20px;
}

.featured-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    border: 2px solid var(--yale-blue);
    box-shadow: 0 10px 20px rgba(7, 69, 117, 0.1);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.f-info {
    position: absolute;
    bottom: 0;
    padding: 30px;
    background: linear-gradient(transparent, var(--yale-blue));
    color: white;
    width: 100%;
}

.trend-item {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.trend-item img {
    border-radius: 5px;
    border: 1px solid var(--silver);
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* -----------------------------------------
   MIDDLE SECTION: Latest (3 Grid) + Tags Sidebar
   ----------------------------------------- */
.news-middle-flex {
    display: flex;
    gap: 25px;
}

.latest-articles-area {
    flex: 3;
}

.tags-sidebar {
    flex: 1;
}

.latest-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.l-card {
    background: white;
    border: 1px solid var(--silver);
    border-radius: 10px;
    padding: 10px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.l-card:hover {
    border-color: var(--yale-blue);
    transform: translateY(-5px);
}

.l-card img {
    width: 100%;
    border-radius: 6px;
    height: 160px;
    object-fit: cover;
}

.l-card h3 {
    font-size: 15px;
    color: var(--yale-blue);
    margin: 12px 0;
    flex-grow: 1;
}

/* 5 TAG BUTTONS - Yale Blue & Silver Style */
.tag-cloud {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.t-btn {
    background: white;
    border: 1.5px solid var(--yale-blue);
    color: var(--yale-blue);
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.t-btn:hover {
    background: var(--yale-blue);
    color: var(--silver);
}

/* -----------------------------------------
   BUTTONS & PAGINATION
   ----------------------------------------- */
.read-more-btn {
    background: var(--yale-blue);
    color: var(--silver);
    border: 1px solid var(--silver);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
    width: fit-content;
    margin-top: 10px;
}

.read-more-btn:hover {
    background: var(--silver);
    color: var(--yale-blue);
    border-color: var(--yale-blue);
}

.f-btn {
    background: transparent;
    border: 2px solid var(--silver);
    color: var(--silver);
    padding: 10px 25px;
    font-size: 14px;
}

.mini-read-more {
    font-size: 11px;
    color: var(--yale-blue);
    text-decoration: none;
    font-weight: bold;
}

/* Pagination Style Upgrade */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 60px;
    padding-bottom: 40px;
}

.p-arrow,
.p-num {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid var(--silver);
    background: white;
    color: var(--yale-blue);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.p-num.active,
.p-num:hover,
.p-arrow:hover {
    background: var(--yale-blue);
    color: var(--silver);
    border-color: var(--yale-blue);
}

/* -----------------------------------------
   MOBILE RESPONSIVE (Fixes)
   ----------------------------------------- */
@media (max-width: 992px) {

    .news-top-flex,
    .news-middle-flex {
        flex-direction: column;
    }

    .latest-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 📱 மொபைலில் மட்டும் பட்டன்களை இன்னும் சிறிதாக்க */
@media (max-width: 600px) {
    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .news-filter-buttons {
        width: 100%;
        display: flex;
        justify-content: space-between;
        /* பட்டன்களை திரைக்குள் இழுக்க */
        gap: 4px;
        /* மிகக்குறைந்த இடைவெளி */
    }

    .filter-btn {
        padding: 6px 2px !important;
        /* இன்னும் மெலிதான பட்டன் */
        font-size: 0.62rem !important;
        /* மிகச்சிறிய எழுத்துரு */
        flex: 1;
        /* மூன்று பட்டன்களும் சமமாக 100% திரையை பங்கிடும் */
        text-align: center;
        min-width: 0;
        /* ஓவர்ஃப்ளோ ஆகாமல் தடுக்க */
    }
}

/* -----------------------------------------
   SPORTS GRID (3 Columns - Events/Sports Layout)
   ----------------------------------------- */
.sports-grid-4 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.sports-card {
    background: white;
    border: 1px solid var(--silver);
    border-radius: 10px;
    padding: 10px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.sports-card:hover {
    border-color: var(--yale-blue);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(7, 69, 117, 0.15);
}

.card-img-box {
    width: 100%;
    height: 180px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #f5f5f5;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sports-card:hover .card-img-box img {
    transform: scale(1.05);
}

.sports-card h3 {
    font-size: 15px;
    color: var(--yale-blue);
    margin: 0 0 12px 0;
    flex-grow: 0;
    line-height: 1.4;
    font-weight: 600;
}

.card-content-snippet {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* --- PREMIUM DARK THEME OVERRIDES --- */
.dark-theme .news-page-content {
    background-color: #030712 !important;
    color: #9ca3af !important;
}

.dark-theme .main-page-header {
    color: #ffffff !important;
    border-left-color: #38bdf8 !important;
}

.dark-theme .trending-section,
.dark-theme .l-card,
.dark-theme .sports-card,
.dark-theme .score-item,
.dark-theme .content-box-wrapper {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.dark-theme .l-card h3,
.dark-theme .section-label,
.dark-theme .sports-main-header,
.dark-theme .score-item .teams {
    color: #ffffff !important;
}

.dark-theme .card-content-snippet {
    color: #6b7280 !important;
}

.dark-theme .t-btn {
    background: #1f2937 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.dark-theme .t-btn:hover {
    background: #38bdf8 !important;
    color: #030712 !important;
}

.dark-theme .mini-read-more {
    color: #38bdf8 !important;
}

.dark-theme .p-arrow,
.dark-theme .p-num {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.dark-theme .p-num.active,
.dark-theme .p-num:hover,
.dark-theme .p-arrow:hover {
    background: #38bdf8 !important;
    color: #030712 !important;
}



/* ============================================================
   3. மொபைல் ரெஸ்பான்சிவ் (MOBILE RESPONSIVE)
   ============================================================ */

/* டேப்லெட் மற்றும் சிறிய ஸ்கிரீன் - வரிசைக்கு 2 செய்திகள் */
@media (max-width: 992px) {
    .sports-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* மொபைல் நேவிகேஷன் பார் */
    .nav-container {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--yale-blue);
        z-index: 1000;
        border-bottom: 4px solid #C0C0C0;
    }

    .nav-container.active {
        display: block;
        animation: fadeInDown 0.3s ease-in-out;
    }

    .nav-links {
        flex-direction: column;
        padding: 0;
    }

    .nav-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li a {
        display: block;
        padding: 15px 20px;
        color: white;
    }

    .desktop-only {
        display: none;
    }
}

/* மொபைல் போன்கள் - வரிசைக்கு 2 செய்திகள் + எழுத்து குறைப்பு */
@media (max-width: 600px) {
    .sports-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .sports-card {
        padding: 10px;
    }

    .sports-card h3,
    .l-card h3 {
        font-size: 13px;
        line-height: 1.4;
        text-align: left;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: auto;
        min-height: 36px;
        margin: 5px 0;
    }

    .read-more-btn {
        font-size: 10px;
        padding: 8px 5px;
    }

    .sports-main-header {
        font-size: 20px;
    }
}

/* மெனு அனிமேஷன் */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   1. SECTION HEADER (TITLE & BUTTONS)
   ========================================== */
.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.section-label {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
    text-align: left;
    /* தலைப்பு இடது பக்கம் இருக்க */
}

/* ==========================================
   2. FILTER BUTTONS (PILL STYLE & ALIGNMENT FIX)
   ========================================== */
.news-filter-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    /* அலைன்மென்ட் பிக்ஸ் */
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-sizing: border-box;
    /* பார்டர் பிக்ஸ் */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 38px;
    text-decoration: none;
    /* அண்டர்லைனை நீக்க */
}

.filter-btn.active {
    border: 2px solid #FF1493 !important;
    color: #FF1493 !important;
    background: rgba(255, 20, 147, 0.08) !important;
}

/* ==========================================
   3. MOBILE RESPONSIVE (HEADING LEFT & WIDE BUTTONS)
   ========================================== */
@media (max-width: 600px) {
    .section-header-flex {
        flex-direction: column;
        /* தலைப்புக்கு கீழே பட்டன்கள் வர */
        align-items: flex-start;
        /* தலைப்பை இடது பக்கம் தள்ள */
        gap: 15px;
    }

    .news-filter-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }

    .news-filter-buttons {
        display: flex;
        gap: 10px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: max-content;
        min-width: 100%;
    }

    .filter-btn {
        /* பட்டன் இன்னும் கொஞ்சம் அகலமாக தெரிய */
        padding: 6px 8px !important;
        font-size: 0.6rem !important;
        /* தெளிவான சிறிய எழுத்துரு */
        flex: 1;
        /* எல்லா பட்டன்களும் சமமான அதிகபட்ச அகலத்தை எடுக்க */
        height: 34px;
        border-radius: 25px;
        text-align: center;
        min-width: 0;
        /* அகலம் சுருங்குவதை தடுக்க */
    }
}

/* பொதுவான பாக்ஸ் ரேப்பர் */
.content-box-wrapper {
    background: var(--background-color);
    /* உன் தீம் நிறம் */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    /* அழகான வளைவு */
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* லேசான நிழல் */
    box-sizing: border-box;
    /* பார்டர் பிரச்சனை வராமல் இருக்க */
}

/* மொபைலில் மட்டும் இடைவெளியைக் குறைக்க */
@media (max-width: 600px) {
    .content-box-wrapper {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 8px;
    }
}