/* ============================================
   PARALLAX SECTIONS & VISUAL RHYTHM
   Reusable fixed-background parallax dividers,
   alternating section backgrounds, and enhanced
   scroll-reveal animations.
   ============================================ */

/* ---- Fixed Background Parallax Section ---- */
.parallax-section {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Dark overlay */
.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 50, 120, 0.55) 0%, rgba(0, 97, 255, 0.45) 100%);
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: var(--spacing-3xl) var(--spacing-lg);
    color: var(--color-white);
}

.parallax-content h2 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.parallax-content p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.parallax-content .btn {
    margin-top: var(--spacing-sm);
}

/* ---- Alternating Section Backgrounds ---- */
.section-shaded {
    background-color: #f4f7fb !important;
}

/* ---- Enhanced Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for child items */
.reveal-stagger>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-stagger.active>*:nth-child(1) {
    transition-delay: 0.05s;
}

.reveal-stagger.active>*:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-stagger.active>*:nth-child(3) {
    transition-delay: 0.15s;
}

.reveal-stagger.active>*:nth-child(4) {
    transition-delay: 0.2s;
}

.reveal-stagger.active>*:nth-child(5) {
    transition-delay: 0.25s;
}

.reveal-stagger.active>*:nth-child(6) {
    transition-delay: 0.3s;
}

.reveal-stagger.active>* {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Mobile Fallback ---- */
/* iOS does not support background-attachment: fixed */
@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll;
        min-height: 280px;
    }

    .parallax-content h2 {
        font-size: var(--font-size-2xl);
    }

    .parallax-content p {
        font-size: var(--font-size-base);
    }
}

/* Also disable on touch devices for performance */
@supports (-webkit-touch-callout: none) {
    .parallax-section {
        background-attachment: scroll;
    }
}