/* Ula Group — Hero section (Figma node 296:3399) */

body.template-homepage {
    background: #ffffff;
}

html[lang="ar"] body.template-homepage,
:lang(ar) body.template-homepage {
    background: #ffffff;
}

.hero-section {
    --hero-header-offset: 80px;
    --hero-min-height: calc(100dvh - var(--hero-header-offset));
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: var(--hero-min-height);
    overflow: hidden;
    background-color: #0c111d;
    color: #ffffff;
}

.hero-section__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-section__slides.owl-carousel .owl-stage-outer,
.hero-section__slides.owl-carousel .owl-stage,
.hero-section__slides.owl-carousel .owl-item,
.hero-section__slides.owl-carousel .hero-section__slide {
    height: 100%;
    min-height: var(--hero-min-height);
}

.hero-section__slides.owl-carousel .owl-item {
    overflow: hidden;
}

.hero-section__slide {
    background-color: #0c111d;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-section__slide--video {
    overflow: hidden;
}

.hero-section__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-section__slides {
    height: 100%;
}

.hero-section__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(12, 17, 29, 0.35) 0%,
        rgba(12, 17, 29, 0.55) 45%,
        rgba(12, 17, 29, 0.72) 100%
    );
}

.hero-section__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: var(--hero-min-height);
    padding: 48px 24px 120px;
    text-align: center;
}

.hero-section__title {
    max-width: 1056px;
    margin: 0;
    font-family: "Granadia-Bold", "Granadia-Book", Helvetica, Arial, sans-serif;
    font-size: clamp(2.5rem, 5.2vw, 4.75rem);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero-section__subtitle {
    max-width: 1174px;
    margin: 16px 0 0;
    font-family: "Granadia-Book", Helvetica, Arial, sans-serif;
    font-size: clamp(1rem, 2vw, 1.75rem);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.hero-section__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    padding: 0;
    list-style: none;
}

.hero-section__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.hero-section__dot:hover,
.hero-section__dot:focus-visible {
    background: rgba(255, 255, 255, 0.85);
    outline: none;
}

.hero-section__dot.is-active {
    background: #ffffff;
    transform: scale(1.15);
}

.hero-section__scroll {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 3;
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transform: translateX(-50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-section__scroll:hover {
    opacity: 0.85;
    transform: translateX(-50%) translateY(2px);
}

.hero-section__scroll svg {
    display: block;
    width: 40px;
    height: 40px;
}

.hero-section__scroll:not(:hover) svg {
    animation: hero-scroll-bounce 2s ease-in-out infinite;
}

@keyframes hero-scroll-bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(8px);
    }

    60% {
        transform: translateY(4px);
    }
}

html[lang="ar"] .hero-section__title,
:lang(ar) .hero-section__title {
    letter-spacing: 0;
    line-height: 1.3;
}

html:has(body.template-homepage) {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
    html:has(body.template-homepage) {
        scroll-behavior: auto;
    }

    .hero-section__scroll svg {
        animation: none;
    }
}

@media (max-width: 767.98px) {
    html:has(body.template-homepage) {
        scroll-padding-top: 72px;
    }

    .hero-section {
        --hero-header-offset: 72px;
        --hero-min-height: calc(100dvh - var(--hero-header-offset));
    }

    .hero-section__content {
        padding: 32px 20px 104px;
    }

    .hero-section__dots {
        margin-top: 28px;
    }

    .hero-section__scroll {
        bottom: 24px;
    }
}

/* Override legacy homepage hero rules */
body.template-homepage .hero-section {
    min-height: var(--hero-min-height);
}

body.template-homepage .hero-section::before {
    content: none;
}

@media (max-width: 600px) {
    body.template-homepage,
    html[lang="ar"] body.template-homepage,
    :lang(ar) body.template-homepage {
        background: #ffffff;
    }
}
