/* ======================================================
   DARK MODE ISOLATION (V11.1 / v25)
   - This file forces Midnight Glass Dark Mode.
   - It is toggled dynamically via JS.
   ====================================================== */

/* Sticky Header Dark Mode Refinement */
.main-header {
    background: rgba(5, 8, 20, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Force Tagline (Est. 2006) to White */
.tagline::after {
    color: #f0f0ee !important;
    background: transparent !important;
    border: none !important;
}

:root {
    --text-dark: #ffffff;
    --text-light: #ffffff;
    --glass-base: rgba(15, 20, 40, 0.75);
    --light-bg: #050814;
    --primary-blue: #ffffff;
}

/* 1. Deep Backgrounds & Typography */
body {
    background: radial-gradient(circle at top right, #0a0f25 0%, #050814 100%) !important;
    color: var(--text-dark) !important;
}

/* Remove ALL solid white backgrounds from sections */
.bg-light,
.bg-gray,
.section-padding.bg-light,
.excellence-section,
.facilities-section,
.house-system-section,
.gallery-section,
.directorial-desk-wrapper,
.message-section,
.footer-area,
.site-footer,
footer,
.contact-section,
.quick-info-section,
.notice-section,
.about-section,
.highlights-modern,
.stats-grid-vibrant,
.excellence-section,
.about-card {
    background: transparent !important;
}

/* Special mapping for slide-out nav and footer base */
.nav-links,
.site-footer,
.directorial-desk-wrapper {
    background: #050814 !important; /* Extremely dark solid for components that need it */
}

/* 2. Glassmorphic Cards (Premium Look) using explicit --glass-base */
.notice-card,
.highlight-box,
.feature-card-legacy,
.facility-item,
.gallery-card,
.message-card,
.house-card-pro,
.glass-card,
.modal-content,
.text-modal-content,
.contact-info-card,
.card-stat,
.stat-box,
.reg-box,
.stat-item,
.premium-modal,
.text-box {
    background: var(--glass-base) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    color: var(--text-dark) !important;
}

/* Subtle Neon Glow on Hover */
.feature-card-legacy:hover,
.highlight-box:hover {
    box-shadow: 0 10px 40px rgba(255, 152, 0, 0.15) !important; /* Gold Glow */
    border-color: rgba(255, 152, 0, 0.3) !important;
}

/* Text Consistency (Zero Hidden Text) */
.feature-card-legacy p,
.highlight-box p,
.notice-card .notice-content h4,
.notice-card .notice-content p,
.notice-card .read-more,
.notice-date,
.notice-date span,
.house-card-pro p,
.message-card p,
.about-text p,
.facility-card p,
.footer-area p,
.footer-logo-desc,
.sub-heading {
    color: #ffffff !important;
}
.cta-sub,
.notice-modal-body,
.section-header p,
.nav-links li a,
.ms-text small,
.footer-col p,
.about-text strong,
.about-text em,
.about-text span {
    color: #ffffff !important;
}

/* Invisible Labels Fix */
.info-label {
    color: #ffffff !important;
}
.info-value,
.stat-box .label,
.stat-box .value,
.reg-box small,
.reg-box code,
.card-stat h3 {
    color: #ffffff !important;
}

/* Headers, Accents & Buttons */
.section-header h2,
.highlight-box h3,
.feature-card-legacy h3,
.notice-title,
.house-content h3,
.nm-title,
.logo-area h1,
.footer-col h3,
.facility-content h3,
.count-up,
.suffix,
.highlight-header,
.about-text h2,
.ms-text h3,
.about-content h2,
.school-identity h1,
.logo-area h1,
.header .school-identity h1,
.message-card h3,
.message-card h4,
.text-box h3,
.text-box h4 {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(255,255,255,0.1) !important;
}

.notice-card h4,
.notice-title,
.read-more,
.nm-title,
#nm-title,
.notice-modal-body,
.notice-modal-body p,
.close-notice-modal,
.notice-close {
    color: #ffffff !important;
}

.notice-date,
.notice-date span,
.nm-date-badge {
    color: #ff4d4d !important;
    background: transparent !important;
}

.nm-date-badge {
    border: 1px solid #ff4d4d !important;
}

/* Force dark modal backgrounds */
.text-modal-content,
.modal-content {
    background: #0a0f25 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.notice-modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.filter-btn {
    color: #ffffff !important;
    background: var(--glass-base) !important;
    border-color: rgba(255,255,255,0.1) !important;
}
.filter-btn.active {
    color: #050814 !important;
    background: var(--primary-gold) !important;
}

.excellence-section .brand-watermark,
.highlights-modern .brand-watermark {
    color: rgba(255, 255, 255, 0.03) !important;
}

.signature, .text-box .quote, .link-arrow, .about-text strong, .about-text em, .sub-heading, .divider-left {
    color: #ffffff !important;
    background-color: transparent !important;
    border-color: #ffffff !important;
}

.divider-left {
    background: #ffffff !important;
}

/* 3. Sleek Navigation & Sticky Bars */
.main-header,
.mobile-sticky-bar,
.notice-media-controls {
    background: rgba(10, 15, 37, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

.notice-doc-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    border: 1px dashed rgba(255, 255, 255, 0.2) !important;
}

.download-btn, .reset-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Fix 'View Full Document' button — must NOT use --primary-blue which is white in dark mode */
.view-btn {
    background: #1a237e !important;  /* Deep navy blue always */
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

.view-btn:hover {
    background: #ff9800 !important;
    color: #000000 !important;
}

/* Dark mode nav overlay — use midnight bg instead of white */
.nav-links {
    background-color: rgba(5, 8, 20, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.nav-links li a {
    color: #ffffff !important;
}

/* Fix navbar bar (blue strip below header) — must not turn white in dark mode */
.navbar {
    background-color: #0a0f25 !important;
}

/* Fix active nav indicator — gold highlight with dark text so it's visible */
.nav-links li a:hover,
.nav-links li a.active {
    background-color: #ff9800 !important; /* Gold */
    color: #000000 !important;            /* Dark text on gold */
}

/* Mobile-specific header background priority fix */
@media (max-width: 768px) {
    .main-header,
    header.main-header,
    .mobile-sticky-bar {
        background: #050814 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    }
    
    .school-identity h1,
    .logo-area h1,
    header .school-identity h1 {
        color: #ffffff !important;
        text-shadow: 0 1px 4px rgba(0,0,0,0.8) !important;
    }
    
    .school-identity .tagline {
        color: #f3c809 !important;
    }
}

/* Force dark card backgrounds on mobile breakpoints where style.css sets them to white */
@media (max-width: 1024px) {
    .message-card,
    .message-card.reverse {
        background: #0a0f25 !important;
        border: 1px solid rgba(255,255,255,0.05) !important;
    }
}

/* Top bar text contrast */
.top-bar {
    color: #000000 !important; /* Keep gold bg, but force dark text */
}
.top-bar a, .top-bar span, .top-bar marquee {
    color: #000000 !important;
}

/* Adjust Mobile Menu Icon */
.menu-toggle .bar {
    background-color: var(--primary-gold) !important;
}

/* Fix social icons */
.social-links a {
    background: var(--glass-base) !important;
    color: var(--primary-gold) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

/* Theme Toggle Button Style Override */
.theme-toggle-btn {
    background: #1e293b !important;
    color: var(--primary-gold) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

/* Final Section Harmonization (Location & Footer) */
.location-section,
.map-container,
.footer-minimal {
    background: transparent !important;
}

.map-container {
    background: var(--glass-base) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}

.btn-directions {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-directions:hover {
    background: var(--primary-gold) !important;
    color: #000000 !important;
}

.f-logo, .f-col h4, .f-col p, .f-col ul li a {
    color: #ffffff !important;
}

/* ======================================================
   ADVANCED MEDIA PREVIEW - DARK MODE
   ====================================================== */

/* Image inline preview wrapper */
.media-preview-wrapper {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* PDF viewer container */
.pdf-viewer-container {
    background: rgba(5, 8, 20, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* PDF toolbar */
.pdf-toolbar {
    background: rgba(0, 0, 0, 0.5) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Image load error text */
.preview-error {
    color: rgba(255, 255, 255, 0.6) !important;
}

.preview-error a {
    color: #ff9800 !important;
}

/* Notice doc button */
.notice-doc-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.notice-doc-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 152, 0, 0.5) !important;
}

/* Notice doc btn icon */
.notice-doc-btn i {
    color: #ff9800 !important;
}
