/* ===================================
   Falaq - Premium Arabic Landing Page
   Custom Styles
   =================================== */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Clips wide content without the overflow-x:hidden side effect that can force
       overflow-y: auto and create a second (nested) vertical scrollbar on mobile. */
    overflow-x: clip;
}

body {
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
    transition: padding-bottom 0.3s ease;
}

/* Reserve space when sticky urgency bar is visible */
body.has-sticky-cta {
    padding-bottom: 84px;
}
@media (min-width: 768px) {
    body.has-sticky-cta {
        padding-bottom: 76px;
    }
}

/* Selection Color */
::selection {
    background-color: hsl(330, 65%, 55%);
    color: white;
}

/* Aurora Backgrounds */
.bg-aurora {
    background:
        radial-gradient(circle at 0% 0%, rgba(236, 72, 153, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 100% 0%, rgba(244, 114, 182, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(251, 146, 60, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(250, 204, 21, 0.05) 0%, transparent 40%);
    background-size: 200% 200%;
    animation: aurora-shift 15s ease-in-out infinite alternate;
}

.bg-aurora-intense {
    background:
        radial-gradient(circle at 0% 0%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(244, 114, 182, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(251, 146, 60, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(250, 204, 21, 0.12) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: aurora-shift 15s ease-in-out infinite alternate;
}

@keyframes aurora-shift {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* Card Gradient Top Accent */
.card-top-accent {
    position: relative;
    overflow: hidden;
}

.card-top-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to left, #ec4899, #f97316);
    border-radius: 3px 3px 0 0;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.card-top-accent:hover::before {
    opacity: 1;
}

/* Header Styles */
#header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(219, 39, 119, 0.1);
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(219, 39, 119, 0.1);
}

/* CTA Button Gradient Animation */
.cta-button {
    background-size: 200% 200%;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-position: 100% 0;
}

/* FAQ Accordion */
.faq-item {
    position: relative;
    transition: box-shadow 0.3s ease;
}

.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(to bottom, #ec4899, #f97316);
    border-radius: 0 0 0 0;
    transition: width 0.3s ease;
}

.faq-item.active::before {
    width: 4px;
}

.faq-item.active {
    box-shadow: 0 6px 24px rgba(236, 72, 153, 0.1);
}

.faq-item .faq-trigger {
    cursor: pointer;
    background: transparent;
    border: none;
    font-family: inherit;
}

.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid #ec4899;
    color: #ec4899;
    font-size: 1.25rem;
    font-weight: 300;
    flex-shrink: 0;
    line-height: 1;
    transition: all 0.3s ease;
    user-select: none;
}

.faq-item.active .faq-icon {
    background: linear-gradient(135deg, #ec4899, #f97316);
    border-color: transparent;
    color: white;
}

.faq-item .faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-item.active .faq-content {
    max-height: 300px;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }
.reveal:nth-child(7) { transition-delay: 0.6s; }
.reveal:nth-child(8) { transition-delay: 0.7s; }

/* Smooth scroll padding for fixed header */
section {
    scroll-margin-top: 80px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(330, 20%, 95%);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, hsl(330, 65%, 55%), hsl(10, 75%, 65%));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(330, 65%, 45%);
}

/* Pain Point Hover Effect */
.pain-point {
    position: relative;
    overflow: hidden;
}

.pain-point::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(219, 39, 119, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pain-point:hover::before {
    opacity: 1;
}

/* Timeline connector glow */
#curriculum .relative.pr-16 > div:first-child {
    box-shadow: 0 0 20px rgba(219, 39, 119, 0.3);
}

/* Stats card subtle animation (see #stats section under hero) */
#stats .stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#stats .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(219, 39, 119, 0.1);
}

/* Testimonial card subtle gradient */
#testimonials .bg-muted\/50 {
    background: linear-gradient(135deg,
        hsl(330, 20%, 95%) 0%,
        hsl(330, 15%, 97%) 100%
    );
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Reduce animation intensity on mobile for performance */
    .bg-aurora,
    .bg-aurora-intense {
        animation-duration: 20s;
    }

    .animate-float {
        animation-duration: 5s;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Strikethrough for compare/original prices — centered pseudo-element line */
del {
    text-decoration: none !important;
    position: relative;
    display: inline-block;
    line-height: 1;
    vertical-align: baseline;
}
del::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    top: 50%;
    height: 2px;
    background: currentColor;
    opacity: 0.45;
    pointer-events: none;
}

