/**
 * Ramadan Vibes - CSS Styles
 * الأنماط الخاصة بأجواء رمضان
 */

/* ===============================================
   الحاوية الرئيسية
   =============================================== */
.ramadan-vibes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* ===============================================
   الزينة المضيئة المتدلية (هلالات ونجوم متدلية)
   =============================================== */
.ramadan-lights-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* حاوية الزينة */
.lights-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px;
    pointer-events: none;
    overflow: hidden;
}

/* خط الربط العلوي (السلك الرئيسي) */
.lights-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        #FFD700 0%, 
        #FFA500 50%, 
        #FFD700 100%
    );
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: lineGlow 3s ease-in-out infinite;
    z-index: 1;
}

.lights-bottom,
.lights-left,
.lights-right {
    display: none;
}

@keyframes lineGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 1);
    }
}

/* الحبال المتدلية */
.hanging-string {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(255, 215, 0, 0.6) 0%, 
        transparent 100%
    );
    animation: stringSwing 4s ease-in-out infinite;
}

/* الأشكال المتدلية (هلالات ونجوم) */
.hanging-decoration {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    animation: decorationGlow 2s ease-in-out infinite;
}

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

@keyframes decorationGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6)) brightness(1);
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1)) brightness(1.3);
    }
}

/* ===============================================
   الهلالات المتحركة
   =============================================== */
.ramadan-crescents-animation {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.crescent {
    position: absolute;
    bottom: -100px;
    font-size: 40px;
    color: #FFD700;
    opacity: 0;
    animation: crescentRise 8s ease-in-out forwards;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    transform-origin: center;
}

.crescent.star {
    color: #FFF;
    font-size: 20px;
    animation: starTwinkle 3s ease-in-out infinite;
}

@keyframes crescentRise {
    0% {
        bottom: -100px;
        opacity: 0;
        transform: translateX(0) rotate(0deg) scale(0.5);
    }
    10% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: translateX(var(--drift-x, 0)) rotate(360deg) scale(1);
    }
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ===============================================
   توافق مع الثيمات المختلفة
   =============================================== */

/* تحسين التوافق مع WooCommerce */
.woocommerce .ramadan-vibes-container {
    z-index: 9999 !important;
}

/* تحسين التوافق مع Astra Theme */
.ast-header-break-point .ramadan-lights-frame,
.ast-desktop .ramadan-lights-frame {
    z-index: 9999;
}

/* تحسين التوافق مع GeneratePress */
.site-header .ramadan-lights-frame {
    z-index: 9999;
}

/* تحسين التوافق مع OceanWP */
#site-header .ramadan-lights-frame {
    z-index: 9999;
}

/* ===============================================
   Responsive Design
   =============================================== */
@media (max-width: 768px) {
    .crescent {
        font-size: 30px;
    }
    
    .lights-top {
        height: 300px;
    }
    
    .hanging-decoration {
        font-size: 30px !important;
    }
    
    .hanging-string {
        opacity: 0.8;
    }
}

@media (max-width: 480px) {
    .crescent {
        font-size: 25px;
    }
    
    .lights-top {
        height: 250px;
    }
    
    .hanging-decoration {
        font-size: 25px !important;
    }
    
    .hanging-string {
        opacity: 0.6;
    }
}

/* ===============================================
   Performance Optimization
   =============================================== */
.ramadan-vibes-container * {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* تقليل الأنيميشن على الأجهزة الضعيفة */
@media (prefers-reduced-motion: reduce) {
    .crescent,
    .lights-top,
    .lights-bottom,
    .lights-left,
    .lights-right {
        animation: none !important;
    }
}
