/**
 * Template Style: Sakinah Mawaddah (anim-muslim-romantic)
 */

@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Amiri:wght@400;700&display=swap');

.font-script {
    font-family: 'Alex Brush', cursive;
}
.font-arabic {
    font-family: 'Amiri', serif;
}

/* ================= Envelope Opening Animation ================= */
#cover-overlay {
    transition: transform 1.1s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.9s ease-in-out;
}

.cover-open-animate {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* ================= Floating Music Disc ================= */
.animate-spin-slow {
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-toggle-btn.playing {
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* ================= Floating Particles ================= */
.floating-particle {
    position: absolute;
    top: -40px;
    opacity: 0.6;
    animation: fall linear infinite;
    user-select: none;
}

@keyframes fall {
    0% {
        transform: translateY(-10px) rotate(0deg) translateX(0);
        opacity: 0.7;
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(25px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(105vh) rotate(360deg) translateX(-20px);
        opacity: 0;
    }
}

/* ================= Scroll Trigger Animations ================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nav Link Active Indicator */
.nav-link.active {
    background-color: #047857;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(4, 120, 87, 0.4);
}

/* Entrance Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in-down {
    animation: fadeInDown 0.9s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.9s ease forwards;
}

.animate-scale-up {
    animation: scaleUp 0.9s ease forwards;
}
