@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1e3a8a;
    --accent: #38bdf8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-dim: #64748b;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background: radial-gradient(circle at top right, var(--primary-dark), #0f172a);
    color: white;
    padding: 40px 20px 80px; /* Paddingleri azalttım (Eski: 60px-100px) */
    text-align: center;
}

@media (min-width: 768px) {
    header { padding: 80px 20px 140px; }
}

header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- LAYOUT SİSTEMİ --- */
.layout {
    max-width: 1440px;
    margin: -60px auto 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
}

/* Masaüstü: Yan panelleri sığdırmak için 180px genişlik ve otomatik esneme */
@media (min-width: 1200px) {
    .layout {
        display: grid;
        /* Yan panelleri 180px yaptık (Metinlerin taşmaması için) */
        grid-template-columns: 180px 1.5fr 1fr 180px; 
        margin-top: -80px;
        padding: 0 20px;
        gap: 24px;
        align-items: start;
    }
}

/* --- YAN PANELLER (ESNEK YAPI) --- */
.side-panel {
    display: none; /* Mobilde gizle */
}

@media (min-width: 1200px) {
    .side-panel {
        display: block;
        position: sticky;
        top: 20px;
        z-index: 5;
    }
}

.promo-box {
    width: 100%;
    height: 700px;
    /* Sabit 700px silindi, içeriğe göre uzayacak */
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.promo-tag {
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    padding: 10px 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-content {
    padding: 20px 12px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
    word-wrap: break-word; /* Uzun kelimeleri böler */
}

.promo-content p {
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
}

/* --- KARTLAR --- */
.content, .calculator {
    background: var(--card-bg);
    border-radius: 20px;
    padding: clamp(20px, 4vw, 35px);
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    width: 100%;
}

@media (max-width: 1199px) {
    .calculator { order: -1; } /* Mobilde hesap makinesi üste */
}

/* --- FORMÜL & STATS --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.stat-card {
    padding: 20px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    text-align: center;
}

.formula-box {
    background: #eff6ff;
    border-radius: 16px;
    padding: 20px;
    margin: 25px 0;
    border: 1px dashed var(--primary);
    text-align: center;
}

/* --- INPUTLAR VE BUTON --- */
input[type="number"], 
input[type="text"], 
input[type="email"], 
textarea {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: 12px;
    border: 2px solid var(--border);
    outline: none;
    transition: all 0.3s;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

button, .submit-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

footer {
    margin-top: 60px;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: white;
}
/* Input ve butonu yan yana tutan grup */
.input-group-flex {
    display: flex;
    gap: 0; /* Aradaki boşluğu kapatıp birleşik görünüm sağlıyoruz */
    margin-top: 8px;
    position: relative;
}

/* Sol taraftaki inputun sağ köşelerini düzleştir */
.input-group-flex input {
    flex: 1;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none; /* Orta çizgiyi kaldır */
}

/* Sağ taraftaki Opet butonunun sol köşelerini düzleştir */
.opet-btn {
    width: auto !important; /* Global %100 genişliği ez */
    padding: 0 15px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f1f5f9 !important; /* var(--bg-color) tonlarında */
    color: var(--primary-dark) !important;
    border: 2px solid var(--border) !important;
    border-left: 1px solid var(--border) !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover durumunda Opet butonu senin vurgu rengini alsın */
.opet-btn:hover {
    background: var(--accent) !important;
    color: var(--primary-dark) !important;
    transform: none !important; /* Ana butonlardaki zıplama efektini burada kapattık */
    box-shadow: none !important;
}

/* JS'den gelen küçük başarı/hata mesajları için stil */
.result small {
    display: block;
    margin-top: 10px;
    padding: 10px;
    background: #f0fdf4; /* Hafif yeşil arka plan */
    border-radius: 8px;
    font-size: 12px;
    color: #166534;
    border: 1px solid #bbf7d0;
    animation: fadeInUp 0.4s ease;
}

/* Animasyon: Mesajın aşağıdan yukarı gelmesi */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Mobil İletişim Kartı */
.mobile-contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    margin-top: 20px;
    background: #f0f9ff; /* Açık mavi arka plan */
    border: 2px dashed #38bdf8; /* Kesik çizgili kenarlık */
    border-radius: 16px;
    text-align: center;
}

.mcc-icon {
    font-size: 24px;
    background: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.mcc-text h4 {
    color: #1e3a8a;
    margin-bottom: 5px;
}

.mcc-text p {
    font-size: 0.85rem;
    color: #64748b;
}

.mcc-button {
    text-decoration: none;
    background: #2563eb;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    width: 100%;
  }

.mcc-button:hover {
    background: #1e40af;
}

/* Masaüstünde (Geniş ekranlarda) bu kartı gizle, çünkü yan paneller zaten var */
@media (min-width: 1200px) {
    .mobile-contact-card {
        display: none;
    }
}