/**
 * FMC Metal — home hero (Construction-style: Ken Burns, side nav, fade text).
 */
.fmc-hero {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: min(92vh, 900px);
    max-height: 900px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #023b4a;
}

html[lang="ar"] .fmc-hero {
    font-family: 'Cairo', 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

.fmc-hero__swiper.swiper {
    position: relative;
    width: 100%;
    height: min(92vh, 900px);
    max-height: 900px;
    overflow: hidden;
}

.fmc-hero__swiper .swiper-wrapper {
    position: relative;
    height: 100%;
    min-height: min(92vh, 900px);
}

.fmc-hero__slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    height: 100%;
    min-height: min(92vh, 900px);
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.7s ease;
}

.fmc-hero__slide.swiper-slide-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.fmc-hero:not(.fmc-hero--ready) .fmc-hero__slide:first-child {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

/* Moving background (Ken Burns) — active slide only */
.fmc-hero__media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.02);
    will-change: transform;
    animation: fmc-hero-kenburns 16s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.swiper-slide-active .fmc-hero__media,
.fmc-hero:not(.fmc-hero--ready) .swiper-slide:first-child .fmc-hero__media {
    animation-play-state: running;
}

@keyframes fmc-hero-kenburns {
    0% {
        transform: scale(1.02) translate(0, 0);
    }
    100% {
        transform: scale(1.1) translate(-1.2%, -0.6%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fmc-hero__media {
        animation: none !important;
        transform: scale(1.02);
    }
}

.fmc-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        105deg,
        rgba(2, 59, 74, 0.92) 0%,
        rgba(2, 59, 74, 0.55) 42%,
        rgba(2, 59, 74, 0.35) 100%
    );
    pointer-events: none;
}

.fmc-hero__grid {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(72px, 12vh, 120px) clamp(24px, 4vw, 48px) clamp(100px, 14vh, 140px);
    height: 100%;
    min-height: min(92vh, 900px);
    max-height: 900px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.fmc-hero__content {
    max-width: 640px;
    color: #fff;
}

/* Staggered entrance — active slide only; first slide visible before Swiper init */
.fmc-hero__content-inner > * {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.fmc-hero:not(.fmc-hero--ready) .swiper-slide:first-child .fmc-hero__content-inner > *,
.fmc-hero--ready .swiper-slide-active .fmc-hero__content-inner > * {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.fmc-hero--ready .swiper-slide-active .fmc-hero__content-inner > *:nth-child(1) {
    transition-delay: 0.05s;
}
.fmc-hero--ready .swiper-slide-active .fmc-hero__content-inner > *:nth-child(2) {
    transition-delay: 0.14s;
}
.fmc-hero--ready .swiper-slide-active .fmc-hero__content-inner > *:nth-child(3) {
    transition-delay: 0.23s;
}
.fmc-hero--ready .swiper-slide-active .fmc-hero__content-inner > *:nth-child(4) {
    transition-delay: 0.32s;
}

@media (prefers-reduced-motion: reduce) {
    .fmc-hero__content-inner > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.fmc-hero__kicker {
    display: inline-block;
    margin: 0 0 16px;
    padding: 8px 18px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.fmc-hero h1.fmc-hero__title,
.fmc-hero h2.fmc-hero__title {
    margin: 0 0 18px;
    font-size: clamp(1.75rem, 4.2vw, 2.85rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #fff !important;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.55),
        0 12px 40px rgba(0, 0, 0, 0.35);
    -webkit-font-smoothing: antialiased;
}

.fmc-hero__lead {
    margin: 0 0 28px;
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    max-width: 52ch;
}

.fmc-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #128af0 0%, #0a6bc7 100%);
    box-shadow: 0 8px 28px rgba(18, 138, 240, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fmc-hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(18, 138, 240, 0.5);
    color: #fff;
}

/* FMC Construction–style: dark glass circles + white chevrons */
.fmc-hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 1200 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px !important;
    cursor: pointer;
    color: #f8fcff !important;
    background: rgba(30, 30, 30, 0.45);
    background-image: none !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-50%);
    pointer-events: auto !important;
    touch-action: manipulation;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.fmc-hero__arrow > * {
    pointer-events: none;
}

.fmc-hero__arrow svg {
    display: block;
    flex-shrink: 0;
}

.fmc-hero__arrow svg path {
    stroke: #ffffff;
    stroke-width: 2.25;
    vector-effect: non-scaling-stroke;
}

.fmc-hero__arrow--prev {
    left: clamp(10px, 2.5vw, 32px);
    right: auto;
}

.fmc-hero__arrow--next {
    right: clamp(56px, 6vw, 120px);
    left: auto;
}

.fmc-hero__arrow:hover {
    background: rgba(18, 138, 240, 0.92);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.05);
}

.fmc-hero__arrow:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: 3px;
}

.fmc-hero__pagination-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    padding: 20px 72px 28px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
    pointer-events: none;
}

.fmc-hero__pagination-bar .fmc-hero__pagination {
    pointer-events: auto;
}

.fmc-hero__pagination {
    position: static !important;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: auto !important;
}

.fmc-hero .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    padding: 0;
    margin: 0 !important;
    opacity: 1;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.fmc-hero .swiper-pagination-bullet-active {
    background: #128af0;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.15);
    box-shadow: 0 0 0 2px rgba(18, 138, 240, 0.35);
}

@media (max-width: 768px) {
    .fmc-hero,
    .fmc-hero__swiper.swiper,
    .fmc-hero__grid {
        min-height: min(88vh, 780px);
        height: auto;
    }

    .fmc-hero__grid {
        align-items: flex-end;
        padding-bottom: 120px;
    }

    .fmc-hero__content {
        max-width: 100%;
    }

    /* Swipe works on touch; hide chrome on small viewports */
    .fmc-hero__arrow {
        display: none !important;
    }

    .fmc-hero__pagination-bar {
        display: none !important;
    }
}

[dir="rtl"] .fmc-hero__overlay {
    background: linear-gradient(
        -105deg,
        rgba(2, 59, 74, 0.92) 0%,
        rgba(2, 59, 74, 0.55) 42%,
        rgba(2, 59, 74, 0.35) 100%
    );
}

[dir="rtl"] .fmc-hero__grid {
    justify-content: flex-end;
}

[dir="rtl"] .fmc-hero__content {
    text-align: right;
    margin-right: 0;
    margin-left: auto;
}
