/* ══════════════════════════════════════════════════════════════════
   Solestra — anasayfa slider'ı
   Kutu oranı yüklenen görselden gelir (kırpma yok), ekran yüksekliğiyle sınırlı.
   Masaüstünde iki yanda boşluklu (framed) ya da tam genişlik.
   ══════════════════════════════════════════════════════════════════ */

.sl-hero {
    --sl-hero-gutter: 40px;
    --sl-hero-max-h: calc(100vh - 110px);

    position: relative;
    width: 100%;
    margin: 0 auto;
    color: #000;
}

.sl-hero--framed { padding: 0 var(--sl-hero-gutter); }

/* JS menünün iç kenarlarını ölçer: görsel soldan logoyla, sağdan son butonla hizalı (değer eksi de olabilir) */
.sl-hero--framed[style*="--sl-hero-ml"] { padding: 0; }
/* Genişlik açıkça verilmeli: auto'da oran + max-height genişliği daraltıyor */
.sl-hero--framed[style*="--sl-hero-ml"] .sl-hero__track {
    width: calc(100% - var(--sl-hero-ml) - var(--sl-hero-mr));
    margin-left: var(--sl-hero-ml);
    margin-right: var(--sl-hero-mr);
}
.sl-hero--framed[style*="--sl-hero-ml"] .sl-hero__ui {
    left: calc(var(--sl-hero-ml) + 6%);
    right: calc(var(--sl-hero-mr) + 24px);
}

/* Yükseklik: kısa (önerilen) altındaki içerik ilk ekranda görünsün */
.sl-hero--h-compact { --sl-hero-max-h: min(58vh, 620px); --sl-hero-max-h-m: 60svh; }
.sl-hero--h-medium { --sl-hero-max-h: min(72vh, 780px); --sl-hero-max-h-m: 70svh; }
.sl-hero--h-tall { --sl-hero-max-h: calc(100vh - 110px); --sl-hero-max-h-m: calc(100svh - 190px); }

/* Tema anasayfada içeriği menünün altına çekiyor (Rev Slider için, -65px); slider menünün altından başlasın */
#qodef-page-outer:has(.sl-hero) { margin-top: 0 !important; }

.sl-hero__track {
    position: relative;
    width: 100%;
    aspect-ratio: var(--sl-hero-ar-d, 2);
    max-height: var(--sl-hero-max-h);
    min-height: 340px;
    overflow: hidden;
    background: #f3f0ec;
}

/* ── Slayt: üst üste, yumuşak geçiş ── */
.sl-hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease, visibility 0s linear .9s;
}

.sl-hero__slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transition: opacity .9s ease;
}

.sl-hero__media,
.sl-hero__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
}

.sl-hero__img {
    object-fit: cover;
    object-position: center var(--sl-hero-focus, center);
    transform: scale(1.04);
    transition: transform 7s ease-out;
}

/* Aktif slaytta çok hafif yaklaşma (canlılık) */
.sl-hero__slide.is-active .sl-hero__img { transform: scale(1); }

/* ── Metin ── */
.sl-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(520px, 42%); /* görselin boş tarafında kalsın, modelin üstüne binmesin */
    margin: 0 6%;
}

.sl-hero__slide[data-align="center"] { justify-content: center; text-align: center; }
.sl-hero__slide[data-align="center"] .sl-hero__content { margin: 0 auto; }
.sl-hero__slide[data-align="right"] { justify-content: flex-end; }

.sl-hero__eyebrow {
    margin: 0 0 14px !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .26em;
    text-transform: uppercase;
}

.sl-hero__title {
    margin: 0 0 16px !important;
    font-size: clamp(30px, 3.6vw, 54px) !important;
    font-weight: 400 !important;
    line-height: 1.12 !important;
    letter-spacing: .04em !important;
    text-transform: none !important;
    color: inherit !important;
    text-wrap: balance;
}

.sl-hero__text {
    margin: 0 0 28px !important;
    font-size: 16px;
    line-height: 1.65;
    text-wrap: pretty;
}

.sl-hero__btn {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 34px;
    border: 1px solid currentColor;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background-color .2s, color .2s;
}

/* Metin girişi: aktif olunca hafifçe yukarı */
.sl-hero__content > * { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.sl-hero__slide.is-active .sl-hero__content > * { opacity: 1; transform: none; }
.sl-hero__slide.is-active .sl-hero__content > :nth-child(2) { transition-delay: .1s; }
.sl-hero__slide.is-active .sl-hero__content > :nth-child(3) { transition-delay: .2s; }
.sl-hero__slide.is-active .sl-hero__content > :nth-child(4) { transition-delay: .3s; }

/* Tema: koyu yazı (açık görsel) / açık yazı (koyu görsel) */
.sl-hero__slide[data-theme="dark"] { color: #000; }
.sl-hero__slide[data-theme="dark"] .sl-hero__eyebrow { color: #6b2332; }
.sl-hero__slide[data-theme="dark"] .sl-hero__btn { color: #000 !important; }
.sl-hero__slide[data-theme="dark"] .sl-hero__btn:hover { background: #000; color: #fff !important; }

.sl-hero__slide[data-theme="light"] { color: #fff; }
.sl-hero__slide[data-theme="light"] .sl-hero__btn { color: #fff !important; }
.sl-hero__slide[data-theme="light"] .sl-hero__btn:hover { background: #fff; color: #000 !important; }
.sl-hero__slide[data-theme="light"]:has(.sl-hero__content)::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
}
.sl-hero__slide[data-theme="light"][data-align="center"]:has(.sl-hero__content)::after { background: rgba(0, 0, 0, .22); }
.sl-hero__slide[data-theme="light"][data-align="right"]:has(.sl-hero__content)::after { background: linear-gradient(270deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0) 60%); }

/* Kutu: kalabalık görselde yazı yarı saydam beyaz zeminde */
.sl-hero__slide[data-theme="panel"] { color: #000; }
.sl-hero__slide[data-theme="panel"] .sl-hero__content {
    padding: clamp(24px, 3vw, 44px);
    background: rgba(255, 255, 255, .93);
}
.sl-hero__slide[data-theme="panel"] .sl-hero__text:last-child { margin-bottom: 0 !important; }
.sl-hero__slide[data-theme="panel"] .sl-hero__eyebrow { color: #6b2332; }
.sl-hero__slide[data-theme="panel"] .sl-hero__btn { color: #000 !important; }
.sl-hero__slide[data-theme="panel"] .sl-hero__btn:hover { background: #000; color: #fff !important; }

/* Butonsuz bağlantılı slayt: tüm alan tıklanır */
.sl-hero__link { position: absolute; inset: 0; z-index: 2; }

/* ── Alt kontroller: numaralı ilerleme çizgileri + oklar ── */
.sl-hero__ui {
    position: absolute;
    left: calc(var(--sl-hero-gutter) + 7%);
    right: calc(var(--sl-hero-gutter) + 24px);
    bottom: 24px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    pointer-events: none;
}

.sl-hero--full .sl-hero__ui { left: 7%; right: 24px; }
.sl-hero__ui > * { pointer-events: auto; }

.sl-hero__dots { display: flex; gap: 18px; }

.sl-hero__dot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    opacity: .55;
    transition: opacity .2s;
}

.sl-hero__dot:hover,
.sl-hero__dot.is-active { opacity: 1; }

.sl-hero__num { font-size: 11px; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }

.sl-hero__bar { position: relative; display: block; width: 46px; height: 1px; background: currentColor; opacity: .35; }
.sl-hero__dot.is-active .sl-hero__bar { opacity: 1; background: rgba(127, 127, 127, .45); }

.sl-hero__bar i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: currentColor;
}

.sl-hero__dot.is-active .sl-hero__bar i { animation: sl-hero-progress var(--sl-hero-interval, 6s) linear forwards; }
.sl-hero.is-paused .sl-hero__dot.is-active .sl-hero__bar i { animation-play-state: paused; }

@keyframes sl-hero-progress { to { width: 100%; } }

.sl-hero__arrows { display: flex; gap: 6px; }

.sl-hero__arrows button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.sl-hero__pause { border-color: transparent !important; }
.sl-hero__pause .i-play,
.sl-hero.is-paused .sl-hero__pause .i-pause { display: none; }
.sl-hero.is-paused .sl-hero__pause .i-play { display: block; }

/* Kontrollerin rengi aktif slaydın temasına uyar (JS gövdeye yazar) */
.sl-hero[data-ui="light"] .sl-hero__ui { color: #fff; }
.sl-hero[data-ui="dark"] .sl-hero__ui,
.sl-hero[data-ui="panel"] .sl-hero__ui { color: #000; }
.sl-hero[data-ui="light"] .sl-hero__arrows button:not(.sl-hero__pause):hover { background: #fff; color: #000; }
.sl-hero[data-ui="dark"] .sl-hero__arrows button:not(.sl-hero__pause):hover,
.sl-hero[data-ui="panel"] .sl-hero__arrows button:not(.sl-hero__pause):hover { background: #000; color: #fff; }
.sl-hero[data-ui="panel"] .sl-hero__arrows button { background: rgba(255, 255, 255, .9); }

/* ── Duyarlı ── */
@media (max-width: 1024px) {
    .sl-hero { --sl-hero-gutter: 24px; }
    .sl-hero__arrows button[data-dir] { display: none; }
}

/* Mobil: görsel üstte (mobil görselin oranında), metin altında beyaz zeminde — fotoğraf üstünde yazı okunmuyor */
@media (max-width: 767px) {
    .sl-hero { --sl-hero-gutter: 0px; }
    .sl-hero--framed { padding: 0; }

    .sl-hero__track {
        display: grid;
        aspect-ratio: auto;
        max-height: none;
        min-height: 0;
        background: none;
    }

    /* Tüm slaytlar aynı hücrede: yükseklik en uzun slayt kadar, geçişte sayfa zıplamaz */
    .sl-hero__slide {
        position: relative;
        inset: auto;
        grid-area: 1 / 1;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        color: #000 !important;
    }

    .sl-hero__media {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto !important;
        aspect-ratio: var(--sl-hero-ar-m, .75);
        max-height: var(--sl-hero-max-h-m, 60svh);
        overflow: hidden;
        background: #f3f0ec;
    }

    .sl-hero__slide::after { display: none !important; }

    .sl-hero__content,
    .sl-hero__slide[data-align="center"] .sl-hero__content,
    .sl-hero__slide[data-theme="panel"] .sl-hero__content { max-width: none; margin: 18px 0 0; padding: 0; background: none; text-align: left; }
    .sl-hero__eyebrow { margin-bottom: 8px !important; color: #6b2332 !important; }
    .sl-hero__title { margin-bottom: 10px !important; font-size: 26px !important; }
    .sl-hero__text { margin-bottom: 18px !important; font-size: 14px; color: #4d4d4d; }
    .sl-hero__btn { min-height: 46px; padding: 0 24px; color: #000 !important; }
    .sl-hero__btn:hover { background: #000 !important; color: #fff !important; }

    /* Kontroller görselin altında, metnin yanında değil: kendi satırında */
    .sl-hero__ui,
    .sl-hero--full .sl-hero__ui {
        position: static;
        margin-top: 16px;
        color: #000 !important;
    }
    .sl-hero--framed[style*="--sl-hero-ml"] .sl-hero__ui { margin-left: var(--sl-hero-ml); margin-right: var(--sl-hero-mr); }
    .sl-hero__dots { gap: 12px; }
    .sl-hero__bar { width: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .sl-hero__slide, .sl-hero__slide.is-active, .sl-hero__img, .sl-hero__content > * { transition: none; }
    .sl-hero__img { transform: none; }
    .sl-hero__dot.is-active .sl-hero__bar i { animation: none; width: 100%; }
}
