/* ==========================================================================
   EEG SAMACHARAM - MODERN ULTRA-PREMIUM DESIGN SYSTEM
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #dc2626;          /* Vibrant Crimson */
    --primary-hover: #b91c1c;    /* Deep Red */
    --primary-light: #fef2f2;    /* Soft Red Tint */
    --primary-gradient: linear-gradient(135deg, #e11d48 0%, #dc2626 50%, #b91c1c 100%);
    --accent: #f59e0b;           /* Amber Gold */
    --accent-blue: #2563eb;      /* Media / Live Blue */
    --dark-surface: #0f172a;     /* Slate 900 */
    --dark-card: #1e293b;        /* Slate 800 */
    --text-main: #1e293b;        /* Charcoal Main */
    --text-muted: #64748b;       /* Cool Slate */
    --border-color: #e2e8f0;     /* Slate 200 */
    --bg-page: #f8fafc;          /* Slate 50 Soft Canvas */
    --bg-card: #ffffff;
    
    /* Elevation Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 32px -8px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 20px rgba(220, 38, 38, 0.25);
    
    /* Typography */
    --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Merriweather', serif;
    --font-editorial: 'Merriweather', Georgia, serif;
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
}

/* --------------------------------------------------------------------------
   1. GLOBAL RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --------------------------------------------------------------------------
   2. TOP BAR (UTILITY & TRANSLATE)
   -------------------------------------------------------------------------- */
.top-bar {
    font-size: 0.78rem;
    background: #ffffff !important;
    color: #475569 !important;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1030;
    font-weight: 500;
}

.top-bar small {
    color: #64748b;
    font-weight: 600;
}

.top-bar a {
    color: #64748b !important;
    transition: color 0.2s ease;
}

.top-bar a:hover {
    color: var(--primary) !important;
}

.top-bar .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569 !important;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.top-bar .social-icons a:hover {
    background: var(--primary);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Location Selector Button */
#locationDropdown {
    background: #f8fafc;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-weight: 600;
    color: #334155 !important;
    transition: all 0.2s ease;
}

#locationDropdown:hover {
    background: #ffffff;
    border-color: #cbd5e1 !important;
    box-shadow: var(--shadow-xs);
}

/* --------------------------------------------------------------------------
   3. BRAND HEADER (LOGO & LEADERBOARD AD)
   -------------------------------------------------------------------------- */
.app-header-mobile {
    background: #ffffff;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.app-header-mobile img {
    transition: transform 0.3s ease;
}

.app-header-mobile a:hover img {
    transform: scale(1.02);
}

/* --------------------------------------------------------------------------
   4. NAVIGATION BAR (MODERN SLEEK BAR)
   -------------------------------------------------------------------------- */
.navbar-custom {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.18);
    padding: 0;
    backdrop-filter: blur(8px);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.94) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.6px;
    padding: 0.9rem 0.95rem !important;
    position: relative;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 2px;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: #ffffff;
    border-radius: 3px 3px 0 0;
    transition: all 0.25s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 50%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12);
}

/* Nav Live TV Dot */
.nav-live-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    animation: navPulse 1.4s infinite;
}

@keyframes navPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

/* Dropdown Icon Pills */
.dropdown-icon-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Nav Quick Action Buttons */
.nav-search-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-search-btn:hover {
    background: #ffffff;
    color: var(--primary) !important;
    transform: scale(1.05);
}

.nav-cta-btn {
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    transition: all 0.2s ease;
}

.nav-cta-btn:hover {
    background: #ffffff !important;
    color: var(--primary) !important;
    border-color: #ffffff !important;
}

.nav-logout-btn {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.nav-logout-btn:hover {
    background: #dc2626;
    color: #ffffff;
    transform: rotate(90deg);
}

/* Dropdown Menus */
.dropdown-menu-dark,
.navbar-nav .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--radius-md) !important;
    padding: 8px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12) !important;
    margin-top: 4px !important;
    min-width: 220px;
}

.dropdown-menu .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: #334155 !important;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.18s ease;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #fef2f2 !important;
    color: var(--primary) !important;
    transform: translateX(4px);
}

.dropdown-menu .dropdown-header {
    color: #94a3b8 !important;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 0.72rem;
}

@media (min-width: 992px) {
    .navbar-nav .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        animation: navFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@keyframes navFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   5. BREAKING NEWS TICKER
   -------------------------------------------------------------------------- */
.ticker-wrap {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 44px;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-xs);
}

.ticker-label {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 0 18px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 1px;
    z-index: 2;
    position: relative;
    white-space: nowrap;
}

.ticker-label::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 0;
    border-top: 44px solid #b91c1c;
    border-right: 12px solid transparent;
}

.marquee-container {
    white-space: nowrap;
    overflow: hidden;
    flex-grow: 1;
    position: relative;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 30s linear infinite;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-content span {
    margin-right: 40px;
    position: relative;
}

.marquee-content span::before {
    content: '⚡';
    margin-right: 8px;
    font-size: 0.8rem;
}

.marquee-content a {
    color: #334155;
}

.marquee-content a:hover {
    color: var(--primary);
    text-decoration: underline;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* --------------------------------------------------------------------------
   6. ARTICLE & CARDS SYSTEM
   -------------------------------------------------------------------------- */
.news-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md) !important;
    border-color: #cbd5e1;
}

.news-title a {
    color: #0f172a;
    font-weight: 700;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.news-title a:hover {
    color: var(--primary);
}

/* Editorial article styling */
.article-content {
    font-family: var(--font-editorial);
    font-size: 1.12rem;
    line-height: 1.85;
    color: #27272a;
}

.article-content p {
    margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   7. SIDEBAR & WIDGETS
   -------------------------------------------------------------------------- */
.sidebar-sticky-wrapper {
    position: sticky;
    top: 85px;
}

.sidebar-title {
    border-left: 4px solid var(--primary);
    padding-left: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: #0f172a;
}

/* --------------------------------------------------------------------------
   8. ADVERTISEMENT SLOTS (MODERN & CLEAN)
   -------------------------------------------------------------------------- */
.modern-ad-container {
    display: block !important;
    width: 100% !important;
    margin: 18px auto !important;
    text-align: center !important;
    position: relative !important;
    border-radius: var(--radius-md);
    background: transparent;
}

.ad-tag-bar {
    margin-bottom: 5px;
}

.ad-book-link {
    color: #64748b;
    font-weight: 600;
    transition: color 0.2s ease;
}

.ad-book-link:hover {
    color: var(--primary) !important;
}

.ad-container a.ad-banner-link {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    line-height: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ad-container a.ad-banner-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}

.ad-container .ad-img-responsive {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    border-radius: var(--radius-md);
    display: block;
}

.ad-container iframe,
.ad-container ins,
.ad-container img {
    max-width: 100% !important;
}

/* Bookable Placeholder Slots */
.ad-placeholder-slot {
    width: 100% !important;
    max-width: 860px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
    border: 1px solid rgba(220, 38, 38, 0.2) !important;
}

.ad-placeholder-slot:hover {
    border-color: var(--primary) !important;
    background: linear-gradient(135deg, #ffffff 0%, #fff1f2 100%);
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.12) !important;
    transform: translateY(-2px);
}

.ad-slot-icon {
    width: 48px;
    height: 48px;
    background: rgba(220, 38, 38, 0.08);
    transition: all 0.3s ease;
}

.ad-placeholder-slot:hover .ad-slot-icon {
    background: var(--primary);
}

.ad-placeholder-slot:hover .ad-slot-icon i {
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   9. FOOTER (DARK & MODERN PREMIUM)
   -------------------------------------------------------------------------- */
footer {
    background: #0f172a !important;
    color: #94a3b8 !important;
    border-top: 3px solid var(--primary);
}

footer h5, footer h6 {
    color: #f8fafc !important;
    font-weight: 700;
}

footer a {
    color: #94a3b8 !important;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #ffffff !important;
}

footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0 !important;
    margin-right: 8px;
    transition: all 0.25s ease;
}

footer .social-icons a:hover {
    background: var(--primary);
    color: #ffffff !important;
    transform: translateY(-3px);
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   10. MOBILE BOTTOM NAVIGATION & RESPONSIVE APP EXPERIENCE
   -------------------------------------------------------------------------- */
.mobile-sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    text-align: center;
    padding: 6px 0;
    display: none;
}

.ad-close-btn {
    position: absolute;
    top: -24px;
    right: 8px;
    background: #1e293b;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    line-height: 24px;
    text-align: center;
}

.app-bottom-nav {
    position: fixed;
    bottom: 14px;
    left: 14px;
    width: calc(100% - 28px);
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 6px 0;
    z-index: 1050;
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.app-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
}

.app-bottom-nav .nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.app-bottom-nav .nav-item.active,
.app-bottom-nav .nav-item:hover {
    color: var(--primary);
}

.app-bottom-nav .nav-item.active i {
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   11. MOBILE BREAKPOINT STYLING (<= 767.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }

    body {
        padding-top: 68px !important;
        padding-bottom: 120px !important;
        background-color: #f8fafc;
        -webkit-tap-highlight-color: transparent;
    }

    .app-header-mobile {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: #ffffff;
        z-index: 1040;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
        padding: 8px 14px !important;
    }

    .app-header-mobile img {
        max-height: 40px !important;
    }

    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .ticker-wrap {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-top: 6px;
    }

    .mobile-sticky-ad {
        display: block;
        bottom: 84px;
    }
}