/* =========================================
   1. GLOBAL SIFIRLAMA (TAŞMA ENGELİ)
========================================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent; 
}

html, body {
    width: 100%;
    overflow-x: hidden; /* Sağa kaymayı tamamen engeller */
}

body { 
    font-family: 'Poppins', sans-serif; 
    background: #f4f7fa; 
    display: flex; 
    justify-content: center; 
    min-height: 100vh; 
    color: #1e293b; 
}

.container { 
    background: #fff; 
    padding: 30px 20px; 
    border-radius: 20px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); 
    width: 100%; 
    max-width: 480px; 
    height: fit-content; 
    margin: 15px auto;
}

/* Header & Logo */
.site-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 25px; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #edf2f7; 
}
.main-logo { max-width: 110px; height: auto; }
.lang-switch { display: flex; gap: 8px; }
.lang-link { text-decoration: none; font-size: 11px; color: #718096; font-weight: 600; display: flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid #e2e8f0; border-radius: 8px; }
.lang-link.active { border-color: #3182ce; color: #3182ce; background: #ebf8ff; }

/* Adımlar */
.step { display: none; flex-direction: column; gap: 18px; width: 100%; }
.step.active { display: flex; }
.progress-bar { width: 100%; height: 6px; background: #edf2f7; border-radius: 10px; overflow: hidden; }
.progress-bar .fill { height: 100%; background: #3182ce; transition: width 0.4s ease; }
h2 { font-size: 18px; color: #2d3748; text-align: center; font-weight: 600; margin: 5px 0; }

/* =========================================
   2. SORUN 1: TARİH ALANI TAŞMA DÜZELTMESİ
========================================= */
.input-stack { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    width: 100%; 
}

input[type="date"], 
input[type="number"], 
input[type="text"], 
input[type="email"], 
input[type="tel"], 
select { 
    width: 100% !important; /* Ekranın %100'ünü kapla (taşma yapmaz) */
    max-width: 100%;
    padding: 14px; 
    border: 1px solid #e2e8f0; 
    border-radius: 12px; 
    font-size: 16px; /* iPhone zoom engelleme */
    background-color: #fff;
    -webkit-appearance: none; /* iOS standart stilini temizle */
}

/* =========================================
   3. SORUN 2: KONAKLAMA YAN YANA DÜZENİ
========================================= */
.radio-cards { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Daima 2 sütun (yan yana) */
    gap: 12px; 
    width: 100%; 
}

.card { 
    border: 2px solid #e2e8f0; 
    padding: 20px 5px; 
    border-radius: 14px; 
    text-align: center; 
    cursor: pointer; 
    background: #f8fafc;
}

.card input { display: none; } /* Gizli radio buton */
.card-text { font-size: 14px; font-weight: 700; color: #2d3748; }
.card:has(input:checked) { border-color: #3182ce; background: #eff6ff; }

/* =========================================
   4. SORUN 3: BÜTÇE SLIDER (TAM GENİŞLİK)
========================================= */
.budget-box { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    width: 100%; 
}

/* Kaydırma çubuğunu (range) tam genişlik yap */
input[type="range"] { 
    width: 100% !important; 
    cursor: pointer;
    height: 30px;
    -webkit-appearance: none;
}

/* Kaydırma çubuğu kafası (iPhone özel) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #3182ce;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-top: -10px; /* Ortalamak için */
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #cbd5e0;
    border-radius: 2px;
}

/* =========================================
   5. DİĞER ALANLAR (TELEFON VE ÖZET)
========================================= */
.phone-row { display: flex; gap: 8px; width: 100%; }
.phone-row select { width: 90px !important; flex: 0 0 90px; }
.phone-row input { flex: 1; }

.summary-box { background: #f8fafc; border-radius: 16px; padding: 5px 15px; border: 1px solid #e2e8f0; }
.summary-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf2f7; }
.edit-btn { width: 40px !important; height: 40px !important; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }

.btn-row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-top: 10px; width: 100%; }
.btn-next, .btn-submit { background: #3182ce; color: #fff; border: none; font-weight: 600; height: 52px; border-radius: 12px; }
.btn-prev { background: #fff; color: #718096; border: 1px solid #e2e8f0; height: 52px; border-radius: 12px; }

/* =========================================
   6. MOBİL ÖZEL AYARLAR (IPHONE 17)
========================================= */
@media (max-width: 600px) {
    .container { 
        border-radius: 0; 
        min-height: 100vh; 
        padding: 20px 15px; 
        margin: 0; 
        width: 100vw;
    }
    
    /* Bütçe çubuğunu mobilde daha vurgulu yap */
    input[type="range"] { margin: 10px 0; }

    /* Butonları mobilde alt alta alalım (Ekrana sığma garantisi) */
    .btn-row { grid-template-columns: 1fr; }
    .btn-prev { order: 2; border: none; background: transparent; height: 40px; }
    .btn-next { order: 1; }
    
    /* Konaklama yazı boyutu sığmazsa diye minik küçültme */
    .card-text { font-size: 13px; }
}

/* =========================================
   TATİL TİPİ KARTLARINI DÜZELT
========================================= */
.checkbox-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Mobilde 2 sütun */
    gap: 10px; 
    width: 100%; 
    margin-top: 10px;
}

.check-card { 
    border: 1px solid #e2e8f0; 
    padding: 15px 10px; 
    border-radius: 12px; 
    text-align: center; 
    cursor: pointer; 
    background: #fff; 
    min-height: 60px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 14px; 
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

/* O Çirkin Radyo Butonlarını Gizle */
.check-card input[type="radio"],
.check-card input[type="checkbox"] { 
    display: none !important; 
}

/* Seçildiğinde Kartın Alacağı Hal */
.check-card:has(input:checked) { 
    border-color: #3182ce !important; 
    background: #ebf8ff !important; 
    color: #2c5282 !important; 
    font-weight: 600 !important;
    box-shadow: 0 4px 6px rgba(49, 130, 206, 0.1);
}

/* PC/Büyük Ekranlarda 4 sütun yapalım daha güzel durur */
@media (min-width: 768px) {
    .checkbox-grid { 
        grid-template-columns: 1fr 1fr 1fr 1fr; 
    }
}

/* Mobilde yazılar sığmazsa diye ayar */
@media (max-width: 400px) {
    .check-card {
        font-size: 12px;
        padding: 10px 5px;
    }
}

/* =========================================
   SUCCESS SCREEN - MODERN TASARIM
========================================= */
.success-screen {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    animation: fadeIn 0.6s ease-in-out;
}

/* Konfeti İkonu Animasyonu */
.confetti {
    font-size: 80px;
    margin-bottom: 25px;
    display: inline-block;
    animation: celebrate 1s infinite alternate ease-in-out;
}

@keyframes celebrate {
    from { transform: scale(1); rotate: -5deg; }
    to { transform: scale(1.2); rotate: 5deg; }
}

.success-card h1 {
    font-size: 28px;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.success-card p {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* "Yeni Planlama Yap" Butonu */
.success-screen .btn-submit {
    background: linear-gradient(135deg, #3182ce 0%, #2563eb 100%);
    color: white;
    padding: 18px 35px;
    border-radius: 16px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
    display: block;
}

.success-screen .btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* MOBIL AYARLAR */
@media (max-width: 600px) {
    .success-screen {
        padding: 80px 15px; /* Mobilde dikeyde daha iyi ortalar */
    }
    
    .success-card h1 {
        font-size: 24px;
    }
    
    .success-card p {
        font-size: 15px;
    }
}

/* Başarı ekranının ana kapsayıcısını tam ekran ve ortalı yapıyoruz */
.success-screen {
    display: flex;
    flex-direction: column;
    align-items: center;    /* Yatayda tam orta */
    justify-content: center; /* Dikeyde tam orta */
    text-align: center;
    min-height: 50vh;       /* Sayfanın yarısını kaplasın, içeriği ortalasın */
    padding: 40px 20px;
    width: 100%;
}

.success-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;    /* İçindeki tüm öğeleri (h1, p, buton) ortalar */
}

/* Butonun kendisini ve içindeki metni ortalıyoruz */
.success-screen .btn-submit {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 auto;         /* Dış boşlukları otomatik yaparak ortalar */
    background: linear-gradient(135deg, #3182ce 0%, #2563eb 100%);
    color: white;
    padding: 18px 30px;
    border-radius: 16px;
    font-weight: 600;
    text-decoration: none;
    width: 100%;
    max-width: 280px;       /* Mobilde butonun çok yayılmasını engeller */
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.success-screen .btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.3);
}

/* Mobilde butonun parmakla kolay tıklanması için ufak ayar */
@media (max-width: 600px) {
    .success-screen {
        padding-top: 10vh; /* Mobilde biraz daha yukarıdan başlasın */
    }
    .success-screen .btn-submit {
        width: 90%;      /* Ekranın %90'ını kaplasın ama ortalı kalsın */
    }
}