/* ==========================================================================
   AEIK Hero Slider (main-slider)
   Tokens mapped to AEIK brand palette (blue + teal accent).
   ========================================================================== */
:root {
    --hero-slide-time: 6000ms;
    --hero-fade-time:  1500ms;
}

/* keep page horizontal scroll clean for the full-bleed hero */
body { overflow-x: hidden; }

/* ===== PRELOADER (scoped to home) ===== */
#aeik-preloader {
    position: fixed; inset: 0; z-index: 9999;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: opacity .6s ease, visibility .6s ease;
}
#aeik-preloader.is-loaded { opacity: 0; visibility: hidden; }
#aeik-preloader .spinner {
    width: 46px; height: 46px; border-radius: 50%;
    border: 3px solid rgba(27, 79, 139, .2);
    border-top-color: var(--aeik-blue);
    animation: aeik-spin .9s linear infinite;
}
@keyframes aeik-spin { to { transform: rotate(360deg); } }

/* ===== MAIN SLIDER ===== */
.main-slider { position: relative; color: #fff; }
.main-slider .swiper { width: 100%; height: 78vh; min-height: 520px; }
.main-slider .swiper-slide {
    position: relative; overflow: hidden;
    display: flex; align-items: center;
}

/* Background image layer — swap each .slide-N .image-layer background-image
   for a real photo: url('/images/hero-1.jpg') */
.main-slider .image-layer {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transform: scale(1);
}
/* Real photo on top, gradient as fallback if the image is missing. */
.main-slider .slide-1 .image-layer {
    background-image:
        url('/images/hero/s1.jpg'),
        linear-gradient(120deg, #1B4F8B 0%, #143C6B 55%, #0E2B4F 100%);
}
.main-slider .slide-2 .image-layer {
    background-image:
        url('/images/hero/s2.jpeg'),
        linear-gradient(120deg, #143C6B 0%, #0E2B4F 55%, #102b3f 100%);
}
.main-slider .slide-3 .image-layer {
    background-image:
        url('/images/hero/s3.png'),
        linear-gradient(120deg, #1B4F8B 0%, #0E2B4F 55%, #0a3a3a 100%);
}

/* Ken-Burns drift on the active slide */
.main-slider .swiper-slide-active .image-layer {
    transform: scale(1.15);
    transition: transform 7s ease;
}

/* Color overlay: blue base bleeding to teal on the right */
.main-slider .overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(14, 43, 79, .92) 0%, rgba(14, 43, 79, .55) 55%, rgba(41, 182, 166, .30) 100%),
        radial-gradient(120% 120% at 0% 100%, rgba(27, 79, 139, .45), transparent 60%);
}

/* Decorative diagonal accents (bottom-right teal lines) */
.main-slider .lines {
    position: absolute; right: 0; bottom: 0; width: 34%; height: 78%;
    background: repeating-linear-gradient(135deg,
        transparent 0 22px, rgba(41, 182, 166, .55) 22px 24px);
    -webkit-mask-image: linear-gradient(135deg, transparent 38%, #000 100%);
            mask-image: linear-gradient(135deg, transparent 38%, #000 100%);
    pointer-events: none;
}

/* Slide content */
.main-slider .content {
    position: relative; z-index: 3;
    width: min(1180px, 92%);
    margin: 0 auto;
    padding-bottom: 40px;
    font-family: 'Poppins', "Segoe UI", system-ui, sans-serif;
}
.main-slider .sub-title {
    color: var(--aeik-accent);
    font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    font-size: clamp(13px, 1.4vw, 18px);
    margin-bottom: 10px;
}
.main-slider .title {
    font-weight: 600; line-height: .95;
    font-size: 50px;
    letter-spacing: -.01em;
    margin-bottom: 34px;
}
.main-slider .btn-box {
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}

/* Discover button */
.main-slider .discover-btn {
    display: inline-block; text-decoration: none;
    background: var(--aeik-blue);
    color: #fff; font-weight: 600; font-size: 15px;
    padding: 18px 34px; border-radius: 6px;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.main-slider .discover-btn:hover {
    transform: translateY(-3px);
    background: var(--aeik-blue-soft);
    box-shadow: 0 14px 30px rgba(27, 79, 139, .45);
    color: #fff;
}

/* Video play button + ripple rings */
.main-slider .video-btn {
    display: flex; align-items: center; gap: 16px;
    text-decoration: none; color: #fff;
}
.main-slider .play {
    position: relative; width: 62px; height: 62px; border-radius: 50%;
    background: var(--aeik-accent); color: var(--aeik-blue-deep);
    display: grid; place-items: center; flex: none;
}
.main-slider .play svg { width: 18px; height: 18px; transform: translateX(2px); }
.main-slider .play::before,
.main-slider .play::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid var(--aeik-accent);
    animation: aeik-ripple 2.4s ease-out infinite;
}
.main-slider .play::after { animation-delay: 1.2s; }
@keyframes aeik-ripple {
    0%   { transform: scale(1);   opacity: .7; }
    100% { transform: scale(2.1); opacity: 0;  }
}
.main-slider .video-btn .label { font-size: 15px; line-height: 1.35; opacity: .92; }
.main-slider .video-btn .label b { display: block; font-weight: 600; }

/* Staggered content reveal on slide-active */
.main-slider .content .sub-title,
.main-slider .content .title,
.main-slider .content .btn-box {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s ease, transform 1s ease;
}
.main-slider .swiper-slide-active .sub-title { opacity: 1; transform: none; transition-delay: .6s; }
.main-slider .swiper-slide-active .title     { opacity: 1; transform: none; transition-delay: .9s; }
.main-slider .swiper-slide-active .btn-box   { opacity: 1; transform: none; transition-delay: 1.2s; }

/* --- Per-letter title reveal (letters slide in from the right) ----------
   The title block stays visible; its inner .aeik-letter spans handle the
   animation. JS in Index.cshtml wraps each character in a span with --i set
   to its position, giving each one a staggered transition-delay. */
.main-slider .content .title {
    opacity: 1;
    transform: none;
    transition: none;
}
.main-slider .title .aeik-letter {
    display: inline-block;
    opacity: 0;
    transform: translate(40px, -40px);
    transition:
        opacity 1.2s ease,
        transform 1.6s cubic-bezier(.2, .7, .2, 1);
    transition-delay: calc(var(--i, 0) * 95ms);
    will-change: transform, opacity;
}
.main-slider .swiper-slide-active .title .aeik-letter {
    opacity: 1;
    transform: translate(0, 0);
}
@media (prefers-reduced-motion: reduce) {
    .main-slider .title .aeik-letter {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Pagination dots */
.main-slider .swiper-pagination { bottom: 34px !important; z-index: 5; }
.main-slider .swiper-pagination-bullet {
    width: 9px; height: 9px; background: #fff; opacity: .5;
    transition: width .3s ease, opacity .3s ease;
}
.main-slider .swiper-pagination-bullet-active {
    opacity: 1; width: 26px; border-radius: 6px;
    background: var(--aeik-accent);
}

/* Bottom CTA bar under the slider */
.main-slider .bottom-bar {
    background: var(--aeik-blue);
    color: #fff;
    text-align: center;
    padding: 26px 16px;
    font-size: clamp(14px, 1.5vw, 17px);
}
.main-slider .bottom-bar a {
    color: #fff; font-weight: 700; text-decoration: underline;
}
.main-slider .bottom-bar a:hover { color: var(--aeik-accent); }


/* ==========================================================================
   Hero video modal — YouTube embed lightbox (used by .video-btn triggers)
   ========================================================================== */
.aeik-video-modal .modal-dialog {
    max-width: min(1040px, 92vw);
}
.aeik-video-modal .modal-content {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}
.aeik-video-modal__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.aeik-video-modal__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.aeik-video-modal__close {
    position: absolute;
    top: -44px;
    right: -2px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: #1a1d27;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.aeik-video-modal__close i { font-size: 1rem; line-height: 1; }
.aeik-video-modal__close:hover,
.aeik-video-modal__close:focus-visible {
    background: var(--aeik-accent, #29B6A6);
    color: #fff;
    transform: scale(1.06);
    outline: none;
}

/* Darker, richer backdrop to match a "cinema" feel */
.modal-backdrop.show { opacity: .88; }

@media (max-width: 575.98px) {
    .aeik-video-modal__close { top: -38px; right: 0; width: 34px; height: 34px; }
}
