/* ===== Kanz Cards - Ramadan Decorations ===== */
/* يمكن حذف هذا الملف بعد انتهاء رمضان */

/* ===== شريط رمضان العلوي ===== */
.ramadan-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(135deg, #1A1A2E 0%, #0F3460 40%, #1A1A2E 100%);
    border-bottom: 1px solid rgba(212, 168, 83, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1500;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
}

.ramadan-banner::before,
.ramadan-banner::after {
    content: '';
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 2;
}

.ramadan-banner::before {
    right: 0;
    background: linear-gradient(to left, #1A1A2E, transparent);
}

.ramadan-banner::after {
    left: 0;
    background: linear-gradient(to right, #1A1A2E, transparent);
}

.ramadan-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #E8C675;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    animation: ramadanTextGlow 3s ease-in-out infinite;
}

.ramadan-banner-text .crescent {
    font-size: 1.1rem;
    animation: crescentPulse 2s ease-in-out infinite;
}

.ramadan-banner-text .star {
    font-size: 0.7rem;
    color: rgba(232, 198, 117, 0.7);
    animation: starTwinkle 1.5s ease-in-out infinite;
}

.ramadan-banner-text .star:nth-child(2) { animation-delay: 0.3s; }
.ramadan-banner-text .star:nth-child(6) { animation-delay: 0.7s; }

/* ===== الفوانيس المعلقة ===== */
.ramadan-lanterns {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    height: 0;
    z-index: 1100;
    pointer-events: none;
    overflow: visible;
}

.lantern {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lanternSwing 4s ease-in-out infinite;
    transform-origin: top center;
    filter: drop-shadow(0 4px 12px rgba(212, 168, 83, 0.3));
}

.lantern:nth-child(1) { right: 6%; animation-delay: 0s; }
.lantern:nth-child(2) { right: 18%; animation-delay: 0.8s; }
.lantern:nth-child(3) { left: 6%; animation-delay: 0.4s; }
.lantern:nth-child(4) { left: 18%; animation-delay: 1.2s; }

.lantern-rope {
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, rgba(212, 168, 83, 0.6), rgba(212, 168, 83, 0.9));
}

.lantern-body {
    font-size: 1.6rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(212, 168, 83, 0.5));
    animation: lanternGlow 2s ease-in-out infinite;
}

.lantern:nth-child(2) .lantern-body,
.lantern:nth-child(4) .lantern-body {
    font-size: 1.3rem;
    animation-delay: 0.5s;
}

/* ===== النجوم المتلألئة ===== */
.ramadan-stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ramadan-star {
    position: absolute;
    color: rgba(232, 198, 117, 0.6);
    font-size: 10px;
    animation: starFloat 8s ease-in-out infinite;
}

.ramadan-star:nth-child(1)  { top: 12%; right: 8%;  animation-delay: 0s;   font-size: 8px; }
.ramadan-star:nth-child(2)  { top: 22%; right: 82%; animation-delay: 1.2s; font-size: 6px; }
.ramadan-star:nth-child(3)  { top: 35%; right: 55%; animation-delay: 2.4s; font-size: 10px; }
.ramadan-star:nth-child(4)  { top: 48%; right: 15%; animation-delay: 0.8s; font-size: 7px; }
.ramadan-star:nth-child(5)  { top: 60%; right: 72%; animation-delay: 3.2s; font-size: 9px; }
.ramadan-star:nth-child(6)  { top: 75%; right: 35%; animation-delay: 1.6s; font-size: 6px; }
.ramadan-star:nth-child(7)  { top: 18%; right: 45%; animation-delay: 4s;   font-size: 8px; }
.ramadan-star:nth-child(8)  { top: 85%; right: 90%; animation-delay: 2s;   font-size: 7px; }
.ramadan-star:nth-child(9)  { top: 40%; right: 92%; animation-delay: 3.6s; font-size: 5px; }
.ramadan-star:nth-child(10) { top: 55%; right: 48%; animation-delay: 0.4s; font-size: 8px; }

/* ===== هلال رمضان ===== */
.ramadan-crescent {
    position: fixed;
    top: 100px;
    left: 40px;
    font-size: 3rem;
    color: rgba(232, 198, 117, 0.15);
    z-index: 0;
    pointer-events: none;
    animation: crescentFloat 12s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(212, 168, 83, 0.2);
}

/* ===== تعديل الهيدر ليتناسب مع الشريط ===== */
body:has(.ramadan-banner) {
    padding-top: 40px;
}

body:has(.ramadan-banner) .header {
    top: 52px;
}

body:has(.ramadan-banner) .hero {
    padding-top: 150px;
}

body:has(.ramadan-banner) .page-header {
    padding-top: 140px;
}

/* صفحة auth بدون header */
body:has(.ramadan-banner):has(.auth-page) {
    padding-top: 0;
}

body:has(.ramadan-banner):has(.auth-page) .auth-page {
    padding-top: 60px;
}

/* ===== قسم رمضاني خاص في الصفحة الرئيسية ===== */
.ramadan-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* Match .hero-note sizing to keep both pills identical */
    padding: 8px 14px;
    background: rgba(212, 168, 83, 0.1);
    border: 1px solid rgba(212, 168, 83, 0.25);
    border-radius: 999px;
    color: var(--primary-gold-light);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 18px;
    animation: ramadanBadgePulse 3s ease-in-out infinite;
}

.ramadan-hero-badge .icon {
    font-size: 1rem;
}

/* Ensure exact match with existing .hero-note pill */
.hero-note,
.ramadan-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    min-height: 36px;
    line-height: 1;
    box-sizing: border-box;
}

.hero-note i,
.ramadan-hero-badge .icon {
    font-size: 1rem;
    line-height: 1;
}

/* ===== أنيميشنات ===== */
@keyframes ramadanTextGlow {
    0%, 100% { text-shadow: 0 0 8px rgba(212, 168, 83, 0.3); }
    50% { text-shadow: 0 0 20px rgba(212, 168, 83, 0.6), 0 0 40px rgba(212, 168, 83, 0.2); }
}

@keyframes crescentPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes lanternSwing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
}

@keyframes lanternGlow {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(212, 168, 83, 0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(212, 168, 83, 0.8)); }
}

@keyframes starFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    50% { transform: translateY(-12px) scale(1.2); opacity: 0.9; }
}

@keyframes crescentFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes ramadanBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 83, 0); }
    50% { box-shadow: 0 0 20px 2px rgba(212, 168, 83, 0.15); }
}

@keyframes fallingStarParticle {
    0%   { transform: translateY(-20px) scale(0); opacity: 0; }
    20%  { opacity: 1; transform: translateY(0) scale(1); }
    80%  { opacity: 0.6; }
    100% { transform: translateY(100vh) scale(0.3); opacity: 0; }
}

/* ===== جسيمات ذهبية ===== */
.gold-particle {
    position: fixed;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(232, 198, 117, 0.9), transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: fallingStarParticle 10s linear infinite;
}

/* ===== ريسبونسف ===== */
@media (max-width: 992px) {
    .lantern:nth-child(2),
    .lantern:nth-child(4) {
        display: none;
    }

    .ramadan-crescent {
        font-size: 2.2rem;
        left: 20px;
    }

    body:has(.ramadan-banner) .header {
        top: 48px;
    }
}

@media (max-width: 768px) {
    .ramadan-banner {
        height: 34px;
    }

    .ramadan-banner-text {
        font-size: 0.78rem;
        gap: 8px;
    }

    body:has(.ramadan-banner) {
        padding-top: 34px;
    }

    body:has(.ramadan-banner) .header {
        top: 42px;
    }

    body:has(.ramadan-banner) .hero {
        padding-top: 140px;
    }

    .lantern-body {
        font-size: 1.2rem;
    }

    .lantern:nth-child(2) .lantern-body,
    .lantern:nth-child(4) .lantern-body {
        font-size: 1rem;
    }

    .ramadan-crescent {
        font-size: 1.8rem;
        top: 80px;
        left: 15px;
    }

    .ramadan-star:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 480px) {
    .ramadan-banner {
        height: 30px;
    }

    .ramadan-banner-text {
        font-size: 0.72rem;
        gap: 6px;
    }

    .ramadan-banner-text .star {
        display: none;
    }

    body:has(.ramadan-banner) {
        padding-top: 30px;
    }

    body:has(.ramadan-banner) .header {
        top: 38px;
    }

    .lantern {
        display: none !important;
    }

    .ramadan-crescent {
        font-size: 1.4rem;
        opacity: 0.1;
    }

    .ramadan-star:nth-child(n+5) {
        display: none;
    }

    .gold-particle {
        display: none;
    }
}
