/* ===== DYC Akure — Theme System ===== */
:root {
    --color-primary: #3D1152;       /* deep purple */
    --color-accent: #E6007E;        /* magenta/pink */
    --color-gold: #D4AF37;
    --color-bg: #F7F5FA;
    --color-surface: #FFFFFF;
    --color-text: #1A1A1A;
    --color-text-muted: #5A5A5A;
    --color-border: #E4DCEE;
    --shadow: 0 4px 16px rgba(61, 17, 82, 0.08);
}

[data-theme="dark"] {
    --color-bg: #1E0A2B;
    --color-surface: #2A0C3A;
    --color-text: #F1EAF5;
    --color-text-muted: #C9B8D6;
    --color-border: #4A2560;
    --color-accent: #F0339C;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---- Navbar ---- */
.navbar {
    background: var(--color-primary);
    color: #fff;
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.navbar .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.navbar .logo img { height: 44px; width: 44px; border-radius: 50%; }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { font-weight: 500; opacity: 0.9; transition: opacity 0.2s, color 0.2s; }
.nav-links a:hover { opacity: 1; color: var(--color-gold); }
.nav-links > li { position: relative; }

/* Dropdown */
.has-dropdown .dropdown-menu {
    display: none;
    position: absolute; top: 100%; left: 0;
    background: var(--color-primary);
    min-width: 190px;
    list-style: none;
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow);
    padding: 8px 0;
    z-index: 200;
}
.has-dropdown .dropdown-menu li a {
    display: block; padding: 10px 18px; white-space: nowrap; opacity: 0.9; font-weight: 500;
}
.has-dropdown .dropdown-menu li a:hover { background: rgba(255,255,255,0.08); opacity: 1; }
.has-dropdown:hover .dropdown-menu { display: block; }
.has-dropdown.open .dropdown-menu { display: block; } /* mobile tap toggle */
.theme-toggle {
    background: transparent; border: 1.5px solid var(--color-gold);
    color: #fff; border-radius: 20px; padding: 6px 14px; cursor: pointer;
    font-size: 0.85rem;
}
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ---- Ticker ---- */
.ticker-wrap {
    background: var(--color-accent);
    color: #fff; overflow: hidden; white-space: nowrap;
    padding: 8px 0;
}
.ticker-track {
    display: inline-block;
    animation: scroll-left 30s linear infinite;
}
.ticker-track span { margin-right: 60px; font-size: 0.9rem; font-weight: 500; }
@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ---- Hero Slider ---- */
.hero-slider { position: relative; height: 500px; overflow: hidden; }
.hero-slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background-size: cover; background-position: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.35); z-index: 1; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 2; color: #fff; max-width: 700px; padding: 20px; }
.hero-content h1 { font-size: 2.2rem; margin-bottom: 12px; }
.hero-content p { font-size: 1.05rem; margin-bottom: 20px; }
.btn {
    display: inline-block; background: var(--color-gold); color: #1A1A1A;
    padding: 12px 28px; border-radius: 30px; font-weight: 600;
    transition: transform 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.hero-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.hero-dot.active { background: var(--color-gold); }

/* ---- Sections ---- */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 1.8rem; color: var(--color-primary); }
[data-theme="dark"] .section-title h2 { color: var(--color-gold); }
.section-title p { color: var(--color-text-muted); margin-top: 8px; }

/* ---- Cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); gap: 24px; justify-content: center; }
.card {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }
.card-body { padding: 18px; }
.card-body h3 { color: var(--color-primary); margin-bottom: 8px; }
[data-theme="dark"] .card-body h3 { color: var(--color-gold); }
.card-body p { color: var(--color-text-muted); font-size: 0.92rem; }
.card-meta { font-size: 0.82rem; color: var(--color-accent); margin-top: 8px; font-weight: 600; }

/* Upcoming Program card — side-by-side on desktop, stacked on mobile */
.upcoming-program-card { max-width: 700px !important; margin: 0 auto; display: flex; flex-wrap: wrap; }
.upcoming-program-flyer { width: 220px !important; flex-shrink: 0; object-fit: cover; max-height: 280px; }
@media (max-width: 640px) {
    .upcoming-program-flyer { width: 100% !important; max-height: none; aspect-ratio: 4/3; }
}

/* ---- Gallery Lightbox ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery-grid img { border-radius: 10px; cursor: pointer; aspect-ratio: 1/1; object-fit: cover; box-shadow: var(--shadow); }
.lightbox {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85);
    align-items: center; justify-content: center; z-index: 999;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 85%; border-radius: 10px; }
.lightbox-close { position: absolute; top: 24px; right: 32px; color: #fff; font-size: 2rem; cursor: pointer; }

/* ---- Popup Announcement ---- */
.popup-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    align-items: center; justify-content: center; z-index: 998; padding: 20px;
}
.popup-overlay.active { display: flex; }
.popup-box {
    background: var(--color-surface); border-radius: 16px; max-width: 420px; width: 100%;
    overflow: hidden; position: relative; box-shadow: var(--shadow); animation: popup-in 0.3s ease;
}
.popup-box img { width: 100%; height: 200px; object-fit: cover; }
.popup-body { padding: 22px; text-align: center; }
.popup-body h3 { color: var(--color-primary); margin-bottom: 8px; }
[data-theme="dark"] .popup-body h3 { color: var(--color-gold); }
.popup-body p { color: var(--color-text-muted); font-size: 0.92rem; }
.popup-close {
    position: absolute; top: 10px; right: 14px; font-size: 1.6rem; cursor: pointer;
    color: #fff; background: rgba(0,0,0,0.4); width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; z-index: 2;
}
@keyframes popup-in { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px 14px; border-radius: 8px;
    border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text);
    font-family: inherit; font-size: 0.95rem;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-weight: 500; }
.alert-success { background: #d7f5df; color: #1a6b34; }
.alert-error { background: #fbdcdc; color: #8a1f1f; }

/* ---- Footer ---- */
footer {
    background: var(--color-primary); color: #fff; padding: 48px 0 20px; margin-top: 60px;
    border-top: 4px solid var(--color-gold);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.15);
}
[data-theme="dark"] footer { background: #170621; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 24px; margin-bottom: 24px; }
.footer-grid h4 { color: var(--color-gold); margin-bottom: 12px; font-size: 1rem; }
.footer-grid p, .footer-grid a { color: rgba(255,255,255,0.8); font-size: 0.9rem; display: block; margin-bottom: 6px; }
.social-icons { display: flex; gap: 14px; margin-top: 8px; }
.social-icons a {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.social-icons a:hover { background: var(--color-gold); color: var(--color-primary); }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 16px; font-size: 0.82rem; color: rgba(255,255,255,0.6); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .nav-links {
        position: absolute; top: 72px; left: 0; right: 0; background: var(--color-primary);
        flex-direction: column; padding: 20px; display: none; gap: 16px;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .hero-content h1 { font-size: 1.6rem; }
    .hero-slider { height: 420px; }

    /* Dropdowns become inline accordions on mobile — tap to expand instead of hover */
    .has-dropdown .dropdown-menu {
        position: static; display: none; box-shadow: none; background: rgba(255,255,255,0.05);
        border-radius: 8px; margin-top: 8px; padding: 4px 0;
    }
    .has-dropdown:hover .dropdown-menu { display: none; } /* disable hover on touch */
    .has-dropdown.open .dropdown-menu { display: block; }
}