/* ==========================================================================
   Homepage Hero Carousel
   Full-bleed, fade-transition Swiper hero. Ships dark fallback styles so the
   section is legible even before Swiper finishes initialising.
   ========================================================================== */

.altiglo-hero {
    position: relative;
    width: 100%;
    background: #0a1020;
    color: #fff;
    overflow: hidden;
}

.altiglo-hero__viewport {
    position: relative;
    width: 100%;
    height: clamp(520px, 78vh, 800px);
}

@media (max-width: 720px) {
    .altiglo-hero__viewport {
        height: clamp(460px, 70vh, 640px);
    }
}

/* Swiper structural overrides — neutralise default theme spacing. */
.altiglo-hero .swiper {
    width: 100%;
    height: 100%;
}

.altiglo-hero .swiper-slide {
    position: relative;
    overflow: hidden;
    background: #0a1020;
}

/* Slide media (background image filling the slide). */
.altiglo-hero__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.altiglo-hero__slide[data-focus="top"] .altiglo-hero__media {
    object-position: center top;
}

.altiglo-hero__slide[data-focus="bottom"] .altiglo-hero__media {
    object-position: center bottom;
}

/* Dark scrim — left-weighted so overlay copy on the left is always legible. */
.altiglo-hero__scrim {
    position: absolute;
    inset: 0;
    background:
        /* Top fade — keeps logo + nav legible against the transparent header. */
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.18) 110px, transparent 200px),
        /* Left scrim — copy area legibility. */
        linear-gradient(90deg, rgba(8, 14, 28, 0.78) 0%, rgba(8, 14, 28, 0.55) 38%, rgba(8, 14, 28, 0.18) 70%, rgba(8, 14, 28, 0.05) 100%),
        /* Bottom fade — into the next section. */
        linear-gradient(180deg, transparent 60%, rgba(8, 14, 28, 0.55) 100%);
    pointer-events: none;
}

/* Slide content.
   Left-aligned column with generous breathing room from the left edge. The
   container is capped via --altiglo-container; we add explicit horizontal
   padding on top of that so copy never hugs the viewport edge. */
.altiglo-hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    width: 100%;
    max-width: var(--altiglo-container);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4rem 1.5rem 5.5rem;
}

@media (min-width: 720px) {
    .altiglo-hero__content {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 1024px) {
    .altiglo-hero__content {
        justify-content: center;
        padding: 0 4.5rem;
    }
}

@media (min-width: 1440px) {
    .altiglo-hero__content {
        padding: 0 6rem;
    }
}

/* Inner copy column — caps width so the headline breaks naturally. */
.altiglo-hero__copy {
    max-width: 38rem;
}

@media (min-width: 1024px) {
    .altiglo-hero__copy {
        max-width: 44rem;
    }
}

.altiglo-hero__eyebrow {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.altiglo-hero__title {
    margin: 1.1rem 0 0;
    color: #fff;
    font-family: var(--altiglo-font-display);
    font-size: clamp(2.4rem, 5.2vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.altiglo-hero__subtitle {
    margin: 1.5rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 34rem;
}

.altiglo-hero__actions {
    margin-top: 2.25rem;
}

/* Local override on the brand button so it pops against dark imagery. */
.altiglo-hero .altiglo-button {
    background: linear-gradient(180deg, var(--altiglo-amber-500), var(--altiglo-amber-600)) !important;
    color: var(--altiglo-charcoal-950) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.altiglo-hero .altiglo-button:hover,
.altiglo-hero .altiglo-button:focus-visible {
    background: linear-gradient(180deg, #ffd75a, var(--altiglo-amber-500)) !important;
    color: var(--altiglo-charcoal-950) !important;
}

/* Pagination dots. */
.altiglo-hero .swiper-pagination {
    bottom: 1.6rem;
    text-align: center;
}

.altiglo-hero .swiper-pagination-bullet {
    width: 28px;
    height: 3px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.35);
    opacity: 1;
    margin: 0 4px !important;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.altiglo-hero .swiper-pagination-bullet-active {
    background: var(--altiglo-amber-500);
    transform: scaleY(1.4);
}

/* Arrow controls — minimal: a thin chevron, no circle, low opacity by default,
   subtle scale on hover. Swiper's built-in chevron font is replaced with an
   inline SVG drawn via `background-image` on a child pseudo-element. */
.altiglo-hero .swiper-button-prev,
.altiglo-hero .swiper-button-next {
    width: 56px;
    height: 56px;
    margin-top: -28px;
    background: transparent;
    border: 0;
    padding: 0;
    color: #fff;
    opacity: 0.55;
    transition: opacity 0.25s ease, transform 0.25s ease;
    cursor: pointer;
}

.altiglo-hero .swiper-button-prev:hover,
.altiglo-hero .swiper-button-next:hover,
.altiglo-hero .swiper-button-prev:focus-visible,
.altiglo-hero .swiper-button-next:focus-visible {
    opacity: 1;
    transform: scale(1.12);
    background: transparent;
}

/* Override Swiper's default chevron-character ::after with a clean SVG. */
.altiglo-hero .swiper-button-prev::after,
.altiglo-hero .swiper-button-next::after {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    font: inherit;
    letter-spacing: 0;
}

.altiglo-hero .swiper-button-prev::after {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 6 9 12 15 18'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 6 9 12 15 18'/></svg>");
}

.altiglo-hero .swiper-button-next::after {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 6 15 12 9 18'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 6 15 12 9 18'/></svg>");
}

@media (max-width: 720px) {
    .altiglo-hero .swiper-button-prev,
    .altiglo-hero .swiper-button-next {
        display: none;
    }
}

/* Pre-init flash control: hide all slides except the first while Swiper boots,
   so visitors don't briefly see three stacked slides before initialisation. */
.altiglo-hero:not(.is-ready) .altiglo-hero__slide:not(:first-child) {
    display: none;
}

/* Reduced-motion: disable autoplay-implied transitions visually. Actual
   autoplay disable happens in JS via the matchMedia query. */
@media (prefers-reduced-motion: reduce) {
    .altiglo-hero .swiper-slide {
        transition: none !important;
    }
}

/* Fallback when no slides have images yet (fresh install). */
.altiglo-hero--empty .altiglo-hero__viewport {
    height: clamp(380px, 50vh, 520px);
    background:
        radial-gradient(circle at top right, rgba(242, 197, 61, 0.18), transparent 18rem),
        linear-gradient(135deg, #101724 0%, #151d29 48%, #0f1620 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.altiglo-hero--empty .altiglo-hero__content {
    justify-content: center;
    text-align: center;
}

.altiglo-hero--empty .altiglo-hero__title {
    margin-left: auto;
    margin-right: auto;
}
