/* Whole-site soft blue / black themes, including standalone admin screens.
   Keep this stylesheet last. Photos and media overlays retain their original colours. */
html:root, html[data-theme="light"] {
    color-scheme: light;
    --bg-primary: #f3f7fc; --bg-secondary: #fff; --glass-bg: #fff;
    --text-primary: #142b49; --text-secondary: #4c6078;
    --glass-border: #d6e2ef; --accent: #185abc; --accent-glow: rgba(24,90,188,.14);
    --footer-navy: #eaf2fc; --footer-navy-dark: #e3edf9;
    --glass-footer-bg: #fff; --glass-footer-border: #cbdced;
    --footer-text-muted: #4c6078; --orange-accent: #185abc;
    --card-shadow: 0 8px 28px rgba(31,69,112,.07);
    --theme-hover: #e8f1fc; --theme-on-accent: #fff;
}
html[data-theme="dark"] {
    color-scheme: dark;
    --bg-primary: #101216; --bg-secondary: #1b2028; --glass-bg: #1b2028;
    --text-primary: #f5f7fb; --text-secondary: #c2cbd8;
    --glass-border: #3b4656; --accent: #91bfff; --accent-glow: rgba(145,191,255,.16);
    --footer-navy: #151a22; --footer-navy-dark: #101216;
    --glass-footer-bg: #1b2028; --glass-footer-border: #3b4656;
    --footer-text-muted: #c2cbd8; --orange-accent: #91bfff;
    --card-shadow: 0 8px 28px rgba(0,0,0,.24);
    --theme-hover: #28374c; --theme-on-accent: #102039;
}
html, body { background: var(--bg-primary) !important; color: var(--text-primary); }
/* Local footer variables formerly forced white text in both modes. */
html[data-theme="light"] .premium-footer { --text-primary: #142b49; --text-secondary: #4c6078; }
html[data-theme="dark"] .premium-footer { --text-primary: #f5f7fb; --text-secondary: #c2cbd8; }
.home-hero, .blue-section, .premium-footer, .top-bar-container, .top-header,
.wcu-card, .award-banner, .highlight-quote, .contact-form-wrapper,
.login-card, .icon-top, .social-btn.google, .nav-dropdown-content,
html[data-theme] .nav-dropdown-content, .blue-section .home-card {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--glass-border) !important;
}
.wcu-card, .award-banner, .login-card { border: 1px solid var(--glass-border); }
.hero-bg-glow, .footer-blobs, .bg-shapes, .bg-shape, .hero-bg-blobs, #cursor-glow { display: none !important; }
.top-bar-container a, .top-right a, .social-icon, .dir-btn, .float-btn,
.service-list a:hover, .service-list .arrow, .policy-links a, .back-btn,
.login-card h2, .login-card label, .login-card .forgot-pwd a {
    color: var(--text-primary) !important;
}
.login-card .subtitle, .login-card .divider, .login-card .input-group i,
.blue-section .home-card-body p { color: var(--text-secondary) !important; }
.social-icon, .dir-btn, .float-btn, .page-item, .btn-outline {
    background: var(--bg-secondary); color: var(--text-primary);
    border-color: var(--glass-border);
}
.btn-outline:hover, .dir-btn:hover, .social-icon:hover,
.page-item:hover, .social-btn.google:hover { background: var(--theme-hover) !important; color: var(--text-primary) !important; }
html .nav-dropdown-content a { color: var(--text-primary) !important; }
html .nav-dropdown-content a:hover { background: var(--theme-hover); }
.nav-dropdown:focus-within .nav-dropdown-content { opacity: 1; visibility: visible; transform: none; }
.btn-premium, .btn-consult, .btn-submit, .map-btn, .page-item.active {
    background: var(--accent) !important; color: var(--theme-on-accent) !important;
    text-decoration: none;
}
input:not([type="checkbox"]):not([type="radio"]), textarea, select, option {
    background: var(--bg-secondary) !important; color: var(--text-primary) !important;
    border-color: var(--glass-border) !important;
}
input::placeholder, textarea::placeholder { color: var(--text-secondary); opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible,
a:focus-visible, button:focus-visible { outline: 2px solid var(--orange-accent); outline-offset: 4px; }
/* Fixed position keeps the control accessible on every page and on phones. */
#site-theme-toggle {
    position: fixed; bottom: max(20px, env(safe-area-inset-bottom));
    left: max(20px, env(safe-area-inset-left)); z-index: 10001;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 46px; padding: 10px 16px; border-radius: 999px;
    border: 1px solid var(--glass-border); background: var(--accent);
    color: var(--theme-on-accent); font: 600 14px/1.2 system-ui, sans-serif;
    box-shadow: var(--card-shadow); cursor: pointer;
}
#site-theme-toggle .theme-icon { font-size: 23px; line-height: 1; }
#site-theme-toggle:hover { transform: translateY(-2px); }
body { padding-bottom: 80px; }
@media (max-width: 992px) {
    .navbar-glass { position: relative; top: auto; left: auto; transform: none; margin: 12px auto; flex-wrap: wrap; gap: 12px; padding: 15px; }
    .nav-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
    .navbar-glass .nav-links a { margin-left: 0; }
    .nav-dropdown:focus-within .nav-dropdown-content { display: block; }
    .top-bar-container { flex-wrap: wrap; gap: 10px; }
    .home-about-img { width: 100%; }
    .grid-3, .content-grid, .video-grid, .footer-container { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    #site-theme-toggle, body { transition: none; }
}

.hero-title, .year-number { background: none; -webkit-text-fill-color: currentColor; color: var(--orange-accent); }
.hero-logo-text { color: var(--text-primary); }
.social-icon::before { background: var(--accent); color: var(--bg-primary); }

/* Soft blue light theme: quiet section backgrounds, white cards, navy type. */
html[data-theme="light"] .home-hero {
    background: linear-gradient(120deg, #f4f8fe 0%, #e7f0fc 100%) !important;
    border-bottom: 1px solid var(--glass-border);
}
html[data-theme="light"] .blue-section,
html[data-theme="light"] .premium-footer {
    background: #eaf2fc !important;
    border-block: 1px solid var(--glass-border);
}
html[data-theme="light"] .top-bar-container { background: #e7eff9 !important; }
html[data-theme="light"] .wcu-card,
html[data-theme="light"] .award-banner,
html[data-theme="light"] .contact-form-wrapper,
html[data-theme="light"] .login-card,
html[data-theme="light"] .icon-top,
html[data-theme="light"] .social-btn.google,
html[data-theme="light"] .nav-dropdown-content,
html[data-theme="light"] .blue-section .home-card {
    background: #fff !important;
    box-shadow: var(--card-shadow);
}
html[data-theme="light"] .highlight-quote { background: #e8f1fc !important; }
html[data-theme="light"] .hero-title { color: #142b49; }
html[data-theme="light"] .wcu-icon { color: #185abc; }
html[data-theme="light"] .hero-portrait { filter: drop-shadow(0 16px 28px rgba(31,69,112,.16)); }
html[data-theme="light"] .social-icon,
html[data-theme="light"] .float-btn { background: #fff; }
/* Consistent spacing and typography for both themes. */
body { line-height: 1.7; }
.home-hero { min-height: 76vh; padding: 110px 6% 75px; }
.home-hero-container { max-width: 1200px; gap: clamp(28px, 4vw, 64px); }
.hero-content { min-width: 0; }
.hero-logo-text { font-size: clamp(.95rem, 1.5vw, 1.2rem); line-height: 1.5; }
.hero-title { font-size: clamp(2.2rem, 4.3vw, 4rem); line-height: 1.12; letter-spacing: -.04em; max-width: 760px; }
.hero-portrait { border-radius: 24px; max-width: 420px; }
.home-about { max-width: 1200px; gap: 48px; margin-block: 80px; }
.home-about-content { text-align: left; }
.bio-text { line-height: 1.8; }
.home-card-body { padding: 28px; }
.home-card-body h3 { line-height: 1.4; }
.home-card, .wcu-card, .content-card, .glass-panel { box-shadow: var(--card-shadow); }
.wcu-card:hover { box-shadow: var(--card-shadow); }
.home-card:hover, .wcu-card:hover { transform: translateY(-4px); }
.grid-3 { gap: 24px; }
.section-header-flex { align-items: center; gap: 24px; }
.section-header-flex h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.25; }
.btn-premium, .btn-outline, .btn-consult { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; line-height: 1.4; }
.navbar-glass { border-radius: 18px; box-shadow: var(--card-shadow); }
.footer-container { gap: 24px; }
.glass-panel { padding: 30px; }
@media (min-width: 993px) {
    .navbar-glass .nav-links { display: flex; align-items: center; gap: 22px; }
    .navbar-glass .nav-links a { margin-left: 0; font-size: .9rem; }
}
@media (max-width: 992px) {
    .home-hero { min-height: auto; padding: 48px 6% 56px; }
    .home-hero-container { gap: 36px; }
    .home-about { margin-block: 56px; gap: 28px; }
    .hero-image-wrapper { justify-content: center; }
    .hero-portrait { max-width: 350px; }
    .hero-title { margin-inline: auto; }
    .hero-logo-text { justify-content: center; }
}
@media (max-width: 600px) {
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-trophies { flex-wrap: wrap; }
    .hero-trophy { max-width: 20%; object-fit: contain; }
    .banner-slider-container { height: 300px; }
    .banner-slide h2 { font-size: 2rem !important; text-align: center; padding: 20px; }
    .blue-section { padding: 56px 6%; }
    .glass-panel, .home-card-body { padding: 22px; }
    .year-badge { gap: 16px; padding: 18px; }
    .year-number { font-size: 2.7rem; }
    .year-text { font-size: .8rem; }
    .top-bar-left span { display: block; margin-left: 0 !important; }
    .login-card { padding: 48px 24px 28px; }
}

/* Opaque navigation surfaces keep links readable above photos while scrolling. */
html:root {
    --nav-bg: #ffffff;
    --nav-text: #203751;
    --nav-border: #c7d6e8;
    --nav-shadow: 0 8px 28px rgba(20,43,73,.14);
}
html[data-theme="dark"] {
    --nav-bg: #202936;
    --nav-text: #f5f7fb;
    --nav-border: #53647a;
    --nav-shadow: 0 8px 30px rgba(0,0,0,.4);
}
html .navbar-glass {
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
html .navbar-glass .logo a {
    color: var(--nav-text) !important;
    text-shadow: none !important;
    font-weight: 750;
}
html .navbar-glass .nav-links a {
    color: var(--nav-text);
    font-weight: 650;
    text-shadow: none;
    border-radius: 7px;
}
html .navbar-glass .nav-links > a,
html .navbar-glass .nav-dropdown > a { padding: 8px 6px; }
html .navbar-glass .nav-links a:hover,
html .navbar-glass .nav-links a:focus-visible {
    background: var(--theme-hover);
    color: var(--accent) !important;
}
html[data-theme] .nav-dropdown-content {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
}
html .nav-dropdown-content a { line-height: 1.5; }
@media (min-width: 993px) {
    .navbar-glass .nav-links { gap: 10px; }
    .navbar-glass .logo { max-width: 34%; line-height: 1.35; }
    .navbar-glass .nav-dropdown:last-of-type .nav-dropdown-content { left: auto; right: 0; }
}
/* Separate page, section and card surfaces instead of using black everywhere. */
html[data-theme="dark"] .home-hero {
    background: linear-gradient(120deg, #12161d, #202c3c) !important;
    border-bottom: 1px solid var(--glass-border);
}
html[data-theme="dark"] .blue-section,
html[data-theme="dark"] .premium-footer {
    background: #151a22 !important;
    border-block: 1px solid var(--glass-border);
}
html[data-theme="dark"] .top-bar-container,
html[data-theme="dark"] .top-header { background: #171d26 !important; }
html[data-theme="dark"] .wcu-card,
html[data-theme="dark"] .award-banner,
html[data-theme="dark"] .contact-form-wrapper,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .icon-top,
html[data-theme="dark"] .social-btn.google,
html[data-theme="dark"] .blue-section .home-card {
    background: var(--bg-secondary) !important;
}
html[data-theme="dark"] .highlight-quote { background: #202d40 !important; }
html[data-theme="dark"] .hero-title,
html[data-theme="dark"] .year-number { color: #b5d3ff; }
html[data-theme="dark"] .hero-portrait { filter: drop-shadow(0 16px 28px rgba(0,0,0,.3)); }
html[data-theme="dark"] .gradient-text {
    background: none; color: #b5d3ff; -webkit-text-fill-color: currentColor;
}
html .btn-outline { border: 1px solid var(--glass-border); }
html .btn-outline:hover { border-color: var(--accent); }
html .bio-text { line-height: 1.8; }
html .social-icon::before { color: var(--theme-on-accent); }
html .btn-premium:hover, html .btn-consult:hover,
html .btn-submit:hover, html .map-btn:hover { box-shadow: 0 6px 20px var(--accent-glow); }
html[data-theme] .float-wa { background: #167c47; color: #fff !important; border-color: #26975e; }
html[data-theme] .float-call { background: #185abc; color: #fff !important; border-color: #4d89df; }
html[data-theme="dark"] .premium-alert.success { color: #6ee7b7; }
html[data-theme="dark"] .premium-alert.error { color: #fca5a5; }
html[data-theme="dark"] .details-meta span[style] {
    background: var(--accent) !important; color: var(--theme-on-accent) !important;
}
html .custom-checkbox input:checked ~ .checkmark::after { color: var(--theme-on-accent); }
html .custom-checkbox input:focus-visible ~ .checkmark,
html .custom-radio input:focus-visible ~ .radio-btn { outline: 2px solid var(--accent); outline-offset: 3px; }
#site-theme-toggle { border: 1px solid var(--accent); }
@media (max-width: 992px) {
    html .navbar-glass .nav-links { width: 100%; gap: 5px 10px; }
    html .navbar-glass .nav-links > a { align-self: center; }
    html .nav-dropdown-content { min-width: 0; width: min(280px, 75vw); padding: 8px; }
    html .nav-dropdown-content a { padding: 10px; }
}
