/* =============================================================
   MMIS SCHOOL — THEMES SYSTEM
   All theme color overrides + decorative overlays
   ============================================================= */

/* ── Theme Overlay Base ── */
#theme-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9000;
    overflow: hidden;
}
#theme-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    text-align: center;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    display: none;
    animation: bannerSlide 0.6s ease;
}
@keyframes bannerSlide {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
#theme-audio-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
#theme-audio-btn:hover { transform: scale(1.12); box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
[dir="rtl"] #theme-audio-btn { right: auto; left: 28px; }

/* ============================================================
   ❄️ PARTICLE ELEMENTS (shared)
   ============================================================ */
.theme-particle {
    position: absolute;
    top: -60px;
    animation: particleFall linear infinite;
    pointer-events: none;
    user-select: none;
}
@keyframes particleFall {
    0%   { transform: translateY(-60px) rotate(0deg);   opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0.3; }
}

/* ============================================================
   🏫 THEME: DEFAULT
   ============================================================ */
body.theme-default {
    --navy:      #002147;
    --blue:      #003f8a;
    --mid-blue:  #0056b3;
    --gold:      #FFC107;
    --gold-dark: #e6ac00;
}

/* ============================================================
   🌙 THEME: RAMADAN
   ============================================================ */
body.theme-ramadan {
    --navy:      #1a0038;
    --blue:      #3d0075;
    --mid-blue:  #6600cc;
    --gold:      #FFD700;
    --gold-dark: #FFC107;
    background: #0f0020;
}
body.theme-ramadan .top-accent-bar {
    background: linear-gradient(90deg, #1a0038, #3d0075, #1a0038) !important;
}
body.theme-ramadan .site-header {
    background: linear-gradient(135deg, #f8f0ff 0%, #fff8e1 100%) !important;
    border-bottom: 3px solid #FFD700 !important;
}
body.theme-ramadan .main-nav {
    background: linear-gradient(90deg, #1a0038 0%, #3d0075 50%, #1a0038 100%) !important;
}
body.theme-ramadan .hero-section,
body.theme-ramadan section:first-of-type {
    background: linear-gradient(135deg, #0f0020 0%, #1a0038 40%, #3d0075 100%) !important;
}
body.theme-ramadan footer {
    background: linear-gradient(135deg, #0f0020 0%, #1a0038 100%) !important;
}
/* Force white on ALL footer text — overrides inline color:#ccc styles */
body.theme-ramadan footer h4,
body.theme-ramadan footer h3,
body.theme-ramadan footer p,
body.theme-ramadan footer li,
body.theme-ramadan footer span,
body.theme-ramadan footer a,
body.theme-ramadan footer div {
    color: #ffffff !important;
}
body.theme-ramadan footer a:hover {
    color: #FFD700 !important;
}
body.theme-ramadan footer h4 {
    border-bottom-color: #FFD700 !important;
}
body.theme-ramadan footer .footer-bottom,
body.theme-ramadan footer [style*="color:#aaa"],
body.theme-ramadan footer [style*="color: #aaa"] {
    color: rgba(255,255,255,0.75) !important;
}
body.theme-ramadan .header-short-name { color: #3d0075 !important; }
body.theme-ramadan .header-full-name  { color: #6600cc !important; }
/* Ramadan sparkle stars */
body.theme-ramadan #theme-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle 2px at 10% 15%, #FFD700 100%, transparent 100%),
        radial-gradient(circle 1px at 25% 40%, #FFD700 100%, transparent 100%),
        radial-gradient(circle 2px at 45% 10%, #FFD700 100%, transparent 100%),
        radial-gradient(circle 1px at 60% 30%, #fff 100%, transparent 100%),
        radial-gradient(circle 2px at 75% 20%, #FFD700 100%, transparent 100%),
        radial-gradient(circle 1px at 88% 50%, #FFD700 100%, transparent 100%),
        radial-gradient(circle 2px at 15% 70%, #fff 100%, transparent 100%),
        radial-gradient(circle 1px at 35% 80%, #FFD700 100%, transparent 100%),
        radial-gradient(circle 2px at 55% 65%, #fff 100%, transparent 100%),
        radial-gradient(circle 1px at 80% 75%, #FFD700 100%, transparent 100%);
    animation: ramadanTwinkle 3s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes ramadanTwinkle {
    0%   { opacity: 0.3; }
    50%  { opacity: 1; }
    100% { opacity: 0.4; }
}
#theme-banner.theme-ramadan {
    background: linear-gradient(90deg, #1a0038, #3d0075, #FFD700, #3d0075, #1a0038);
    background-size: 300% 100%;
    animation: bannerSlide 0.6s ease, ramadanGlow 4s linear infinite;
    color: #FFD700;
    display: block !important;
    text-shadow: 0 0 10px rgba(255,215,0,0.8);
}
@keyframes ramadanGlow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
#theme-audio-btn.theme-ramadan {
    background: linear-gradient(135deg, #3d0075, #6600cc);
    color: #FFD700;
    display: flex !important;
}

/* ============================================================
   🎊 THEME: EID AL-FITR
   ============================================================ */
body.theme-eid_fitr {
    --navy:      #005c2e;
    --blue:      #007a3e;
    --mid-blue:  #00a352;
    --gold:      #FFD700;
    --gold-dark: #FFC107;
}
body.theme-eid_fitr .top-accent-bar {
    background: linear-gradient(90deg, #005c2e, #007a3e) !important;
}
body.theme-eid_fitr .site-header {
    background: linear-gradient(135deg, #f0fff4, #fffde7) !important;
    border-bottom: 3px solid #FFD700 !important;
}
body.theme-eid_fitr .main-nav {
    background: linear-gradient(90deg, #005c2e, #007a3e, #005c2e) !important;
}
body.theme-eid_fitr footer {
    background: linear-gradient(135deg, #004d26, #005c2e) !important;
}
body.theme-eid_fitr .header-short-name { color: #005c2e !important; }
body.theme-eid_fitr .header-full-name  { color: #007a3e !important; }
#theme-banner.theme-eid_fitr {
    background: linear-gradient(90deg, #005c2e, #FFD700, #005c2e);
    color: #fff;
    display: block !important;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}
#theme-audio-btn.theme-eid_fitr {
    background: linear-gradient(135deg, #005c2e, #00a352);
    color: #FFD700;
    display: flex !important;
}

/* ============================================================
   🌟 THEME: EID AL-ADHA
   ============================================================ */
body.theme-eid_adha {
    --navy:      #004d4d;
    --blue:      #006666;
    --mid-blue:  #008080;
    --gold:      #FFD700;
    --gold-dark: #FFA500;
}
body.theme-eid_adha .top-accent-bar {
    background: linear-gradient(90deg, #004d4d, #006666) !important;
}
body.theme-eid_adha .site-header {
    background: linear-gradient(135deg, #e6ffff, #fffde7) !important;
    border-bottom: 3px solid #FFD700 !important;
}
body.theme-eid_adha .main-nav {
    background: linear-gradient(90deg, #004d4d, #008080, #004d4d) !important;
}
body.theme-eid_adha footer {
    background: linear-gradient(135deg, #003333, #004d4d) !important;
}
body.theme-eid_adha .header-short-name { color: #004d4d !important; }
body.theme-eid_adha .header-full-name  { color: #006666 !important; }
#theme-banner.theme-eid_adha {
    background: linear-gradient(90deg, #004d4d, #FFD700, #004d4d);
    color: #fff;
    display: block !important;
}
#theme-audio-btn.theme-eid_adha {
    background: linear-gradient(135deg, #004d4d, #008080);
    color: #FFD700;
    display: flex !important;
}

/* ============================================================
   🦅 THEME: OCTOBER 6 — VICTORY DAY (عيد نصر السادس من أكتوبر)
   ============================================================ */
body.theme-october6 {
    --navy:      #a00000;
    --blue:      #c00000;
    --mid-blue:  #e00000;
    --gold:      #ffffff;
    --gold-dark: #f0f0f0;
}
body.theme-october6 .top-accent-bar {
    /* Egyptian flag: red | white | black */
    background: linear-gradient(180deg,
        #cc0000 0%, #cc0000 33%,
        #ffffff 33%, #ffffff 66%,
        #1a1a1a 66%, #1a1a1a 100%) !important;
    color: #cc0000 !important;
    font-weight: 900;
    border-bottom: 2px solid #cc0000;
}
body.theme-october6 .top-accent-bar .lang-switcher a { color: #cc0000 !important; }
body.theme-october6 .top-accent-bar .lang-active { color: #cc0000 !important; font-weight: 900; }
body.theme-october6 .site-header {
    background: linear-gradient(135deg, #fff8f8, #fff) !important;
    border-bottom: 4px solid #cc0000 !important;
}
body.theme-october6 .main-nav {
    background: linear-gradient(90deg, #1a1a1a 0%, #cc0000 50%, #1a1a1a 100%) !important;
}
body.theme-october6 footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d0000 100%) !important;
}
body.theme-october6 .header-short-name { color: #cc0000 !important; }
body.theme-october6 .header-full-name  { color: #a00000 !important; }
body.theme-october6 .hbtn-apply {
    background: #cc0000 !important;
    border-color: #cc0000 !important;
    color: #fff !important;
}
#theme-banner.theme-october6 {
    background: linear-gradient(90deg, #cc0000, #1a1a1a, #cc0000);
    color: #FFD700;
    display: block !important;
    font-size: 17px;
    letter-spacing: 2px;
    border-bottom: 3px solid #FFD700;
}
#theme-audio-btn.theme-october6 {
    background: linear-gradient(135deg, #cc0000, #1a1a1a);
    color: #FFD700;
    display: flex !important;
}

/* ============================================================
   🇪🇬 THEME: JANUARY 25 REVOLUTION
   ============================================================ */
body.theme-jan25 {
    --navy:      #8b0000;
    --blue:      #b00000;
    --mid-blue:  #cc0000;
    --gold:      #FFD700;
    --gold-dark: #FFC107;
}
body.theme-jan25 .top-accent-bar {
    background: linear-gradient(90deg, #8b0000, #cc0000) !important;
}
body.theme-jan25 .site-header {
    background: linear-gradient(135deg, #fff5f5, #fff) !important;
    border-bottom: 4px solid #cc0000 !important;
}
body.theme-jan25 .main-nav {
    background: linear-gradient(90deg, #1a1a1a, #8b0000, #1a1a1a) !important;
}
body.theme-jan25 footer {
    background: linear-gradient(135deg, #1a1a1a, #2d0000) !important;
}
body.theme-jan25 .header-short-name { color: #8b0000 !important; }
body.theme-jan25 .header-full-name  { color: #b00000 !important; }
#theme-banner.theme-jan25 {
    background: linear-gradient(90deg, #8b0000, #cc0000, #FFD700, #cc0000, #8b0000);
    color: #fff;
    display: block !important;
}
#theme-audio-btn.theme-jan25 {
    background: linear-gradient(135deg, #8b0000, #cc0000);
    color: #FFD700;
    display: flex !important;
}

/* ============================================================
   📚 THEME: BACK TO SCHOOL
   ============================================================ */
body.theme-back_to_school {
    --navy:      #e65100;
    --blue:      #f57c00;
    --mid-blue:  #ff9800;
    --gold:      #4caf50;
    --gold-dark: #388e3c;
}
body.theme-back_to_school .top-accent-bar {
    background: linear-gradient(90deg, #e65100, #f57c00) !important;
}
body.theme-back_to_school .site-header {
    background: linear-gradient(135deg, #fff8e1, #fff3e0) !important;
    border-bottom: 4px solid #ff9800 !important;
}
body.theme-back_to_school .main-nav {
    background: linear-gradient(90deg, #e65100, #f57c00, #e65100) !important;
}
body.theme-back_to_school footer {
    background: linear-gradient(135deg, #bf360c, #e65100) !important;
}
body.theme-back_to_school .header-short-name { color: #e65100 !important; }
body.theme-back_to_school .header-full-name  { color: #f57c00 !important; }
body.theme-back_to_school .hbtn-apply {
    background: #4caf50 !important;
    border-color: #4caf50 !important;
    color: #fff !important;
}
#theme-banner.theme-back_to_school {
    background: linear-gradient(90deg, #e65100, #ff9800, #4caf50, #ff9800, #e65100);
    color: #fff;
    display: block !important;
}
#theme-audio-btn.theme-back_to_school {
    background: linear-gradient(135deg, #e65100, #ff9800);
    color: #fff;
    display: flex !important;
}

/* ============================================================
   🎓 THEME: GRADUATION
   ============================================================ */
body.theme-graduation {
    --navy:      #1a1a4e;
    --blue:      #2d2d8f;
    --mid-blue:  #3f3fcc;
    --gold:      #FFD700;
    --gold-dark: #FFC107;
}
body.theme-graduation .top-accent-bar {
    background: linear-gradient(90deg, #1a1a4e, #2d2d8f) !important;
}
body.theme-graduation .site-header {
    background: linear-gradient(135deg, #f5f5ff, #fffde7) !important;
    border-bottom: 4px solid #FFD700 !important;
}
body.theme-graduation .main-nav {
    background: linear-gradient(90deg, #1a1a4e 0%, #2d2d8f 50%, #1a1a4e 100%) !important;
}
body.theme-graduation footer {
    background: linear-gradient(135deg, #0d0d26, #1a1a4e) !important;
}
body.theme-graduation .header-short-name { color: #1a1a4e !important; }
body.theme-graduation .header-full-name  { color: #2d2d8f !important; }
#theme-banner.theme-graduation {
    background: linear-gradient(90deg, #1a1a4e, #FFD700, #1a1a4e);
    color: #FFD700;
    display: block !important;
    letter-spacing: 2px;
}
#theme-audio-btn.theme-graduation {
    background: linear-gradient(135deg, #1a1a4e, #2d2d8f);
    color: #FFD700;
    display: flex !important;
}

/* ============================================================
   ❄️ THEME: WINTER
   ============================================================ */
body.theme-winter {
    --navy:      #0d3b6e;
    --blue:      #1565c0;
    --mid-blue:  #1976d2;
    --gold:      #e3f2fd;
    --gold-dark: #bbdefb;
    background: #e8f4fd;
}
body.theme-winter .top-accent-bar {
    background: linear-gradient(90deg, #0d3b6e, #1565c0) !important;
}
body.theme-winter .site-header {
    background: linear-gradient(135deg, #e3f2fd, #ffffff) !important;
    border-bottom: 4px solid #90caf9 !important;
}
body.theme-winter .main-nav {
    background: linear-gradient(90deg, #0d3b6e, #1565c0, #0d3b6e) !important;
}
body.theme-winter footer {
    background: linear-gradient(135deg, #062040, #0d3b6e) !important;
}
body.theme-winter .header-short-name { color: #0d3b6e !important; }
body.theme-winter .header-full-name  { color: #1565c0 !important; }
body.theme-winter .hbtn-apply {
    background: #90caf9 !important;
    border-color: #90caf9 !important;
    color: #0d3b6e !important;
}
#theme-banner.theme-winter {
    background: linear-gradient(90deg, #0d3b6e, #1976d2, #e3f2fd, #1976d2, #0d3b6e);
    color: #fff;
    display: block !important;
}
#theme-audio-btn.theme-winter {
    background: linear-gradient(135deg, #0d3b6e, #1565c0);
    color: #e3f2fd;
    display: flex !important;
}

/* ============================================================
   🌸 THEME: SPRING
   ============================================================ */
body.theme-spring {
    --navy:      #1b5e20;
    --blue:      #2e7d32;
    --mid-blue:  #388e3c;
    --gold:      #f48fb1;
    --gold-dark: #ec407a;
    background: #f9fbe7;
}
body.theme-spring .top-accent-bar {
    background: linear-gradient(90deg, #1b5e20, #2e7d32) !important;
}
body.theme-spring .site-header {
    background: linear-gradient(135deg, #f1f8e9, #fce4ec) !important;
    border-bottom: 4px solid #f48fb1 !important;
}
body.theme-spring .main-nav {
    background: linear-gradient(90deg, #1b5e20, #2e7d32, #1b5e20) !important;
}
body.theme-spring footer {
    background: linear-gradient(135deg, #0d3014, #1b5e20) !important;
}
body.theme-spring .header-short-name { color: #1b5e20 !important; }
body.theme-spring .header-full-name  { color: #2e7d32 !important; }
body.theme-spring .hbtn-apply {
    background: #f48fb1 !important;
    border-color: #f48fb1 !important;
    color: #fff !important;
}
#theme-banner.theme-spring {
    background: linear-gradient(90deg, #2e7d32, #f48fb1, #2e7d32);
    color: #fff;
    display: block !important;
}
#theme-audio-btn.theme-spring {
    background: linear-gradient(135deg, #2e7d32, #f48fb1);
    color: #fff;
    display: flex !important;
}

/* ============================================================
   🎆 THEME: NEW YEAR
   ============================================================ */
body.theme-new_year {
    --navy:      #1a1a1a;
    --blue:      #2d2d2d;
    --mid-blue:  #444;
    --gold:      #FFD700;
    --gold-dark: #FFC107;
    background: #0a0a1a;
}
body.theme-new_year .top-accent-bar {
    background: linear-gradient(90deg, #0a0a1a, #FFD700, #0a0a1a) !important;
    background-size: 300% !important;
    animation: goldShimmer 4s linear infinite;
}
@keyframes goldShimmer {
    0%   { background-position: 0%; }
    100% { background-position: 300%; }
}
body.theme-new_year .site-header {
    background: linear-gradient(135deg, #fffde7, #fff8e1) !important;
    border-bottom: 4px solid #FFD700 !important;
}
body.theme-new_year .main-nav {
    background: linear-gradient(90deg, #0a0a1a, #2d2d2d, #0a0a1a) !important;
}
body.theme-new_year footer {
    background: linear-gradient(135deg, #050510, #0a0a1a) !important;
}
body.theme-new_year .header-short-name { color: #1a1a1a !important; }
body.theme-new_year .header-full-name  { color: #2d2d2d !important; }
#theme-banner.theme-new_year {
    background: linear-gradient(90deg, #0a0a1a, #FFD700, #0a0a1a);
    background-size: 300%;
    animation: bannerSlide 0.6s ease, goldShimmer 3s linear infinite;
    color: #FFD700;
    display: block !important;
    text-shadow: 0 0 12px rgba(255,215,0,0.9);
    font-size: 17px;
}
#theme-audio-btn.theme-new_year {
    background: linear-gradient(135deg, #1a1a1a, #444);
    color: #FFD700;
    display: flex !important;
    box-shadow: 0 0 20px rgba(255,215,0,0.4);
}

/* ============================================================
   THEME PARTICLES — per-theme colours
   ============================================================ */
.particle-ramadan      { color: #FFD700; font-size: 20px; }
.particle-eid_fitr     { color: #FFD700; font-size: 18px; }
.particle-eid_adha     { color: #FFD700; font-size: 18px; }
.particle-october6     { color: #FFD700; font-size: 22px; }
.particle-jan25        { color: #FFD700; font-size: 20px; }
.particle-back_to_school { font-size: 22px; }
.particle-graduation   { color: #FFD700; font-size: 20px; }
.particle-winter       { color: #c8e6ff; font-size: 18px; }
.particle-spring       { color: #f48fb1; font-size: 16px; }
.particle-new_year     { color: #FFD700; font-size: 16px; }
