/* Explain: CSS for the cinematic hero slider with advanced motion effects. */
/* ===== الواجهة السينمائية — سلايدر بموشن فخم يشبه الفيديو ===== */
.hero-cinema {
    --hc-cycle: 7.8s;
    display: flex;
    align-items: center;
    min-height: 88vh;
    padding-block: 7rem 3.5rem;
    background: #0E0E10;
}

@media (min-width: 1024px) {
    .hero-cinema {
        min-height: 94vh;
        padding-block: 8.5rem 4.5rem;
    }
}

/* الطبقات العميقة فوق الصور */
.hero-cinema .hero-parallax {
    z-index: 4;
    opacity: 0.45;
}

.hero-cinema .parallax-grid {
    opacity: 0.5;
}

/* --- الوسائط --- */
.hc-media {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: #0E0E10;
}

.hc-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    clip-path: inset(0 0 0 100%);
    transform: scale(1.05);
    transition: opacity 1.1s ease, transform 1.6s cubic-bezier(0.16, 1, 0.3, 1), clip-path 1.5s cubic-bezier(0.76, 0, 0.24, 1);
}

.hc-slide.is-active {
    z-index: 2;
    opacity: 1;
    transform: scale(1);
    clip-path: inset(0 0 0 0);
}

.hc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.08) contrast(1.06);
    will-change: transform;
}

.hc-slide.is-active .hc-img {
    animation: hcKenA 10s ease-out forwards;
}

.hc-slide:nth-child(2).is-active .hc-img {
    animation-name: hcKenB;
}

.hc-slide:nth-child(3).is-active .hc-img {
    animation-name: hcKenC;
}

@keyframes hcKenA {
    from {
        transform: scale(1.18) translate3d(-2%, 1.5%, 0);
    }

    to {
        transform: scale(1.02) translate3d(0, 0, 0);
    }
}

@keyframes hcKenB {
    from {
        transform: scale(1.04) translate3d(2%, -2%, 0);
    }

    to {
        transform: scale(1.2) translate3d(-1.5%, 0, 0);
    }
}

@keyframes hcKenC {
    from {
        transform: scale(1.16) translate3d(1.5%, 2%, 0);
    }

    to {
        transform: scale(1.02) translate3d(0, 0, 0);
    }
}

/* لمعة الضوء عند الانتقال */
.hc-sweep {
    position: absolute;
    inset: 0;
    z-index: 6;
    opacity: 0;
    background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, 0.32) 48%, transparent 62%);
    transform: translateX(-120%);
    pointer-events: none;
}

.hc-sweep.is-playing {
    animation: hcSweep 1.7s cubic-bezier(0.5, 0, 0.5, 1);
}

@keyframes hcSweep {
    0% {
        opacity: 0;
        transform: translateX(-120%);
    }

    18% {
        opacity: 0.95;
    }

    100% {
        opacity: 0;
        transform: translateX(120%);
    }
}

/* --- حجاب القراءة فوق الصور --- */
.hc-scrim {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background:
        radial-gradient(circle at 84% 22%, rgba(200, 16, 46, 0.32), transparent 30rem),
        linear-gradient(to left, rgba(10, 10, 12, 0.95) 0%, rgba(10, 10, 12, 0.78) 32%, rgba(10, 10, 12, 0.42) 62%, rgba(10, 10, 12, 0.2) 100%),
        linear-gradient(to top, rgba(10, 10, 12, 0.96) 0%, rgba(10, 10, 12, 0.42) 22%, transparent 52%);
}

@media (max-width: 1023px) {
    .hc-scrim {
        background:
            linear-gradient(to bottom, rgba(10, 10, 12, 0.86) 0%, rgba(10, 10, 12, 0.58) 34%, rgba(10, 10, 12, 0.9) 100%),
            linear-gradient(to left, rgba(10, 10, 12, 0.6), rgba(10, 10, 12, 0.3));
    }
}

/* ===== لوحة المحطات الزجاجية ===== */
.hc-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 2rem;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
    padding: 1.2rem;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(20px);
}

@media (min-width: 640px) {
    .hc-panel {
        padding: 1.5rem;
    }
}

.hc-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding-bottom: 0.9rem;
}

.hc-panel-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
}

.hc-panel-label i {
    color: var(--accent-color);
}

.hc-counter {
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.hc-play {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.hc-play:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    transform: scale(1.06);
}

.hc-play:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* --- الوصف المتحرك --- */
.hc-captions {
    display: grid;
}

.hc-caption {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(16px);
    filter: blur(8px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

.hc-caption.is-active {
    opacity: 1;
    transform: none;
    filter: none;
    pointer-events: auto;
    animation: hcCaptionIn 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hcCaptionIn {
    from {
        opacity: 0;
        transform: translateY(22px);
        filter: blur(12px);
    }

    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

.hc-caption-city {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    background: rgba(200, 16, 46, 0.92);
    padding: 0.3rem 0.85rem;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(200, 16, 46, 0.4);
}

.hc-caption-title {
    margin-top: 0.7rem;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.5;
}

.hc-caption-text {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    line-height: 1.9;
}

/* --- أزرار التنقل والتبويبات --- */
.hc-controls {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 1rem;
}

.hc-nav {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.hc-nav:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    transform: scale(1.06);
}

.hc-nav:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.hc-tabs {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: 0.4rem;
}

.hc-tab {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.75rem;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.07);
    padding: 0.4rem 0.3rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, transform 0.35s ease;
}

.hc-tab:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: translateY(-2px);
}

.hc-tab.is-active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(200, 16, 46, 0.45);
}

.hc-tab-num {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 800;
    opacity: 0.75;
}

.hc-tab-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 800;
}

/* --- شريط التقدّم --- */
.hc-progress {
    display: block;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.hc-progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: right center;
    background: linear-gradient(90deg, var(--accent-color), #ffffff);
    animation: hcProgress var(--hc-cycle, 7.8s) linear forwards;
}

@keyframes hcProgress {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.hc-hint {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.74rem;
    line-height: 1.7;
    text-align: center;
}

/* --- دخول اللوحة مع الواجهة --- */
.hero-anim-ready .hc-panel {
    opacity: 0;
    animation: hcPanelIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) 1.55s forwards;
}

@keyframes hcPanelIn {
    from {
        opacity: 0;
        transform: translateY(48px) scale(0.96);
        filter: blur(12px);
    }

    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-anim-ready .hc-panel {
        opacity: 1;
        animation: none;
    }

    .hc-slide {
        clip-path: none;
        transform: none;
        transition: opacity 0.3s ease;
    }

    .hc-slide.is-active .hc-img {
        animation: none;
    }

    .hc-sweep.is-playing {
        animation: none;
        opacity: 0;
    }

    .hc-caption.is-active {
        animation: none;
    }

    .hc-progress-fill {
        animation: none;
        transform: scaleX(1);
    }

    .hc-nav:hover,
    .hc-tab:hover,
    .hc-play:hover {
        transform: none;
    }
}