
/* ============================================================
   PWA — Mobile Bottom Navigation (sticky tab bar)
   Sadece mobilde görünür. Desktop'ta gizli.
   ============================================================ */
.mobile-bottom-nav { display: none; }

@media (max-width: 760px) {
    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 1000;
        background: rgba(17, 17, 17, 0.96);
        backdrop-filter: saturate(180%) blur(14px);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
    }
    .mb-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 4px;
        background: transparent;
        border: 0;
        cursor: pointer;
        text-decoration: none;
        font-family: inherit;
        color: rgba(255, 255, 255, 0.55);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.2px;
        transition: color 0.18s ease;
        border-radius: 8px;
        min-height: 52px;
    }
    .mb-nav-item:active { background: rgba(255, 255, 255, 0.05); }
    .mb-nav-item svg { width: 22px; height: 22px; transition: transform 0.18s ease; }
    .mb-nav-item span {
        max-width: 100%;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        line-height: 1.2;
    }
    .mb-nav-item.is-active { color: #ff8a00; }
    .mb-nav-item.is-active svg { transform: scale(1.08); }
    .mb-nav-item:hover { color: #ffb84d; }

    /* Rezervasyon (CTA) sekmesi — vurgulu */
    .mb-nav-cta {
        position: relative;
    }
    .mb-nav-cta::before {
        content: '';
        position: absolute;
        top: -1px; left: 50%;
        transform: translateX(-50%);
        width: 36px; height: 3px;
        background: linear-gradient(90deg, #ff8a00, #ffb84d);
        border-radius: 0 0 3px 3px;
    }
    .mb-nav-cta:not(.is-active) { color: rgba(255, 138, 0, 0.85); }
    .mb-nav-cta.is-active::before { height: 4px; }

    /* İçerik bottom nav'ın altına girmesin */
    body { padding-bottom: 64px; }
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }

    /* Footer'ın altına ekstra boşluk */
    .site-footer { margin-bottom: 0; }
}

/* iPhone notch / safe area uyumu — header */
@supports (padding-top: env(safe-area-inset-top)) {
    @media (max-width: 760px) {
        .site-header { padding-top: env(safe-area-inset-top); }
    }
}

/* ============================================================
   PWA — Mobile Polish (Faz 3)
   Tüm public sayfalarda native-app feel için ince ayarlar.
   Sadece mobilde aktif (max-width: 760px).
   ============================================================ */

@media (max-width: 760px) {
    /* === FORM INPUT'LAR — iOS zoom prevention (font ≥16px) + tap target === */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="search"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
        min-height: 44px;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 10px;
    }
    textarea { min-height: 80px; }

    /* === BUTONLAR — min 44x44 tap target + radius === */
    button,
    .btn,
    .booking-submit,
    .vehicle-select-btn,
    a.btn-primary,
    a.btn-secondary {
        min-height: 44px;
        font-size: 15px;
        border-radius: 10px;
        padding: 12px 18px;
    }
    button:active,
    .btn:active { transform: scale(0.97); }

    /* === BOOKING STEPS — adımlar mobilde küçük ama okunaklı === */
    .booking-steps {
        gap: 4px;
        padding: 8px;
        margin-bottom: 16px;
        font-size: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .booking-steps::-webkit-scrollbar { display: none; }
    .booking-step {
        padding: 8px 6px;
        font-size: 11px;
        min-width: 0;
        flex-shrink: 0;
    }
    .booking-step-num { width: 22px; height: 22px; font-size: 11px; }

    /* === VEHICLE CARDS — mobilde tek sütun, büyük dokunulabilir === */
    .vehicle-card {
        margin-bottom: 12px;
    }
    .vehicle-card:active { transform: scale(0.98); }
    .vehicle-card-img {
        height: 180px;
    }
    .vehicle-card-body { padding: 16px; }
    .vehicle-card h3 { font-size: 18px; }
    .vehicle-card-features { font-size: 13px; }
    .vehicle-select-btn { width: 100%; }

    /* === BOOKING SUMMARY (confirm sayfası) — kart düzeni === */
    .booking-summary,
    .booking-confirm-card,
    .booking-details-card {
        padding: 16px;
        border-radius: 14px;
        margin-bottom: 12px;
    }

    /* === BOOKING FORM — ana sayfa hero formu mobilde === */
    .booking-card {
        padding: 18px;
        border-radius: 18px;
    }
    .booking-card .field,
    .booking-card .field-grid > * {
        margin-bottom: 12px;
    }
    .booking-card label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    /* === HERO — mobilde dikey, padding tight === */
    .hero {
        min-height: auto;
    }
    .hero-text {
        text-align: center;
    }
    .hero-text h1 {
        font-size: clamp(28px, 7vw, 38px);
        line-height: 1.15;
    }
    .hero-text p { font-size: 15px; }

    /* === SECTION padding/margins — mobilde sıkı === */
    section { padding: 32px 16px !important; }
    .section-title { font-size: clamp(22px, 5.5vw, 28px); }
    .section-subtitle { font-size: 14px; line-height: 1.5; }

    /* === KART GRID'LERİ — tek sütun === */
    .services-grid,
    .regions-grid,
    .reviews-grid,
    .blog-grid,
    .gallery-grid,
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* === KART İÇERİĞİ === */
    .service-card,
    .region-card,
    .review-card,
    .blog-card,
    .feature-card {
        padding: 18px;
        border-radius: 16px;
    }

    /* === FOOTER — kompakt === */
    .site-footer {
        padding: 24px 16px 16px;
        font-size: 13px;
    }
    .footer-cols {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* === HEADER — mobilde kompakt === */
    .site-header {
        padding: 8px 12px;
    }
    .header-inner {
        gap: 8px;
    }
    .brand-logo {
        max-height: 32px;
        width: auto;
    }
    .brand-text { display: none; } /* logo zaten yazıyı içerir */

    /* === STICKY BOTTOM CTA (booking sayfalarında "İlerle" butonu) === */
    .booking-actions-sticky {
        position: sticky;
        bottom: 64px; /* bottom nav üstünde */
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        background: rgba(20, 20, 20, 0.95);
        backdrop-filter: blur(10px);
        padding: 12px 16px;
        margin: 16px -16px -16px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 100;
    }
    .booking-actions-sticky button {
        width: 100%;
    }

    /* === FAQ accordion === */
    .faq-item {
        border-radius: 12px;
        margin-bottom: 8px;
    }
    .faq-question {
        padding: 14px 16px;
        font-size: 15px;
        min-height: 48px;
    }
    .faq-answer {
        padding: 0 16px 14px;
        font-size: 14px;
        line-height: 1.6;
    }

    /* === BLOG POST içerik === */
    .blog-post,
    .post-content {
        padding: 16px;
        font-size: 15px;
        line-height: 1.7;
    }
    .post-content h1 { font-size: 24px; }
    .post-content h2 { font-size: 20px; }
    .post-content h3 { font-size: 18px; }
    .post-content img { border-radius: 12px; }

    /* === CONTACT formu === */
    .contact-form {
        padding: 16px;
    }
    .contact-info-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    /* === SCROLL — smooth iOS-like momentum === */
    html, body { -webkit-overflow-scrolling: touch; }

    /* === Hareket disable (PWA) — text seçimi sadece input'larda === */
    body, header, nav, main, footer, section, h1, h2, h3, h4, h5, h6, p, span:not(input *) {
        -webkit-touch-callout: none;
    }
    input, textarea, .selectable {
        -webkit-touch-callout: default;
        -webkit-user-select: text;
        user-select: text;
    }

    /* === Float aksiyonlar (WhatsApp FAB vb.) bottom nav üstünde === */
    .fab-whatsapp,
    .floating-cta {
        bottom: 80px !important;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* === Çok dar ekran (≤380px — eski telefonlar) === */
@media (max-width: 380px) {
    section { padding: 24px 12px !important; }
    .booking-card { padding: 14px; }
    .vehicle-card-img { height: 150px; }
    .mb-nav-item { font-size: 9px; }
    .mb-nav-item svg { width: 20px; height: 20px; }
}

/* === STANDALONE MODE (PWA olarak açıldığında) === */
@media (display-mode: standalone), (display-mode: fullscreen) {
    /* Tarayıcı çubuğu yok — header'ı tam app gibi göster */
    body { overscroll-behavior-y: none; }
    /* Selection iptal — native app feel */
    *:not(input):not(textarea):not([contenteditable]) {
        -webkit-user-select: none;
        user-select: none;
    }
}

/* === Yatay scroll önle + header'da: logo + currency + dil === */
@media (max-width: 760px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        width: 100%;
    }
    /* Header'dan kaldırılanlar (drawer'a taşındı) */
    .header-actions .header-phone,
    .header-actions .btn-login,
    .nav-toggle,
    .nav-main {
        display: none !important;
    }
    /* Currency + Lang header'da kalır — kompakt görünüm */
    .header-actions {
        gap: 6px;
        flex-wrap: nowrap;
    }
    .header-actions [data-dd-type="currency"],
    .header-actions [data-dd-type="lang"] {
        display: inline-flex;
    }
    /* Currency: sadece sembol + kod (örn ₺ TRY) */
    .header-actions [data-dd-type="currency"] .dd-option-name { display: none; }
    /* Dil: sadece bayrak (kod yok) */
    .header-actions [data-dd-type="lang"] .dd-trigger-label { display: none; }
    .header-actions [data-dd-type="lang"] .dd-option-name { display: none; }
    .header-actions [data-dd-type="lang"] .dd-flag { width: 22px; height: 16px; }
    /* Trigger butonları daha kompakt */
    .header-actions .dd-trigger {
        padding: 8px 10px;
        gap: 4px;
        min-height: 38px;
    }
    .header-inner { flex-wrap: nowrap; overflow: visible; gap: 8px; }
    /* Tüm bölümlerin overflow taşımasını kes */
    section, .section, main, .container, .wrap {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Dropdown panel'ler hero arkasında kalmasın — z-index yüksek */
    .site-header { position: relative; z-index: 100; }
    .header-actions .dd { position: relative; }
    .header-actions .dd-panel {
        z-index: 1050;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        min-width: 180px;
        max-width: 90vw;
        background: #161616;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        padding: 6px;
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* ============================================================
   MOBILE DRAWER (sağdan kayar) — bottom nav "Daha fazla"dan açılır
   ============================================================ */
.mobile-drawer-backdrop,
.mobile-drawer { display: none; }

@media (max-width: 760px) {
    .mobile-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 1100;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .mobile-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

    .mobile-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; right: 0;
        height: 100%;
        width: min(86vw, 340px);
        background: #161616;
        border-left: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
        z-index: 1110;
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(.4,.2,.2,1);
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
        overflow: hidden;
    }
    .mobile-drawer.is-open { transform: translateX(0); }

    .mobile-drawer-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 16px 18px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        flex-shrink: 0;
    }
    .mobile-drawer-header h2 {
        margin: 0;
        font-size: 16px;
        font-weight: 700;
        color: #fff;
        letter-spacing: 0.3px;
    }
    .mobile-drawer-close {
        width: 36px; height: 36px;
        display: inline-flex; align-items: center; justify-content: center;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #fff;
        border-radius: 50%;
        cursor: pointer;
        padding: 0;
    }
    .mobile-drawer-close:active { background: rgba(255, 255, 255, 0.12); }
    .mobile-drawer-close svg { width: 18px; height: 18px; }

    .mobile-drawer-body {
        flex: 1;
        overflow-y: auto;
        padding: 14px 14px 24px;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-drawer-nav {
        display: flex; flex-direction: column; gap: 2px;
        margin-bottom: 18px;
    }
    .mobile-drawer-nav a {
        display: flex; align-items: center; gap: 12px;
        padding: 12px 14px;
        color: rgba(255, 255, 255, 0.85);
        text-decoration: none;
        font-size: 15px;
        font-weight: 500;
        border-radius: 10px;
        min-height: 48px;
        transition: background 0.15s;
    }
    .mobile-drawer-nav a svg {
        width: 20px; height: 20px;
        color: rgba(255, 255, 255, 0.5);
        flex-shrink: 0;
    }
    .mobile-drawer-nav a:hover { background: rgba(255, 255, 255, 0.04); }
    .mobile-drawer-nav a:active { background: rgba(255, 255, 255, 0.08); }
    .mobile-drawer-nav a.is-active {
        background: rgba(255, 138, 0, 0.12);
        color: #ff8a00;
    }
    .mobile-drawer-nav a.is-active svg { color: #ff8a00; }

    .mobile-drawer-section { margin-bottom: 18px; }
    .mobile-drawer-section-title {
        font-size: 11px;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.45);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin: 0 0 8px;
        padding: 0 4px;
    }
    .mobile-drawer-chips {
        display: flex; flex-wrap: wrap; gap: 6px;
    }
    .mb-chip {
        display: inline-flex; align-items: center; gap: 6px;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.85);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
        min-height: 38px;
        transition: all 0.15s;
    }
    .mb-chip:active { transform: scale(0.96); }
    .mb-chip.is-active {
        background: rgba(255, 138, 0, 0.18);
        border-color: rgba(255, 138, 0, 0.5);
        color: #ff8a00;
    }
    .mb-chip-symbol { font-size: 14px; font-weight: 700; }
    .mb-chip-flag {
        width: 20px; height: 14px;
        border-radius: 2px;
        object-fit: cover;
    }

    .mobile-drawer-login {
        display: flex; align-items: center; justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, #ff8a00, #e07300);
        color: #fff;
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
        border-radius: 12px;
        box-shadow: 0 4px 14px rgba(255, 138, 0, 0.3);
        margin-bottom: 10px;
    }
    .mobile-drawer-login:active { transform: scale(0.98); }
    .mobile-drawer-login svg { width: 18px; height: 18px; }

    .mobile-drawer-wa {
        display: flex; align-items: center; justify-content: center; gap: 10px;
        width: 100%;
        padding: 14px;
        background: rgba(37, 211, 102, 0.12);
        border: 1px solid rgba(37, 211, 102, 0.3);
        color: #25d366;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        border-radius: 12px;
    }
    .mobile-drawer-wa:active { background: rgba(37, 211, 102, 0.18); }
    .mobile-drawer-wa svg { width: 18px; height: 18px; }

    body.mobile-drawer-open { overflow: hidden; }
}
