/* 1. அடிப்படை அமைப்புகள் */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    /* வெப்சைட்டை முழுமையாக வெள்ளை நிறமாக்க [cite: 2026-03-10] */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* மொத்த வெப்சைட்டையும் திரையின் நடுவில் வைக்கும் */
    transition: background 0.3s ease;
}

/* 2. மெயின் கண்டெய்னர் - Full Screen */
.main-wrapper {
    width: 100%;
    max-width: 100%;
    background-color: #ffffff;
    box-shadow: none;
    min-height: 100vh;
    position: relative;
}

/* 3. மேல் பட்டை (Top Bar) */
.top-bar {
    background-color: #800000;
    color: white;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    font-size: 11px;
    border-bottom: 2px solid #ffcc00;
}

/* 4. செய்தி ஓடும் பகுதி - திருத்தப்பட்டது */
.news-container {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    height: 100%;
    margin: 0 10px;
}

.news-label {
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    color: black;
    padding: 3px 10px;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 15px;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 5;
    /* லேபிள் மேலேயே இருக்கும் */
}

.news-ticker {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ticker-text {
    display: inline-block;
    white-space: nowrap;
    color: white;
    font-size: 13px;
    /* அனிமேஷன் உடனே தெரிய 0% லிருந்து தொடங்குகிறது */
    animation: scroll-left-new 15s linear infinite !important;
}

@keyframes scroll-left-new {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* 5. ஹெடர் அமைப்பு (Logo & Tools) */
.main-header {
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* இங்க தான் மாற்றம் செய்யணும் */
    padding: 5px 20px;
    /* 10px-ஐ 5px ஆக குறைத்தால் மேலேயும் கீழேயும் கேப் குறையும் */
    height: 70px;
    /* பேடிங் குறைக்கும் போது உயரத்தையும் (height) கொஞ்சம் குறைத்தால் இன்னும் கச்சிதமாக இருக்கும் */
    position: relative;
    border-bottom: 1px solid #eee;
}

.site-logo {
    height: 65px;
    width: auto;
    /* டெஸ்க்டாப்ல மட்டும் லோகோவை தள்ளி வைக்க */
    margin-left: 30px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    /* ஐகான்களுக்கு இடையே இடைவெளி - இது பக்கத்துல பக்கத்துல வைக்க உதவும் */
    /* டெஸ்க்டாப்ல மட்டும் ஐகான்களை தள்ளி வைக்க */
    margin-right: 50px;
}

/* மொபைலில் (850px கீழ) ஐகான்கள் மேல கீழ வராம இருக்க இந்த பிக்ஸ் முக்கியம் */
@media (max-width: 850px) {
    .site-logo {
        margin-left: 0px;
        /* மொபைல்ல லோகோ ஓரமாகவே இருக்கட்டும் */
    }

    .header-right {
        margin-right: 0px;
        /* மொபைல்ல ஐகான்கள் ஓரமாக இருக்கட்டும் */
        gap: 10px;
        /* ஐகான்கள் பக்கத்துல பக்கத்துல வர குறைந்த இடைவெளி */
        display: flex;
        /* இது கண்டிப்பா இருக்கணும் */
        flex-direction: row;
        /* ஐகான்கள் வரிசையாக (Horizontal) வர இது உதவும் */
    }
}

/* 6. செர்ச் மற்றும் டார்க் மோட் பட்டன்கள் (அனைத்திற்கும் வட்ட பார்டர் சேர்க்கப்பட்டுள்ளது) */
.icon-btn {
    background: none;
    border: 1px solid #800000;
    /* எல்லா ஐகானுக்கும் மெரூன் பார்டர் */
    width: 38px;
    height: 38px;
    border-radius: 50%;
    /* வட்டமாக மாற்ற */
    cursor: pointer;
    font-size: 18px;
    color: #800000;
    /* ஐகான் நிறம் மெரூன் */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    padding: 0;
}

.icon-btn:hover {
    background-color: rgba(128, 0, 0, 0.05);
    /* லேசான ஹோவர் எஃபெக்ட் */
}

/* 7. செர்ச் பாப்-அப் - இது அப்படியே இருக்கட்டும் */
.search-container {
    position: relative;
}

.search-popup {
    display: none;
    position: absolute;
    right: 0;
    top: 55px;
    background: white;
    border: 1px solid #800000;
    padding: 20px;
    z-index: 9999;
    width: 380px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.search-popup.active {
    display: block;
}

.up-arrow {
    position: absolute;
    top: -10px;
    right: 12px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #800000;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    outline: none;
}

.btn-red {
    background: #800000;
    color: white;
    border: none;
    padding: 0 15px;
    font-weight: bold;
    cursor: pointer;
}

/* 8. டார்க் மோட் செட்டிங்ஸ் (வட்ட பார்டர் நிறமும் இதில் மாறும்) */
body.dark-mode {
    background-color: #121212;
}

body.dark-mode .main-wrapper,
body.dark-mode .main-header,
body.dark-mode .search-popup {
    background-color: #1e1e1e;
    color: #ffffff;
    border-bottom-color: #333;
}

body.dark-mode .icon-btn {
    color: #ffffff;
    border-color: #ffffff;
    /* டார்க் மோடில் வெள்ளை பார்டர் */
}

body.dark-mode .search-form input {
    background: #2c2c2c;
    color: #fff;
    border-color: #444;
}

/* 9. தொடர்பு விவரங்கள் - டாப் பார் ஐகான் கலர் மாற்ற */
.contact-section {
    display: flex;
    gap: 15px;
    margin-left: 20px;
    flex-shrink: 0;
    color: #ffffff;
    /* மெயில் மற்றும் போன் டெக்ஸ்ட் வெள்ளை */
}

.contact-section i {
    color: #ffd700 !important;
    /* மெயில் மற்றும் கால் ஐகான் மட்டும் தங்க நிறம் */
    margin-right: 5px;
    font-size: 14px;
}


/* மொபைல் மற்றும் டேப்லெட் வியூக்கான திருத்தம் */
@media (max-width: 850px) {

    /* 1. டாப் பாரில் தேவையில்லாதவற்றை மறைக்க */
    .hide-mobile {
        display: none !important;
    }

    /* 2. நியூஸ் மட்டும் வலதுபுறமிருந்து இடதுபுறம் ஓட வைக்க */
    .news-container {
        display: flex;
        align-items: center;
        width: 100%;
        overflow: hidden;
    }

    .news-label {
        flex-shrink: 0;
        z-index: 5;
        margin-right: 10px;
    }

    .news-ticker {
        flex: 1;
        overflow: hidden;
        display: flex;
        align-items: center;
    }

    .ticker-text {
        display: inline-block;
        white-space: nowrap;
        padding-left: 100%;
        /* செய்தியை வெளியிலிருந்து ஆரம்பிக்க */
        animation: scroll-left 15s linear infinite !important;
        position: relative;
    }

    @keyframes scroll-left {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(-100%);
        }
    }

    /* 3. செர்ச் பாக்ஸ் அளவை குறைத்து கச்சிதமாக வைக்க */
    .search-popup {
        display: none;
        width: 60vw !important;
        /* அகலத்தை 70-லிருந்து 60-க்கு குறைத்துள்ளேன் */
        max-width: 280px;
        /* மேக்ஸிமம் அளவையும் குறைத்துவிட்டேன் */
        position: absolute;
        right: -15px;
        /* ஸ்கிரீனை விட்டு வெளியே போகாமல் இருக்க அட்ஜஸ்ட்மென்ட் */
        padding: 10px;
        /* உட்புற இடைவெளி குறைப்பு */
        border: 1px solid #800000;
        background: white;
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .search-popup.active {
        display: block;
    }

    /* அம்பு குறியை செர்ச் ஐகானுக்கு நேராக வைக்க */
    .up-arrow {
        right: 25px;
        border-bottom-color: #800000;
    }

    .search-form input {
        padding: 6px 10px;
        font-size: 13px;
    }

    .btn-red {
        padding: 0 10px;
        font-size: 11px;
    }
}

/* --- 6. அடிக்குறிப்பு (Footer Box Fix) --- */
.maroon-footer-simple {
    background: #8b0000;
    padding: 15px 0;
    color: white;

    /* திரையின் அகலம் மற்றும் நடுவில் வைக்க */
    width: 100%;
    max-width: 1200px;
    /* */

    margin: 0 auto !important;
    /* திரையின் நடுவில் வைக்க */
    border-radius: 4px 4px 0 0;

    border-radius: 4px 4px 0 0;
}

.maroon-footer-simple .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: transparent !important;
    box-shadow: none !important;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 50px;
}


.mini-footer-logo {
    height: 35px;
    filter: brightness(0) invert(1);
}

.copyright-text {
    font-size: 13px;
    white-space: nowrap;
}

/* சோஷியல் மீடியா வட்டங்கள் */
.footer-social-original {
    display: flex;
    gap: 12px;
    /* ஐகான்களை இடது பக்கம் தள்ள இந்த வரியைச் சேர்க்கவும் */
    margin-right: 60px;
    /* இந்த எண்ணை அதிகப்படுத்தினால் ஐகான்கள் இன்னும் இடது பக்கம் (லோகோ நோக்கி) நகரும் */
}

.footer-social-original a {
    color: #8b0000 !important;
    background: #ffffff !important;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: 0.3s;
}

.footer-social-original a:hover {
    background: #ffcc00 !important;
    transform: translateY(-3px);
}

/* மொபைல் வியூ - 850px (மொபைலில் ஃபுட்டரை மறைக்க) */
@media (max-width: 850px) {
    .maroon-footer-simple {
        display: none !important;
        /* இது ஃபுட்டரை மொபைலில் முழுமையாக மறைத்துவிடும் */
    }


}


/* --- 10. Navigation Bar (Desktop) --- */

.nav-bar {
    background-color: #800000;
    border-top: 1px solid #ffcc00;
    border-bottom: 3px solid #ffcc00;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    height: 45px;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    justify-content: flex-start;
    padding: 0 15px;
    margin: 0;
    gap: 8px;
    white-space: nowrap;
    height: 100%;
    align-items: center;
}

.nav-links li a {
    display: block;
    padding: 10px 15px;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s ease;
    border-radius: 4px;
}

.nav-home,
.nav-links a.active,
.nav-links li a:hover {
    background-color: #ffcc00;
    color: #000 !important;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: bold;
}

/* --- 11. Mobile Menu (Hamburger Animation) --- */
/* Logo-area kulla idhu irukardhala flex alignment mukkiyam */
.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    /* Desktop-la hide aagum */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 2000;
    /* Menu drawer-kku mela irukka */
    padding: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #800000;
    /* Maroon color bars */
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Smooth bounce effect */
    border-radius: 5px;
}

/* 3 lines "X" mark-ah maara (Close animation) */
.menu-toggle.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
    /* Side-la slide aagi hide aagum */
}

.menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- 12. Mobile View Responsive (850px Breakpoint) --- */
@media (max-width: 850px) {
    .menu-toggle {
        display: flex;
    }

    .nav-bar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 75%;
        height: 70vh;
        background-color: #111111;
        flex-direction: column;
        transition: 0.4s ease-in-out;
        box-shadow: 10px 0 20px rgba(0, 0, 0, 0.5);
        z-index: 1500;
        border: none;
    }

    .nav-bar.show {
        left: 0;
    }

    .nav-links {
        flex-direction: column;
        padding-top: 100px;
        justify-content: flex-start;
    }

    .nav-links li a {
        color: #ffffff;
        border-bottom: 1px solid #2a2a2a;
        padding: 18px 30px;
        width: 100%;
    }

    .nav-links li a:hover,
    .nav-links li a.active {
        background-color: #8b0000 !important;
        color: #ffffff !important;
    }

    /* Custom fix for the last menu item */
    @media (max-width: 850px) {
        .nav-bar {
            height: 100% !important;
            min-height: 100vh;
            display: flex !important;
            flex-direction: column;
            background-color: #111111 !important;
            overflow-y: auto !important;
            padding-bottom: 80px;
        }

        .nav-links {
            height: auto !important;
            display: flex !important;
            flex-direction: column !important;
            padding-bottom: 50px;
        }

        .nav-links li {
            background-color: #111111;
            width: 100%;
        }
    }

    /* Dark Mode Fixes */
    body.dark-mode .nav-bar {
        background-color: #111111 !important;
    }

    body.dark-mode .nav-links li a {
        color: #ffffff !important;
        border-bottom-color: #2a2a2a !important;
    }

    body.dark-mode .bar {
        background-color: #ffffff;
        /* Dark mode-la white hamburger */
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* முழு திரையின் உயரத்தையும் எடுத்துக்கொள்ளும் */
    margin: 0;
}

main {
    flex: 1;
    /* இது இடையில் உள்ள இடைவெளியை நிரப்பி, ஃபுட்டரை கீழே தள்ளும் */
}

/* sticky buttons */
/* 1. டெஸ்க்டாப்பில் மெனுவை முழுமையாக மறைக்க */
@media screen and (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* 2. மொபைலில் மட்டும் ஸ்டிக்கி மெனு வேலை செய்ய */
@media screen and (max-width: 768px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background-color: #ffffff;
        /* Light Mode background */
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
        z-index: 9999;
        border-top: 2px solid #8b0000;
        /* உங்கள் மெரூன் பார்டர் */
    }

    /* ஐகானுக்குக் கீழே எழுத்து வர அலைன்மென்ட் */
    .nav-item {
        display: flex;
        flex-direction: column;
        /* ஐகான் மேலே, எழுத்து கீழே */
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #555;
        /* Light Mode text color */
        width: 100%;
        gap: 2px;
    }

    .nav-item i {
        font-size: 20px;
    }

    .nav-item span {
        font-size: 10px;
        font-weight: bold;
    }

    /* Active நிலையில் மெரூன் நிறம் */
    .nav-item.active {
        color: #8b0000;
    }

    /* --- 3. டார்க் மோட் சப்போர்ட் (Dark Mode Fix) --- */
    body.dark-mode .mobile-bottom-nav {
        background-color: #1a1a1a !important;
        /* டார்க் பேக்ரவுண்ட் */
        border-top: 2px solid #ff4444;
        /* டார்க் மோடில் லேசான சிவப்பு */
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
    }

    body.dark-mode .nav-item {
        color: #bbb !important;
        /* டார்க் மோடில் எழுத்து நிறம் */
    }

    body.dark-mode .nav-item.active {
        color: #ff4444 !important;
        /* டார்க் மோடில் ஆக்டிவ் நிறம் */
    }
}

/* --- technology --- */
.container {
    max-width: 1200px;
    margin: 50px auto;
    display: flex;
    gap: 40px;
    padding: 0 20px;
    /* Sidebar-ஐ செய்திகளுக்கு நேராக (மேலே) கொண்டு வர இது அவசியம் */
    align-items: flex-start;
}

.main-content {
    flex: 2.5;
}

.news-right-sidebar {
    flex: 1;
    min-width: 320px;
    /* Sidebar செய்திகளுக்கு இணையாகத் தொடங்குவதை உறுதி செய்ய */
    position: sticky;
    top: 20px;
}

/* --- நவீன செய்திகள் கிரிட் --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.news-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    /* எல்லா கார்டுகளும் சம உயரத்தில் இருக்க */
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: #8b000033;
}

.card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s;
}

.news-card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    /* White box-ஐ நீளமாக்க padding அதிகரித்துள்ளேன் */
    padding: 25px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-size: 17px;
    /* சற்று பெரிய எழுத்துக்கள் */
    line-height: 1.5;
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.news-card:hover h3 {
    color: #8b0000;
}

/* --- ராஜா / 5 நிமிடம் (Meta Info) - Ash Color --- */
.card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #777;
    /* Ash Color */
    margin-top: auto;
    /* இதை எப்போதும் பெட்டியின் அடிப் பகுதிக்கு தள்ளும் */
    border-top: 1px solid #f5f5f5;
    padding-top: 15px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #777;
    /* Ash Color */
}

.card-meta i {
    color: #999;
    /* ஐகான்கள் மட்டும் லேசான நிறத்தில் */
}

/* Dark Mode-ல் Ash Color சரியாக தெரிய */
.dark-mode .card-meta,
.dark-mode .card-meta span {
    color: #aaa;
    border-top-color: #333;
}

/* வலது பக்கம்: சைடு பார் (3rd Column) */
/* --- திருத்தப்பட்ட சைடு பார் கோட் --- */
.news-right-sidebar {
    flex: 1;
    min-width: 320px;
    margin-top: 0px;
    /* 55px-ஐ 0px ஆக மாற்றவும் */
}

/* --- சைடு பார் பாக்ஸ் --- */
.sidebar-box {
    background: #f0e9e9;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: #80000033;
}

/* சைடு பார் ஹெடர் */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    /* இடைவெளி அதிகரிப்பு */
    border-left: 4px solid #800000;
    padding-left: 10px;
}

.box-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    color: #8f0c0c;
}

/* --- பிரபலமான தலைப்புகள் (Tags Alignment Fix) --- */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* இடைவெளி குறைத்து நெருக்கமாக வைக்க */
    margin-top: 10px;
}

.tag-item {
    background: #ffffff;
    color: #444;
    padding: 6px 14px;
    border-radius: 6px;
    /* வட்டத்திற்கு பதில் லேசான சதுரம் நவீனமாக இருக்கும் */
    font-size: 12px;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 500;
    flex-grow: 1;
    /* எல்லா பட்டன்களும் பெட்டியின் அகலத்தை நிரப்ப */
    text-align: center;
}

.tag-item:hover {
    background: #800000;
    color: #ffffff;
    border-color: #800000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(128, 0, 0, 0.15);
}

/* --- மினி நியூஸ் லிஸ்ட் (Alignment Fix) --- */
.mini-news {
    display: flex;
    gap: 15px;
    align-items: center;
    /* தலைப்பு மற்றும் படம் நேர்கோட்டில் இருக்க */
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.mini-news:last-child {
    border-bottom: none;
}

.mini-news img {
    width: 80px;
    height: 65px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.mini-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-details h6 {
    font-size: 13.5px;
    margin: 0 0 4px 0;
    line-height: 1.4;
    color: #333;
    font-weight: 600;
}

.mini-details p {
    font-size: 11px;
    color: #888;
    margin: 0;
}

/* --- மொபைல் வியூ (850px) --- */
/* மொபைல் வியூ மாற்றங்கள் */
@media (max-width: 850px) {

    /* தலைப்பை மேலே உயர்த்த */
    .category-title {
        margin-top: 10px !important;
        /* இடைவெளியை வெகுவாகக் குறைக்கும் */
        padding-top: 0px !important;
        margin-bottom: 15px !important;
        /* செய்திக்கும் தலைப்புக்கும் இடையில் இடைவெளி */
    }

    /* தலைப்பிற்கு மேலிருக்கும் கண்டெய்னர் இடைவெளியைக் குறைக்க */
    main.container {
        padding-top: 0px !important;
        margin-top: 0px !important;
    }

    /* மெனு பார் கீழ் இடைவெளியைக் குறைக்க */
    .nav-bar {
        margin-bottom: 0px !important;
    }
}

/* மொபைல் வியூ (850px) */
@media (max-width: 850px) {

    /* மெயின் லேஅவுட் வரிசை மாற்றம் */
    .bottom-news-layout {
        flex-direction: column;
        display: flex;
    }

    /* இடது பக்கம் உள்ள கிரிட் செய்திகள் முதலில் */
    .news-left-container {
        order: 1;
        width: 100%;
    }

    /* சைடு பார் செய்திகள் கிரிட்டிற்கு கீழே வர */
    .news-right-sidebar {
        order: 2;
        width: 100%;
        min-width: 100%;
        margin-top: 30px;
        /* மொபைலில் அதிக கேப் தேவையில்லை */
        display: block !important;
        /* மறைந்திருந்தால் தெரிய வைக்க */
    }


    /* சைடு பாரில் உள்ள பாக்ஸ்களின் வரிசையை மாற்ற (விருப்பமென்றால்) */
    .news-right-sidebar {
        display: flex;
        flex-direction: column;
    }

    .recent-news-box {
        order: 1;
    }

    /* சமீபத்திய செய்திகள் முதலில் */
    .trending-topics-box {
        order: 2;
    }

    /* பிரபலமான தலைப்புகள் அதற்கு கீழே */

    .tag-item {
        flex-grow: 1;
        /* மொபைலில் பட்டன்கள் அகலமாகத் தெரிய */
        text-align: center;
    }
}

/* 1. நிறங்களை வேரியபிளாக மாற்றவும் (Light Mode - Default) */
:root {
    --bg-box: #f0e9e9;
    /* சைடு பார் பாக்ஸ் நிறம் */
    --bg-card: #ffffff;
    /* கார்டு பின்னணி */
    --text-main: #333333;
    /* முக்கிய எழுத்து நிறம் */
    --text-secondary: #777777;
    /* துணை எழுத்து நிறம் */
    --border-color: rgba(0, 0, 0, 0.08);
    --tag-bg: #ffffff;
}

/* டார்க் மோடில் 'மேலும்' லிங்க் தெளிவாகத் தெரிய */
body.dark-mode .view-more,
body.dark-mode .view-more-link {
    color: #ff9f9f !important;
    /* லேசான பிங்க் அல்லது வெள்ளை நிறம் */
}

body.dark-mode .view-more i,
body.dark-mode .view-more-link i {
    color: #ff9f9f !important;
}

/* ஹோவர் செய்யும்போது நிறம் மாற */
body.dark-mode .view-more:hover,
body.dark-mode .view-more-link:hover {
    color: #ffffff !important;
}

/* 1. 'மேலும்' பட்டனில் உள்ள அண்டர்லைனை நீக்கி, அளவைக் குறைக்க */
.view-more-link,
.view-more {
    text-decoration: none !important;
    /* அண்டர்லைனை நீக்க */
    font-size: 11px !important;
    /* எழுத்தின் அளவைக் குறைக்க */
    display: flex;
    align-items: center;
    gap: 5px;
    color: #800000;
    transition: 0.3s;
}

/* டார்க் மோடிலும் இது வேலை செய்ய */
body.dark-mode .view-more-link,
body.dark-mode .view-more {
    text-decoration: none !important;
    font-size: 11px !important;
    color: #ff9f9f !important;
}

/* 2. தலைப்பிற்கும் செய்திகளுக்கும் இடையில் இடைவெளி (Gap) */
.sidebar-header {
    margin-bottom: 25px !important;
    /* செய்திகளுக்கு மேலதிக இடைவெளி */
}

/* 3. செய்திகளுக்கு இடையே உள்ள இடைவெளி (News to News Gap) */
.mini-news {
    margin-bottom: 20px !important;
    /* ஒவ்வொரு செய்திக்கும் இடையில் கேப் */
    padding-bottom: 12px;
}

.mini-news:last-child {
    margin-bottom: 0 !important;
}

/* --- மேலும் செய்திகள் செக்ஷன் --- */
.more-news-section {
    max-width: 1200px;
    /* உங்கள் வெப்சைட் பாக்ஸ் அளவு */
    margin: 50px auto;
    padding: 0 15px;
}

/* --- மொபைல் ரெஸ்பான்சிவ் (முக்கியமான பகுதி) --- */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .news-right-sidebar {
        width: 100%;
        order: 2;
    }

    .main-content {
        width: 100%;
        order: 1;
    }

    /* மொபைலிலும் 2 காலம் வருவதை உறுதி செய்ய */
    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .card-img {
        height: 120px;
    }

    .card-body {
        padding: 10px;
    }

    /* மொபைலில் எழுத்து அளவு குறைப்பு */
    .card-body h3 {
        font-size: 13px !important;
        height: 38px;
    }

    .card-meta {
        font-size: 10px;
    }
}

/* டார்க் மோட் - அதே மெரூன் தீம் */
body.dark-mode .news-card,
body.dark-mode .sidebar-box {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .card-body h3,
body.dark-mode .mini-details h6 {
    color: #eee;
}

body.dark-mode .tag-item {
    background: #333;
    color: #ccc;
}

/* --- Pagination Final Fix: Center, Dark Mode & Mobile --- */

.pagination-wrapper-fixed {
    width: 100% !important;
    max-width: 1200px !important;
    /* [cite: 2026-02-06] */
    margin: 40px auto !important;
    text-align: center !important;
    display: block !important;
    clear: both !important;
    padding: 20px 0 !important;
    position: relative !important;
}

.pagination-container {
    display: inline-block !important;
    padding: 0;
    margin: 0;
}

.page-number,
.page-btn {
    display: inline-flex !important;
    vertical-align: middle;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    /* Light mode text */
    font-weight: bold;
    border-radius: 4px;
    background-color: #fff;
    /* Light mode bg */
    transition: 0.3s;
}

/* Active 1 & Hover - Maroon Theme */
.page-number.active,
.page-number:hover,
.page-btn:hover {
    background-color: #800000 !important;
    color: #ffffff !important;
    border-color: #800000 !important;
}

/* --- Dark Mode Fix (Based on your Screenshot) --- */
body.dark-mode .page-number,
body.dark-mode .page-btn {
    background-color: #2c2c2c !important;
    /* உங்களின் டார்க் மோட் பின்னணிக்கு ஏற்ப */
    border-color: #444 !important;
    color: #ffffff !important;
}

body.dark-mode .page-number.active {
    background-color: #800000 !important;
    border-color: #800000 !important;
}

/* --- Mobile Fix: Bottom Nav-க்கு மேலே தெரிய --- */
@media screen and (max-width: 768px) {
    .pagination-wrapper-fixed {
        /* மொபைல் பாட்டம் நேவிகேஷன் மறைக்காமல் இருக்க கூடுதல் மார்ஜின் */
        margin-bottom: 90px !important;
        padding: 10px 0 !important;
    }

    .page-number,
    .page-btn {
        width: 35px !important;
        height: 35px !important;
        margin: 0 3px !important;
        font-size: 14px !important;
    }
}

/* --- Master CSS: Two Columns Alignment & Box Style --- */

/* 1. மெயின் கண்டெய்னர் திருத்தம் */
main.container {
    display: flex !important;
    max-width: 1200px !important;
    margin: 40px auto !important;
    gap: 30px !important;
    align-items: flex-start !important;
    /* இதான் மேலிருந்து சமமாக்கும் */
}

/* 2. இடது பக்கம்: மெயின் கன்டென்ட் (தலைப்பு மற்றும் செய்திகள்) */
.main-content {
    flex: 2.5 !important;
    display: flex !important;
    flex-direction: column !important;
    margin-top: 0px !important;
    padding-top: 0px !important;
}

/* தலைப்பு "தொழில்நுட்பம்" மேலே உள்ள இடைவெளியைக் குறைக்க */
.category-title {
    margin-top: 0px !important;
    margin-bottom: 25px !important;
}

/* 3. வலது பக்கம்: சைடு பார் (இதையும் மேலிருந்து நேராக வைக்க) */
.news-right-sidebar {
    flex: 1 !important;
    margin-top: 55px !important;
    /* தலைப்புக்கு சமமாக வர இந்த 55px அவசியம் */
    padding-top: 0px !important;
    position: sticky !important;
    top: 20px !important;
}

/* 4. செய்திப் பெட்டிகள் (White Box) நீளமாகத் தெரிய */
.news-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 25px !important;
    align-items: stretch !important;
}

.news-card {
    height: 100% !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid #f0f0f0 !important;
}

.card-body {
    padding: 35px 22px !important;
    /* பெட்டி நீளமாகத் தெரிய அதிக இடைவெளி */
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.card-body h3 {
    flex-grow: 1 !important;
    /* இது பெட்டியைத் தானாகக் கீழே இழுக்கும் */
    margin-bottom: 20px !important;
    font-size: 17px !important;
}

/* 5. ராஜா / 5 நிமிடம் (Meta Data) - Ash Color */
.card-meta {
    color: #888 !important;
    /* Ash Color */
    font-size: 13px !important;
    border-top: 1px solid #f5f5f5 !important;
    padding-top: 15px !important;
    margin-top: auto !important;
}

.card-meta span {
    color: #888 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* --- Final Combined Override: Grid & Dark Mode --- */

/* 1. மொபைல் கிரிட் ஸ்டைல் (Mobile Grid) */
@media (max-width: 768px) {
    main.container {
        flex-direction: column !important;
        padding: 15px !important;
        gap: 20px !important;
    }

    .news-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        /* மொபைலில் 2 பெட்டிகள் */
        gap: 12px !important;
    }

    .card-img {
        height: 110px !important;
        /* மொபைலில் படம் சிறியதாக இருக்க */
    }

    .card-body {
        padding: 12px 8px !important;
    }

    .card-body h3 {
        font-size: 13px !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        /* தலைப்பு 2 வரியாக சுருங்கும் */
        margin-bottom: 10px !important;
    }

    .card-meta {
        font-size: 10px !important;
        gap: 5px !important;
        padding-top: 10px !important;
    }

    .news-right-sidebar {
        width: 100% !important;
        margin-top: 20px !important;
    }
}

/* 2. டார்க் மோட் செட்டிங்ஸ் (Dark Mode) */
body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

.dark-mode .news-card {
    background: #1e1e1e !important;
    /* டார்க் மோடில் பெட்டி நிறம் */
    border-color: #333 !important;
}

.dark-mode .card-body h3 {
    color: #ffffff !important;
}

.dark-mode .card-meta,
.dark-mode .card-meta span {
    color: #aaa !important;
    /* டார்க் மோடில் Ash Color */
    border-top-color: #333 !important;
}

.dark-mode .sidebar-box {
    background: #1e1e1e !important;
    border-color: #333 !important;
    color: #ffffff !important;
}

.dark-mode .tag-item {
    background: #2a2a2a !important;
    color: #ccc !important;
    border-color: #444 !important;
}

.dark-mode .box-title {
    color: #ff4d4d !important;
}

/* Pagination Styles */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-btn,
.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333 !important;
    font-weight: bold;
    transition: all 0.3s ease;
    background: #fff;
}

.page-btn:hover,
.page-number:hover,
.page-number.active {
    background: #800000 !important;
    color: #fff !important;
    border-color: #800000 !important;
}

.dots {
    color: #777;
    padding: 0 5px;
}

/* Dark Mode for Pagination */
.dark-mode .page-btn,
.dark-mode .page-number {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #fff !important;
}

.dark-mode .page-btn:hover,
.dark-mode .page-number:hover,
.dark-mode .page-number.active {
    background: #ff4d4d !important;
    border-color: #ff4d4d !important;
}

/* டார்க் மோடில் தலைப்பு நிறம் */
.dark-mode .mini-details h6 {
    color: #eee !important;
}

/* --- Mobile View Heading Position Fix --- */

@media (max-width: 768px) {

    /* 1. மெயின் கண்டெய்னர் இடைவெளியைக் குறைக்க */
    main.container {
        margin-top: 10px !important;
        /* 50px-ஐக் குறைத்து 10px ஆக்கியுள்ளேன் */
        padding-top: 0px !important;
    }

    /* 2. தலைப்பு ரொம்பக் கீழே இறங்குவதைத் தடுக்க */
    .category-title {
        margin-top: 0px !important;
        margin-bottom: 15px !important;
        font-size: 22px !important;
        /* மொபைலுக்கு ஏற்ற அளவு */
        padding-left: 5px;
    }

    /* 3. மெயின் கன்டென்ட் பகுதியில் உள்ள தேவையற்ற மார்ஜின்களை நீக்க */
    .main-content {
        margin-top: 0px !important;
        padding-top: 0px !important;
    }

    /* 4. மொபைல் கிரிட் அலைன்மென்ட் (2 columns) */
    .news-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-top: 10px !important;
    }
}

/* --- Dark Mode Mobile Support --- */
body.dark-mode .category-title {
    color: #ffffff !important;
}

/* --- Modern Category Title Style --- */

.category-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    position: relative;
    padding-bottom: 12px !important;
    margin-bottom: 30px !important;
    border-bottom: 2px solid #eee;
    /* மெல்லிய கீழ் கோடு */
    display: block;
    text-transform: capitalize;
}

/* தலைப்புக்குக் கீழே ஒரு சின்ன ஸ்டைலான சிவப்பு கோடு */
.category-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    /* பார்டருக்கு மேலே சரியாக உட்கார */
    width: 60px;
    height: 3px;
    background-color: #800000;
    /* உங்கள் பிராண்ட் மெரூன் நிறம் */
    border-radius: 2px;
}

/* மொபைல் போனில் தலைப்பு அளவு */
@media (max-width: 768px) {
    .category-title {
        font-size: 22px !important;
        margin-top: 10px !important;
        padding-left: 5px;
    }
}

/* --- Dark Mode Support --- */
body.dark-mode .category-title {
    color: #c4bd0c !important;
    border-bottom-color: #333;
}

.card-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 12px 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* சரியாக 3 வரிகளில் சுருக்கும் */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
    /* இருபுறமும் சமமாக இருக்கும் */
}

/* Dark Mode support */
.dark-mode .card-desc {
    color: #bbb;
}

/* 1. முழு கார்டு லிங்க் - அண்டர்லைன் மற்றும் நிழல் கோடுகளை நீக்க */
.card-link,
.card-link:hover,
.card-link:focus {
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    /* சில சமயம் பார்டர் நிழலாக வரும், அதை நீக்க */
    color: inherit;
    display: block;
}

/* 2. தலைப்பு மற்றும் பாரகிராஃப் - எதற்கும் அடியில் கோடு வரக்கூடாது */
.card-body h3,
.card-body p,
.sub-item-large {
    text-decoration: none !important;
    border-bottom: none !important;
    /* பார்டர் கோடு இருந்தாலும் நீக்கிவிடும் */
}

/* 3. பாரகிராஃப் ஸ்டைல் - இடைவெளி குறைப்பு */
.card-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 10px 0 0 0;
    /* அடியில் கேப் 0 ஆக்கிவிட்டேன் */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
}

/* 4. சப்-நியூஸ் பாக்ஸ் - இடைவெளி மற்றும் கோடு நீக்கம் */
.sub-news-box {
    margin: 0;
    padding: 2px 0 8px 0;
    /* மிகச்சிறிய இடைவெளி மட்டும் */
    border-top: none !important;
    /* அந்த மேல்பக்க கோடு (dashed line) இப்போது வராது */
}

.sub-item-large {
    display: block;
    font-size: 17px;
    /* இன்னும் கொஞ்சம் பெரிய ஃபான்ட் */
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* 5. மெட்டா தகவல் */
.card-meta {
    margin-top: 5px;
    font-size: 13px;
    color: #888;
}

/* Hover செய்யும்போது மட்டும் லேசாக கார்டு தூக்கினால் போதும், கோடு வரக்கூடாது */
.news-card:hover {
    transform: translateY(-5px);
    transition: 0.3s ease;
}