/* --- 1. CSS VARIABLES (THEMING) --- */
:root {
    /* Default Light Theme Colors */
    --primary-color: #0056b3;
    --secondary-color: #00a8ff;
    --accent-color: #ff9f43;

    --bg-body: #ffffff;
    /* Body Background */
    --bg-section: #f0f4f8;
    /* Alternate Section Background */
    --bg-card: #ffffff;
    /* Card Background */
    --bg-nav: #ffffff;
    /* Navbar Background */

    --text-main: #2c3e50;
    /* Main Headings */
    --text-body: #555555;
    /* Paragraphs */
    --text-muted: #777777;
    /* Small Text */

    --border-color: #eeeeee;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --mobile-menu-bg: rgba(255, 255, 255, 0.95);
    /* Glass effect light */

    --transition: all 0.3s ease;
}

/* 🔥 AUTOMATIC DARK THEME OVERRIDE */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #339af0;
        /* Thoda brighter blue for dark bg */
        --secondary-color: #4dabf7;

        --bg-body: #121212;
        /* Dark Background */
        --bg-section: #1e1e1e;
        /* Section Background */
        --bg-card: #252525;
        /* Card Background */
        --bg-nav: #1e1e1e;
        /* Navbar Background */

        --text-main: #e0e0e0;
        /* Light Text */
        --text-body: #b0b0b0;
        /* Grey Text */
        --text-muted: #888888;

        --border-color: #333333;
        --shadow-color: rgba(0, 0, 0, 0.5);
        /* Stronger shadow for dark */
        --mobile-menu-bg: rgba(30, 30, 30, 0.95);
        /* Glass effect dark */
    }
}

/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.6;
    color: var(--text-body);
    background-color: var(--bg-body);
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER & NAVBAR --- */
.header {
    background: var(--bg-nav);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 70px;
    transition: background 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.logo-img {
    height: 40px;
    margin-right: 10px;
}

.nav-menu ul {
    display: flex;
    align-items: center;
}

.nav-menu ul li {
    margin-left: 20px;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* VTS Link & Button */
.vts-link {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

.btn-download {
    background: var(--primary-color);
    color: #ffffff !important;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px rgba(0, 86, 179, 0.2);
}

.btn-download:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* --- HAMBURGER ANIMATION --- */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.mobile-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    /* Automatically changes color */
    border-radius: 3px;
    transition: all 0.4s ease-in-out;
    transform-origin: left;
}

/* Active State (X) */
.mobile-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.mobile-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg);
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.9), rgba(0, 168, 255, 0.8)), url('https://source.unsplash.com/1600x900/?technology') center/cover;
    /* height: 50vh; */
    display: flex;
    align-items: center;
    text-align: center;
    color: #ffffff;
    /* Always white text on image */
    padding-top: 70px;
}

.hero-content .badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: inline-block;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
    color: #f0f0f0;
}

.btn-primary {
    background: #ffffff;
    color: #0056b3;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    margin: 5px;
    display: inline-block;
}

.btn-secondary {
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 8px 23px;
    border-radius: 5px;
    font-weight: bold;
    margin: 5px;
    display: inline-block;
}

.btn-primary:hover {
    background: #eee;
}

.btn-secondary:hover {
    background: #ffffff;
    color: #0056b3;
}

/* --- SECTIONS --- */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-body);
}

/* Features */
.features {
    padding: 60px 0;
    background: var(--bg-body);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px var(--shadow-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card h3 {
    color: var(--text-main);
    margin-bottom: 10px;
}

.card p {
    color: var(--text-body);
    font-size: 0.95rem;
}

/* Quick Links (Table Grid) */
.quick-links-section {
    padding: 60px 0;
    background: var(--bg-section);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.link-card {
    background: var(--bg-card);
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: var(--transition);
    border-top: 1px solid var(--border-color);
    /* Extra border for dark mode visibility */
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.link-card:hover {
    transform: translateX(5px);
    background: var(--bg-card);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
}

.icon-box.result {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.icon-box.cert {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

.icon-box.verify {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.link-text h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.link-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: var(--transition);
}

.link-card:hover .arrow {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* --- FOOTER --- */
.footer {
    background: #111;
    color: #fff;
    padding: 40px 0 20px;
    text-align: center;
    border-top: 1px solid #333;
}

.footer-brand h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.footer-dev {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    margin-top: 20px;
}

.footer-dev a {
    color: var(--secondary-color);
}

/* --- MOBILE MENU (Glassmorphism Dark Support) --- */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        /* height: 80vh; */
        background: var(--mobile-menu-bg);
        /* Auto Light/Dark Glass */
        -webkit-backdrop-filter: blur();
        backdrop-filter: blur(10px);
        box-shadow: -5px 0 15px var(--shadow-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        padding-top: 60px;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    .nav-menu ul li {
        margin: 20px 0;
        opacity: 0;
        transform: translateY(20px);
        transition: 0.5s ease;
    }

    .nav-menu.active ul li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: calc(0.1s * var(--i));
    }

    .nav-menu a {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-main);
        display: block;
        padding: 10px;
    }

    .nav-menu a:hover {
        color: var(--primary-color);
        background: var(--shadow-color);
        border-radius: 8px;
    }
}


/* --- MODERN NEWS TICKER --- */
.news-ticker-container {
    background: #1e293b;
    /* Dark Blue Background */
    color: #fff;
    display: flex;
    align-items: center;
    height: 40px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

/* Left Label (IMPORTANT) - Fixed rahega */
.ticker-label {
    background: #ef4444;
    /* Red Color for Alert */
    color: #fff;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

/* Moving Track */
.ticker-track {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

/* Animation */
.ticker-item {
    display: inline-block;
    padding-left: 100%;
    /* Start from outside right */
    animation: scroll-left 30s linear infinite;
    /* Speed adjust karne ke liye 20s change karein */
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Mobile Fix */
@media (max-width: 768px) {
    .news-ticker-container {
        font-size: 0.8rem;
    }

    .ticker-label {
        padding: 0 10px;
        font-size: 0.7rem;
    }
}


/* --- MODERN NEWS TICKER FIX --- */
.news-ticker-container {
    background: #1e293b;
    color: #fff;
    display: flex;
    align-items: center;
    height: 40px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;

    /* 🔥 FIX: Push it down below the fixed header */
    margin-top: 70px;
    /* Matches the height of your .header */
    z-index: 900;
    /* Ensure it's below the header (z-index 1000) but above content */
}

/* Adjust Hero padding because Ticker now takes space */
.hero {
    /* Previously padding-top: 70px; Remove or reduce it */
    padding-top: 0;
    /* Adjust height calculation: 100vh - header height - ticker height */
    height: calc(93.3vh - 70px - 40px);
    min-height: 600px;
    /* Ensure it doesn't get too small on mobile */
}