/* =============================================================
   Home Hero Slider — Premium CSS
   Swiper + Animasyonlar + Progress Bar + Focal Point + A11y
   ============================================================= */

/* ---------- Slider Kapsayıcı ---------- */
.hm-hero-swiper {
    position: relative;
    width: 100%;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    background:
        radial-gradient(circle at top right, rgba(9, 169, 193, 0.32), transparent 28%),
        linear-gradient(135deg, #08111f 0%, #0f172a 44%, #12485a 100%);
}

.hm-hero-swiper .swiper-slide {
    height: auto;
}

/* ---------- Tek Slide ---------- */
.hm-slide {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: clamp(420px, 60vh, 680px);
    overflow: hidden;
}

/* ---------- Medya Katmanı ---------- */
.hm-slide__media,
.hm-slide__picture,
.hm-slide__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hm-slide__picture {
    overflow: hidden;
}

.hm-slide__picture--backdrop {
    z-index: 0;
}

.hm-slide__picture--main {
    z-index: 1;
}

.hm-slide__image--backdrop {
    object-fit: cover;
    object-position: var(--hm-fp-x, 50%) var(--hm-fp-y, 50%);
    transform: scale(1.12);
    filter: blur(22px) saturate(1.1);
    opacity: 0.72;
}

.hm-slide__image--main {
    /*object-fit: contain;*/
    object-position: var(--hm-fp-x, 50%) var(--hm-fp-y, 50%);
    transform: scale(var(--hm-image-scale, 1));
    transition: transform 1.1s ease, filter .45s ease;
    filter: saturate(1.05);
}

.hm-slide__media--contain {
    inset: 0 0 0 auto;
    width: min(62%, 980px);
    max-width: 100%;
    pointer-events: none;
}

.hm-slide__media--contain .hm-slide__picture,
.hm-slide__media--contain .hm-slide__image {
    inset: 0;
    width: 100%;
    height: 100%;
}

.hm-slide__media--contain .hm-slide__image--backdrop {
    object-position: var(--hm-fp-x, 58%) var(--hm-fp-y, 50%);
}

.hm-slide__media--contain .hm-slide__image--main {
    object-fit: contain;
    object-position: var(--hm-fp-x, 58%) var(--hm-fp-y, 50%);
    transform: scale(1);
    padding: clamp(16px, 2.6vw, 28px) clamp(12px, 2vw, 24px) clamp(10px, 1.8vw, 20px) 0;
    filter: drop-shadow(0 28px 48px rgba(2, 6, 23, 0.18)) saturate(1.05);
}

.hm-slide--content .hm-slide__shade {
    background:
        linear-gradient(95deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.7) 34%, rgba(2, 6, 23, 0.24) 68%, rgba(2, 6, 23, 0.08) 100%),
        linear-gradient(0deg, rgba(8, 17, 31, 0.16), rgba(8, 17, 31, 0.16));
}

/* Aktif slide zoom efekti */
.swiper-slide-active .hm-slide__image--main {
    transform: scale(var(--hm-image-active-scale, 1));
    filter: saturate(1.1);
}

.swiper-slide-active .hm-slide__media--contain .hm-slide__image--main {
    filter: drop-shadow(0 28px 48px rgba(2, 6, 23, 0.18)) saturate(1.1);
}

/* ---------- Karartma Katmanı ---------- */
.hm-slide__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, rgba(2, 6, 23, 0.92) 0%,  rgba(2, 6, 23, 0.54) 45%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, rgba(8, 17, 31, 0.24), rgba(8, 17, 31, 0.24));
    opacity: var(--hm-overlay-opacity, .62);
    pointer-events: none;
}

/* ---------- İçerik Yüzeyi ---------- */
.hm-slide__surface {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: clamp(56px, 7vw, 92px) 0;
}

.hm-slide__layout {
    display: flex;
    justify-content: flex-start;
}

.hm-slide--align-right  .hm-slide__layout { justify-content: flex-end; }
.hm-slide--align-center .hm-slide__layout { justify-content: center; }

/* ---------- İçerik Kutusu ---------- */
.hm-slide__content {
    width: min(100%, 590px);
    padding: clamp(24px, 4vw, 38px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.56));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.26);
}

.hm-slide--content .hm-slide__content {
    width: min(100%, 560px);
}

/* ---------- GİRİŞ ANİMASYONLARI ---------- */
@keyframes hmSlideUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes hmFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Elementler başlangıçta gizli */
.hm-slide__badge,
.hm-slide__title,
.hm-slide__sub,
.hm-slide__actions {
    opacity: 0;
    will-change: transform, opacity;
}

/* Aktif slide'da animasyon başlar */
.swiper-slide-active .hm-slide__badge {
    animation: hmSlideUp 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

.swiper-slide-active .hm-slide__title {
    animation: hmSlideUp 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
}

.swiper-slide-active .hm-slide__sub {
    animation: hmSlideUp 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.swiper-slide-active .hm-slide__actions {
    animation: hmSlideUp 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

/* Banner için basit fade */
.swiper-slide-active .hm-slide__banner-meta {
    animation: hmFadeIn 0.7s ease 0.08s both;
}

/* Tek slide varsa animasyon sıkışmaması için doğrudan göster */
.hm-hero-swiper--single .hm-slide__badge,
.hm-hero-swiper--single .hm-slide__title,
.hm-hero-swiper--single .hm-slide__sub,
.hm-hero-swiper--single .hm-slide__actions {
    opacity: 1;
    animation: none;
}

/* ---------- Badge ---------- */
.hm-slide__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(13, 148, 136, 0.2);
    border: 1px solid rgba(94, 234, 212, 0.18);
    color: #99f6e4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.hm-slide__badge--banner {
    background: rgba(30, 64, 175, 0.18);
    color: #bfdbfe;
    border-color: rgba(191, 219, 254, 0.18);
}

/* ---------- Başlık & Açıklama ---------- */
.hm-slide__title {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.55rem);
    line-height: 1.04;
    font-weight: 900;
}

.hm-slide__sub {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 1.8vw, 1.08rem);
    line-height: 1.75;
}

/* ---------- Aksiyon Butonları ---------- */
.hm-slide__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hm-btn-primary,
.hm-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, border-color .22s ease;
    white-space: nowrap;
}

.hm-btn-primary {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    border: 1px solid #14b8a6;
    color: #fff;
    box-shadow: 0 20px 36px rgba(13, 148, 136, 0.22);
}

.hm-btn-primary:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 26px 42px rgba(13, 148, 136, 0.28);
}

.hm-btn-outline {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hm-btn-outline:hover {
    transform: translateY(-2px);
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

/* ---------- Clickable Banner ---------- */
.hm-slide__banner-link {
    display: flex;
    align-items: stretch;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.hm-slide__banner-meta {
    width: min(100%, 560px);
    margin-top: auto;
    padding: clamp(24px, 4vw, 34px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.56));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.26);
    transition: transform .22s ease, box-shadow .22s ease;
}

.hm-slide__banner-link:hover .hm-slide__banner-meta {
    transform: translateY(-4px);
    box-shadow: 0 34px 64px rgba(2, 6, 23, 0.32);
}

.hm-slide__banner-copy { margin-bottom: 20px; }

/* ---------- Placeholder (Slide Yok) ---------- */
.hm-slide__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.78);
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.22), rgba(20, 184, 166, 0.16));
}

.hm-slide__placeholder i { font-size: 42px; }

/* ============================================================
   PROGRESS BAR — Autoplay süresini görselleştirir
   ============================================================ */
.hm-hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 20;
    overflow: hidden;
}

.hm-hero-progress__bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #14b8a6, #0d9488);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform linear;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.7);
}

/* ============================================================
   PAGİNATION & NAVİGASYON
   ============================================================ */
.hm-hero-swiper .swiper-pagination {
    bottom: 22px !important;
}

.hm-hero-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.44);
    opacity: 1;
    transition: width .25s ease, background-color .25s ease, opacity .25s ease;
}

.hm-hero-swiper .swiper-pagination-bullet-active {
    width: 28px;
    border-radius: 999px;
    background: #14b8a6;
}

.hm-hero-swiper .swiper-button-next,
.hm-hero-swiper .swiper-button-prev {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .22s ease, background-color .22s ease, box-shadow .22s ease;
}

.hm-hero-swiper .swiper-button-next:hover,
.hm-hero-swiper .swiper-button-prev:hover {
    transform: translateY(-2px);
    background: rgba(20, 184, 166, 0.82);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.28);
}

.hm-hero-swiper .swiper-button-next:after,
.hm-hero-swiper .swiper-button-prev:after {
    font-size: 16px;
    font-weight: 700;
}

/* ---------- Efekt Sınıfları ---------- */
.hm-hero-swiper--zoom .swiper-slide-active .hm-slide__image--main,
.hm-slide--banner:hover .hm-slide__image--main {
    transform: scale(var(--hm-image-zoom-scale, 1));
}

.hm-hero-swiper--parallax .hm-slide__image--main {
    transform: scale(var(--hm-image-parallax-scale, 1));
}

/* ============================================================
   ERİŞİLEBİLİRLİK
   ============================================================ */
.hm-hero-swiper:focus-visible {
    outline: 3px solid #14b8a6;
    outline-offset: 2px;
}

.hm-hero-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .hm-slide { min-height: 520px; }
    .hm-slide__surface { padding: 56px 0; }

    .hm-slide__content,
    .hm-slide__banner-meta { width: 100%; }

    .hm-slide__media--contain {
        width: 100%;
        inset: 0;
    }

    .hm-slide__media--contain .hm-slide__image--main {
        object-fit: contain;
        object-position: var(--hm-fp-x, 50%) var(--hm-fp-y, 50%);
        padding: 0;
        filter: saturate(1.05);
    }

    .hm-hero-swiper .swiper-button-next,
    .hm-hero-swiper .swiper-button-prev { display: none; }
}

@media (max-width: 767px) {
    .hm-slide { min-height: 460px; }
    .hm-slide__surface { padding: 32px 0 56px; }

    .hm-slide__content,
    .hm-slide__banner-meta {
        padding: 22px;
        border-radius: 24px;
    }

    .hm-slide__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hm-btn-primary,
    .hm-btn-outline { width: 100%; }

    .hm-hero-swiper .swiper-pagination { bottom: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-slide__badge,
    .hm-slide__title,
    .hm-slide__sub,
    .hm-slide__actions,
    .hm-slide__banner-meta {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .hm-slide__image--main,
    .hm-slide__image--backdrop {
        transform: none !important;
        transition: none !important;
    }

    .hm-hero-progress { display: none; }
}
