/* ============================================================
   HERO SECTION – Bootstrap container tabanlı carousel
   ============================================================ */

/* ---- Outer wrapper ---- */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    transition: background-color var(--transition-slow);
}

/* ---- Slide BG color per slide ---- */
.hero-section[data-slide="1"] { background-color: var(--slide-1-bg); }
.hero-section[data-slide="2"] { background-color: var(--slide-2-bg); }
.hero-section[data-slide="3"] { background-color: var(--slide-3-bg); }
.hero-section[data-slide="4"] { background-color: var(--slide-4-bg); }

/* ---- Slide BG images — kullanıcı ekleyecek ---- */
.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: 0;   /* bg görseli en altta */
}
.hero-slide.active::before { opacity: 1; }

/* .hero-slide[data-index="0"]::before { background-image: url('../images/slide-bg-1.jpg'); }
.hero-slide[data-index="1"]::before { background-image: url('../images/slide-bg-2.jpg'); }
.hero-slide[data-index="2"]::before { background-image: url('../images/slide-bg-3.jpg'); }
.hero-slide[data-index="3"]::before { background-image: url('../images/slide-bg-4.jpg'); } */

/* ---- Doodle overlay — z-index:1, slide içerik (10+) ALTINDA ---- */
.hero-doodles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;   /* biraz artırıldı ama içerik önünde değil */
    background-image: url('../images/doodle-pattern.svg');
    background-repeat: repeat;
    background-size: auto;
}

/* ---- Hero wave BG image — hero section içinde, z-index:2 ---- */
/* Header'dan çıkarıldı, hero section içine alındı.              */
/* Doodle (1) üstünde, slide içerik (10+) altında kalır.         */
.hero-wave-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Yüksekliği görsele bırak — orijinal boyutu korur */
    height: auto;
    z-index: 2;
    pointer-events: none;
}

.hero-wave-bg img {
    width: 100%;
    height: auto;       /* orijinal en-boy oranı — esnetme yok */
    display: block;
}

/* ---- Slide track — z-index:5 (wave:2 üstünde) ---- */
.hero-slides {
    position: relative;
    z-index: 5;
    min-height: calc(100vh - 110px);
}

/* ---- Single slide ---- */
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    /* Nav yüksekliği biraz azaltıldı — text dalgaya yakın */
    padding-top: calc(var(--nav-height) + 10px);
    /* padding-bottom: 130px; */
    display: flex;
    align-items: stretch;
}

.hero-slide .container { position: relative; z-index: 10; }

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 5;
}

/* ---- Metin kolonu ---- */
.hero-text-col {
    display: flex;
    align-items: center;
}

/* Flex column — buton her zaman sabit konumda */
.hero-text {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Büyük başlık — tek satırda kalır */
.hero-title-main {
    font-family: var(--font-display);
    font-size: clamp(36px, 4.2vw, 76px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    transition: color var(--transition-slow);
    white-space: normal;   /* iki kelimeyse alt satıra geçebilir ama daha küçük font */
}

.hero-section[data-slide="1"] .hero-title-main { color: var(--slide-1-title); }
.hero-section[data-slide="2"] .hero-title-main { color: var(--slide-2-title); }
.hero-section[data-slide="3"] .hero-title-main { color: var(--slide-3-title); }
.hero-section[data-slide="4"] .hero-title-main { color: var(--slide-4-title); }

/* Alt başlık */
.hero-title-sub {
    font-family: var(--font-primary);
    font-size: clamp(14px, 1.8vw, 26px);
    font-weight: 300;
    letter-spacing: 0.50em;
    color: var(--color-dark-brown);
    margin-top: 4px;
    margin-bottom: 24px;
}

/* Açıklama — 4 satıra sabit, buton konumu değişmiyor */
.hero-description {
    font-size: 15px;
    line-height: 1.75;
    color: var(--color-dark-brown);
    opacity: 0.78;
    margin-bottom: 32px;
    /* 4 satır sabit */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* min-height: 4 satır * 1.75 line-height * 15px ≈ 105px */
    /* min-height: calc(15px * 1.75 * 4); */
}

/* ----------------------------------------------------------------
   CTA BUTONU
   Pill şekli, sağ kenardan yarım daire ısırık (bite) efekti.
   Tek mask layer: circle merkezi tam sağ kenarda (100% 50%).
   Dairenin sol yarısı butona giriyor → görsel "bite" oluşuyor.
   ---------------------------------------------------------------- */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--cta-bg, var(--color-dark-brown));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 14px 30px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.3s ease,
                background 0.5s ease;
}

/* Slide renklerine göre buton rengi */
.hero-section[data-slide="1"] .hero-cta { --cta-bg: var(--slide-1-title); }
.hero-section[data-slide="2"] .hero-cta { --cta-bg: var(--slide-2-title); }
.hero-section[data-slide="3"] .hero-cta { --cta-bg: var(--slide-3-title); }
.hero-section[data-slide="4"] .hero-cta { --cta-bg: var(--slide-4-title); }

/* Ripple / shine efekti */
.hero-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        transparent 0%,
        rgba(255,255,255,0.22) 50%,
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.55s ease;
    border-radius: inherit;
}

.hero-cta:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 14px 32px rgba(0,0,0,0.22);
    color: #fff;
}

.hero-cta:hover::after {
    transform: translateX(100%);
}

.hero-cta:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}

.hero-cta i {
    font-size: 12px;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.hero-cta:hover i {
    transform: translateX(4px);
}

/* ---- Tabak kolonu — sağa yaslanmış, container sınırından taşıyor ---- */
.hero-plate-col {
    display: flex;
    align-items: center;
    justify-content: center;   /* tabağı sağ kenara it */
    overflow: visible;
    padding-right: 0;
}

.hero-plate-wrap {
    display: flex;
    align-items: center;
    /* Container'ın sağ kenarından viewport sağ kenarına kadar taş */
    /* margin-right: -8vw; */
}

.hero-plate-img {
    /* Laptop (1200-1400px) ekranda sığacak boyut */
    width: clamp(320px, 44vw, 580px);
    height: clamp(320px, 44vw, 580px);
    object-fit: cover;
    border-radius: 50%;
    filter: drop-shadow(0 28px 60px rgba(116,89,68,0.28));
    transform-origin: center center;
    will-change: transform, opacity;
    flex-shrink: 0;
}

/* ============================================================
   WHEEL ANIMATION — tabak sağdan girip sağa çıkar
   ============================================================ */
@keyframes wheelInRight {
    from { transform: translateX(130%) translateY(55%)  rotate(210deg) scale(0.5); opacity: 0; }
    to   { transform: translateX(0)    translateY(0)    rotate(0deg)   scale(1);   opacity: 1; }
}
@keyframes wheelOutRight {
    from { transform: translateX(0)    translateY(0)    rotate(0deg)    scale(1);   opacity: 1; }
    to   { transform: translateX(130%) translateY(-55%) rotate(-190deg) scale(0.5); opacity: 0; }
}
@keyframes wheelInRightPrev {
    from { transform: translateX(130%) translateY(-55%) rotate(-210deg) scale(0.5); opacity: 0; }
    to   { transform: translateX(0)    translateY(0)    rotate(0deg)    scale(1);   opacity: 1; }
}
@keyframes wheelOutRightPrev {
    from { transform: translateX(0)    translateY(0)   rotate(0deg)   scale(1);   opacity: 1; }
    to   { transform: translateX(130%) translateY(55%) rotate(190deg) scale(0.5); opacity: 0; }
}

@keyframes textFadeUp {
    from { transform: translateY(28px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes textFadeOut {
    from { transform: translateY(0);     opacity: 1; }
    to   { transform: translateY(-24px); opacity: 0; }
}

.hero-slide.entering-next .hero-plate-img {
    animation: wheelInRight 0.82s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}
.hero-slide.entering-next .hero-text {
    animation: textFadeUp 0.55s 0.2s ease forwards;
    opacity: 0;
}
.hero-slide.leaving-next .hero-plate-img {
    animation: wheelOutRight 0.52s cubic-bezier(0.4, 0, 1, 1) forwards;
}
.hero-slide.leaving-next .hero-text {
    animation: textFadeOut 0.38s ease-in forwards;
}

.hero-slide.entering-prev .hero-plate-img {
    animation: wheelInRightPrev 0.82s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}
.hero-slide.entering-prev .hero-text {
    animation: textFadeUp 0.55s 0.2s ease forwards;
    opacity: 0;
}
.hero-slide.leaving-prev .hero-plate-img {
    animation: wheelOutRightPrev 0.52s cubic-bezier(0.4, 0, 1, 1) forwards;
}
.hero-slide.leaving-prev .hero-text {
    animation: textFadeOut 0.38s ease-in forwards;
}

/* ============================================================
   BOTTOM BAR — thumbnail + counter, container ile hizalı
   ============================================================ */
.hero-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 15;  /* wave(2) ve slides(5) üstünde */
    /* Her cihazda sabit alt boşluk */
    padding-top: 20px;
    padding-bottom: 32px;
}

.hero-thumbnails {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Thumbnail item */
.thumb-item {
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.thumb-item:hover  { transform: scale(1.10); }
.thumb-item:active { transform: scale(0.94); }

.thumb-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.thumb-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.4s ease;
}

.thumb-item:hover .thumb-circle img { transform: scale(1.12); }

.thumb-item.active .thumb-circle {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(190,96,27,0.18);
}

.thumb-item::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.thumb-item.active::after { transform: translateX(-50%) scale(1); }

/* Slide counter */
.hero-counter {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.hero-counter .current {
    font-size: 38px;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.hero-counter .sep,
.hero-counter .total {
    font-size: 18px;
    color: var(--color-mid-brown);
    opacity: 0.45;
}

/* ============================================================
   WAVE / TITLE COLOR transitions
   ============================================================ */
.hero-wave-path { transition: fill var(--transition-slow); }

.hero-section[data-slide="1"] .hero-wave-path { fill: var(--slide-1-wave); }
.hero-section[data-slide="2"] .hero-wave-path { fill: var(--slide-2-wave); }
.hero-section[data-slide="3"] .hero-wave-path { fill: var(--slide-3-wave); }
.hero-section[data-slide="4"] .hero-wave-path { fill: var(--slide-4-wave); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Laptop: 992–1280px — sıkışma önleme */
@media (min-width: 992px) and (max-width: 1280px) {
    .hero-title-main {
        font-size: clamp(32px, 3.6vw, 56px);
    }
    .hero-title-sub {
        font-size: clamp(12px, 1.3vw, 18px);
        letter-spacing: 0.22em;
    }
    .hero-description {
        font-size: 14px;
    }
    .hero-plate-img {
        width: clamp(280px, 38vw, 480px);
        height: clamp(280px, 38vw, 480px);
    }
    .hero-plate-wrap {
        margin-right: -4vw;   /* daha az taşma */
    }
    .thumb-circle {
        width: 72px;
        height: 72px;
    }
    .hero-thumbnails { gap: 14px; }
}

/* Tablet: ≤ 991px */
@media (max-width: 991.98px) {
    .hero-slide {
        padding-top: calc(var(--nav-height) + 20px);
        padding-bottom: 140px;   /* thumbnail bar alanı */
    }

    .hero-text-col,
    .hero-plate-col { justify-content: center; }

    /* Metni ortala ama flex column koru */
    .hero-text {
        max-width: 100%;
        text-align: center;
        align-items: center;   /* CTA da ortalansın */
    }

    .hero-description { min-height: auto; text-align: left; }

    .hero-plate-wrap { margin-right: 0; justify-content: center; }
    .hero-plate-img  { width: 240px; height: 240px; }

    .hero-thumbnails { gap: 14px; }
    .thumb-circle    { width: 64px; height: 64px; }
    .hero-bottom-bar { padding-bottom: 28px; }
}

/* Mobile: ≤ 575px */
@media (max-width: 575.98px) {
    .hero-slide {
        padding-bottom: 120px;
    }

    .hero-text {
        align-items: center;
    }

    .hero-description {
        font-size: 14px;
        min-height: auto;
        -webkit-line-clamp: 3;  /* 3 satıra düşür */
    }

    .hero-thumbnails { gap: 8px; }
    .thumb-circle    { width: 52px; height: 52px; }
    .hero-counter .current { font-size: 26px; }
    .hero-bottom-bar { padding-bottom: 18px; }
}
