/* Explain: Styles for organic shapes, scroll progress bar, and header effects. */
/* خلفيات وأشكال عضوية ناعمة + شريط تقدم القراءة + تأثير عمق عند التمرير + تحسين الهيدر */

/* شريط تقدم التمرير أعلى الصفحة */
.scroll-progress {
    position: fixed;
    z-index: 60;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transform: scaleX(0);
    transform-origin: 0 50%;
    pointer-events: none;
}

[dir="rtl"] .scroll-progress {
    transform-origin: 100% 50%;
}

/* حاوية آمنة للأشكال الخلفية: تقصّ الفائض لمنع أي تمرير أفقي */
.shape-host {
    position: relative;
    isolation: isolate;
}

/* شكل عضوي ناعم خلف الأقسام لمنح عمق بصري */
.section-shape {
    position: absolute;
    z-index: 0;
    display: block;
    width: clamp(20rem, 42vw, 40rem);
    height: clamp(20rem, 42vw, 40rem);
    pointer-events: none;
    will-change: transform;
}

.section-shape::before {
    position: absolute;
    inset: 0;
    content: "";
    border-radius: 46% 54% 62% 38% / 52% 44% 56% 48%;
    background: radial-gradient(circle at 34% 30%, rgba(196, 31, 85, 0.18), rgba(196, 31, 85, 0.05) 54%, transparent 72%);
    filter: blur(4px);
    animation: shape-float 26s ease-in-out infinite;
}

.section-shape-start {
    inset-block-start: -7rem;
    inset-inline-start: -11rem;
}

.section-shape-end {
    inset-block-end: -9rem;
    inset-inline-end: -13rem;
}

.section-shape-solid::before {
    border-radius: 38% 62% 42% 58% / 56% 42% 58% 44%;
    background: radial-gradient(circle at 52% 48%, rgba(43, 48, 55, 0.16), rgba(43, 48, 55, 0.04) 52%, transparent 72%);
    animation-delay: -9s;
}

/* خلفية المعرض: تخفيف اللمسة الوردية لتبقى خفيفة وغير طاغية */
.section-shape-soft::before {
    background: radial-gradient(circle at 34% 30%, rgba(196, 31, 85, 0.07), rgba(196, 31, 85, 0.02) 54%, transparent 72%);
}

@keyframes shape-float {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(0, -3.5%, 0) scale(1.06);
    }
}

.parallax-media {
    will-change: transform;
}

/* الهيدر يصبح أوضح وأثبت عند التمرير */
header.is-scrolled nav {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 46px rgba(20, 22, 26, 0.16);
}

@media (min-width: 1024px) {
    .section-shape {
        width: clamp(26rem, 38vw, 44rem);
        height: clamp(26rem, 38vw, 44rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .section-shape,
    .parallax-media {
        transform: none !important;
        will-change: auto;
    }

    .section-shape::before {
        animation: none;
    }
}