/* ============================================
   🌙 Ramadan Kareem Theme — Custom Image Edition
   Scope LMS — scopehrd.org
   Layout matching reference design
   ============================================ */

:root {
    --ramadan-gold: #D4A843;
    --ramadan-gold-light: #F0D68A;
    --ramadan-gold-bright: #FFD700;
    --ramadan-deep-purple: #1A0533;
    --ramadan-purple: #2D1B4E;
}

/* Hidden state */
body.ramadan-hidden .ramadan-overlay,
body.ramadan-hidden .ramadan-banner,
body.ramadan-hidden .ramadan-navbar-accent::after {
    display: none !important;
}

/* Prevent horizontal scroll */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
    padding-top: 20px;
    /* Push content down by banner height */
}

/* If banner is hidden, remove padding */
body.ramadan-hidden {
    padding-top: 0 !important;
}

/* ============================================
   ✨ GREETING BANNER (Top Strip)
   ============================================ */
.ramadan-banner {
    position: fixed;
    /* Fixed to stay at top */
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, #0B0B3B 0%, #1A0533 50%, #2D1B4E 100%);
    color: #fff;
    text-align: center;
    padding: 0;
    z-index: 9999;
    overflow: hidden;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    /* Add shadow for depth */
}

/* Starry background */
.ramadan-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    z-index: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, #fff 100%, transparent),
        radial-gradient(1.5px 1.5px at 25% 60%, #FFD700 100%, transparent),
        radial-gradient(1px 1px at 50% 15%, #fff 100%, transparent),
        radial-gradient(1px 1px at 70% 40%, #FFD700 100%, transparent),
        radial-gradient(1.5px 1.5px at 85% 70%, #fff 100%, transparent),
        radial-gradient(1px 1px at 95% 25%, #FFD700 100%, transparent);
    animation: bannerStarsMove 30s linear infinite;
}

@keyframes bannerStarsMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Banner inner */
.ramadan-banner-inner {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 20px;
}

/* Text container */
.ramadan-banner-text {
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

/* Crescent SVG in banner */
.banner-crescent {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}

/* Main text */
.banner-main-text {
    font-family: 'Rubik', 'Cairo', 'Tajawal', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #FFFFFF 0%, #FFD700 25%, #FFF8DC 50%, #FFD700 75%, #FFFFFF 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: bannerTextShine 4s linear infinite;
}

@keyframes bannerTextShine {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

/* Bottom golden border */
.ramadan-banner-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #FFD700 50%, transparent 100%);
    opacity: 0.8;
}

/* ============================================
   OVERLAY (Full-page fixed container)
   ============================================ */
.ramadan-overlay {
    position: fixed;
    /* Fixed to screen */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Full height to allow elements to be placed anywhere */
    pointer-events: none;
    z-index: 9990;
    overflow: visible;
    max-width: 100vw;
}

/* ============================================
   🌙 HERO GRAPHIC — Moon & Lantern (LEFT side)
   Matches reference: large image on the LEFT,
   starts from top, overlaps navbar area
   ============================================ */
.ramadan-hero-graphic {
    position: fixed;
    /* Fixed relative to screen */
    top: 55px;
    /* Below banner */
    right: 0;
    left: auto;
    width: 380px;
    max-width: 35vw;
    z-index: 9991;
    filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.15));
    animation: heroFloat 8s ease-in-out infinite;
    /* Fade out the top part to show header/navbar behind it */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 30%, black 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 30%, black 100%);
    pointer-events: none;
    /* Ensure clicks pass through */
    opacity: 0.95;
    /* Slight transparency overall */
}

/* RTL: flip to LEFT side */
[dir="rtl"] .ramadan-hero-graphic {
    right: auto;
    left: 0;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ============================================
   🌿 DECORATION BRANCH — TOP-RIGHT corner
   Matches reference: hanging from top-right,
   compact width, elegant draping decoration
   ============================================ */
.ramadan-decoration-branch {
    position: fixed;
    /* Explicitly fixed */
    top: 55px;
    /* Start below the fixed banner */
    left: 0;
    right: auto;
    width: 300px;
    max-width: 28vw;
    z-index: 9992;
    pointer-events: none;
}

/* RTL: flip to TOP-RIGHT */
[dir="rtl"] .ramadan-decoration-branch {
    left: auto;
    right: 0;
}

.branch-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ============================================
   NAVBAR ACCENT (golden bottom border on nav)
   ============================================ */
.ramadan-navbar-accent {
    position: relative;
}

.ramadan-navbar-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--ramadan-gold-bright) 50%, transparent 100%);
    opacity: 0.7;
}

/* ============================================
   📱 RESPONSIVE DESIGN
   ============================================ */

/* ---- LARGE DESKTOP (min-width: 1400px) ---- */
@media (min-width: 1400px) {
    .ramadan-hero-graphic {
        width: 420px;
    }

    .ramadan-decoration-branch {
        width: 340px;
    }
}

/* ---- TABLET (max-width: 992px) ---- */
@media (max-width: 992px) {
    .ramadan-overlay {
        height: 400px;
    }

    .ramadan-hero-graphic {
        width: 260px;
        max-width: 30vw;
    }

    .ramadan-decoration-branch {
        width: 200px;
        max-width: 25vw;
    }

    .banner-main-text {
        font-size: 17px;
    }
}

/* ---- PHONE (max-width: 768px) ---- */
@media (max-width: 768px) {
    .ramadan-overlay {
        height: 320px;
    }

    .ramadan-hero-graphic {
        width: 180px;
        max-width: 35vw;
        top: 15px;
    }

    .ramadan-decoration-branch {
        width: 140px;
        top: 10px;
        max-width: 25vw;
    }

    .ramadan-banner {
        height: 48px;
    }

    .banner-main-text {
        font-size: 14px;
        animation: none;
        background: none;
        -webkit-text-fill-color: #FFD700;
        color: #FFD700;
    }

    .ramadan-banner::before {
        animation: none;
    }

    .banner-crescent {
        width: 16px;
        height: 16px;
    }

    .ramadan-banner-text {
        gap: 8px;
    }
}

/* ---- SMALL PHONE (max-width: 480px) ---- */
@media (max-width: 480px) {
    .ramadan-overlay {
        height: 250px;
    }

    .ramadan-hero-graphic {
        width: 130px;
        max-width: 38vw;
        top: 20px;
        animation: none;
        /* Disable animation on small screens */
    }

    .ramadan-decoration-branch {
        width: 100px;
        top: 15px;
        max-width: 30vw;
    }

    .ramadan-banner {
        height: 42px;
    }

    .banner-main-text {
        font-size: 12px;
        letter-spacing: 0;
        animation: none;
        background: none;
        -webkit-text-fill-color: #FFD700;
        color: #FFD700;
    }

    .banner-crescent {
        width: 13px;
        height: 13px;
    }

    .ramadan-banner-text {
        gap: 5px;
    }

    .ramadan-banner-inner {
        padding: 0 8px;
    }
}

/* ---- TINY PHONE (max-width: 360px) ---- */
@media (max-width: 360px) {
    .ramadan-overlay {
        height: 200px;
    }

    .ramadan-hero-graphic {
        width: 100px;
        top: 25px;
    }

    .ramadan-decoration-branch {
        top: 18px;
        width: 80px;
    }

    .ramadan-banner {
        height: 38px;
    }

    .banner-main-text {
        font-size: 11px;
        white-space: nowrap;
    }

    .banner-crescent {
        display: none;
    }

    .ramadan-banner-inner {
        padding: 0 5px;
    }
}

/* ---- LANDSCAPE PHONES ---- */
@media (max-height: 500px) and (orientation: landscape) {
    .ramadan-overlay {
        height: 300px;
    }

    .ramadan-banner {
        height: 36px;
    }

    .banner-main-text {
        font-size: 13px;
    }

    .ramadan-hero-graphic {
        width: 160px;
    }

    .ramadan-decoration-branch {
        width: 130px;
    }
}