/* =========================================
   ATÖLYESEL - ANA LAYOUT CSS V3.2 (GÜNCELLENDİ)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
    --white:        #ffffff;
    --bg:           #f7f5f2;
    --primary:      #c69d4e;
    --primary-soft: #fff1ee;
    --primary-dark: #c69d4e;
    --ink:          #1a1a1a;
    --ink-2:        #444444;
    --ink-3:        #888888;
    --border:       #eae8e4;
    --border-2:     #d8d5d0;
    --radius-pill:  999px;
    --radius-lg:    16px;
    --shadow-sm:    0 4px 16px rgba(0,0,0,.08);
    --shadow-md:    0 12px 32px rgba(0,0,0,.10);
    --ease:         cubic-bezier(.25,.46,.45,.94);
    --font:         'Plus Jakarta Sans', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: var(--font); 
    background-color: var(--bg); 
    color: var(--ink); 
    line-height: 1.6; 
    overflow-x: hidden; 
}
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ─── BUTONLAR ─── */
.btn { 
    display: inline-flex; align-items: center; justify-content: center; 
    padding: 12px 24px; border-radius: var(--radius-pill); 
    font-weight: 700; font-size: 14px; cursor: pointer; 
    transition: all 0.25s var(--ease); border: 2px solid transparent; 
    text-decoration: none; white-space: nowrap;
}
.btn-primary { background-color: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { 
    background-color: var(--primary-dark); border-color: var(--primary-dark);
    transform: translateY(-2px); box-shadow: 0 8px 24px rgba(198,157,78,.35);
}
.btn-outline { background: transparent; border-color: var(--border-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); background: var(--white); }

/* ─── HEADER & NAV (GÜNCELLENDİ) ─── */
.main-header { 
    background: var(--white); 
    border-bottom: 1px solid var(--border); 
    padding: 16px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

/* Kapsayıcının genişliği artırıldı ve daha esnek hale getirildi */
.header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: relative; 
    max-width: 1400px; 
    margin: 0 auto;
    padding: 0 24px;
    gap: 20px;
} 

.logo a { 
    font-size: 22px; 
    font-weight: 900; 
    color: var(--ink); 
    text-decoration: none; 
    letter-spacing: -0.04em; 
    white-space: nowrap;
}
.logo span { color: var(--primary); }

/* Menü ve Butonların kapsayıcısı esnek hale getirildi */
.nav-wrapper { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    flex: 1; 
}

@media (min-width: 993px) {
    .nav-menu {
        display: flex; 
        gap: 24px; /* Boşluk toleransı dengelendi */
        align-items: center;
        justify-content: center;
        flex: 1; /* Menüyü tam ortaya oturtur */
    }
}

.nav-menu > a, .dropdown-btn { 
    color: var(--ink-2); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 14px;
    transition: color 0.25s var(--ease); 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    cursor: pointer;
    white-space: nowrap; /* Metinlerin alt satıra geçmesi engellendi */
}
.nav-menu > a:hover, .dropdown-btn:hover { color: var(--primary); }
.highlight-link { color: var(--primary) !important; }

/* Sağ taraftaki butonlar kısmı */
.header-actions { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-left: auto;
}
.btn-logout {
    background: transparent; 
    border: none; 
    color: var(--ink-3); 
    font-weight: 700;
    font-size: 14px; 
    cursor: pointer; 
    margin-left: 8px; 
    font-family: var(--font); 
    transition: color 0.2s;
}
.btn-logout:hover { color: var(--primary); }

/* ─── DROPDOWN (HOVER KÖPRÜSÜ) ─── */
.dropdown { position: relative; }
.dropdown::after {
    content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 20px;
}

.dropdown-content { 
    display: none; position: absolute; 
    top: calc(100% + 15px); 
    left: 50%; transform: translateX(-50%); 
    background: var(--white); min-width: 240px; box-shadow: var(--shadow-md); 
    border-radius: var(--radius-lg); z-index: 200; border: 1px solid var(--border); overflow: hidden; 
}
.dropdown-content a { 
    color: var(--ink); padding: 14px 20px; text-decoration: none; display: block; 
    font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--border); transition: all 0.2s var(--ease); 
}
.dropdown-content a:hover { background: var(--primary-soft); color: var(--primary); padding-left: 26px; }
.dropdown-content a:last-child { border-bottom: none; }

.dropdown-btn svg { transition: transform 0.3s ease; }
@media (min-width: 993px) {
    .dropdown:hover .dropdown-btn svg { transform: rotate(180deg); }
    .dropdown:hover .dropdown-content { display: block; animation: dropIn 0.3s var(--ease); }
}
@keyframes dropIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ─── RESPONSIVE & MOBİL MENÜ (OPTİMİZE EDİLDİ) ─── */
.mobile-toggle { 
    display: none; 
    background: transparent; 
    border: none; 
    cursor: pointer; 
    color: var(--ink); 
    padding: 4px;
    z-index: 1001;
}

@media (max-width: 992px) {
    .mobile-toggle { display: block; }
    
    /* Tam Ekran Menü Katmanı */
    .nav-wrapper { 
        position: fixed; 
        top: 70px; /* Header Yüksekliği */
        left: 0; 
        width: 100%; 
        /* Dinamik Viewport Height ile tarayıcı barlarını hesaba katar */
        height: calc(100vh - 70px); 
        height: calc(100dvh - 70px); 
        background: var(--white); 
        /* Alt kısımdan ekstra boşluk (100px) bırakılarak butonun bar altında kalması engellendi */
        padding: 24px 24px 100px 24px; 
        flex-direction: column; 
        gap: 16px; /* Dikey boşluklar optimize edildi */
        z-index: 999;
        overflow-y: auto; 
        /* Animasyon */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s var(--ease);
    }
    
    .nav-wrapper.active { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: flex; 
    }
    
    .nav-menu { 
        position: static; 
        flex-direction: column; 
        width: 100%; 
        align-items: stretch; 
        gap: 0; 
        transform: none;
    }
    
    /* Genişletilmiş Dokunmatik Hedefler */
    .nav-menu > a, .dropdown-btn { 
        font-size: 1.1rem; 
        width: 100%; 
        justify-content: space-between;
        padding: 14px 0; /* Hücre yükseklikleri daraltıldı */
        border-bottom: 1px solid var(--border);
    }
    .nav-menu > a:last-child { border-bottom: none; }

    /* Mobil Dropdown İzolasyonu */
    .dropdown { width: 100%; }
    .dropdown::after { display: none; }
    .dropdown-content { 
        position: static; 
        box-shadow: none; 
        border: none; 
        background: var(--bg);
        border-radius: var(--radius-md); 
        width: 100%; 
        margin-top: 8px; 
        margin-bottom: 16px;
        padding: 8px;
        transform: none; 
        display: none;
    }
    .dropdown-content a { 
        padding: 12px 16px; 
        border-bottom: none;
        border-radius: 8px;
    }
    .dropdown-content a:hover { background: var(--white); }
    
    .dropdown.is-open .dropdown-content { display: block; }
    .dropdown.is-open .dropdown-btn svg { transform: rotate(180deg); color: var(--primary); }

    .header-actions { 
        width: 100%; 
        flex-direction: column; 
        border-top: none; 
        padding-top: 12px; 
        gap: 12px; 
        margin-top: auto;
        margin-bottom: 24px; /* Butonların altına ek boşluk eklendi */
    }
    .header-actions .btn { width: 100%; padding: 14px; font-size: 15px;}
}

/* ─── FOOTER & MAIN ─── */
.main-content { min-height: 80vh; }
.main-footer { background: var(--white); padding: 60px 0 40px; text-align: center; border-top: 1px solid var(--border); }
.footer-logo { font-size: 20px; font-weight: 900; color: var(--ink); letter-spacing: -0.04em; margin-bottom: 12px; }
.footer-copyright { font-size: 13px; color: var(--ink-3); font-weight: 500; }