/* =========================================
   ATÖLYESEL - ANA LAYOUT CSS V3.1 (STABİL)
   ========================================= */

@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:      #ff5c35;
    --primary-soft: #fff1ee;
    --primary-dark: #e04520;
    --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(255,92,53,.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 ─── */
.main-header { 
    background: var(--white); border-bottom: 1px solid var(--border); 
    padding: 18px 0; position: sticky; top: 0; z-index: 1000; 
}
.header-inner { display: flex; justify-content: space-between; align-items: center; position: relative; } 
.logo a { font-size: 22px; font-weight: 900; color: var(--ink); text-decoration: none; letter-spacing: -0.04em; }
.logo span { color: var(--primary); }
.nav-wrapper { display: flex; align-items: center; gap: 24px; flex: 1; justify-content: flex-end; }

@media (min-width: 993px) {
    .nav-menu {
        position: absolute; left: 50%; transform: translateX(-50%);
        display: flex; gap: 28px; align-items: center;
    }
}

.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;
}
.nav-menu > a:hover, .dropdown-btn:hover { color: var(--primary); }
.highlight-link { color: var(--primary) !important; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.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Ü EKLENDİ) ─── */
.dropdown { position: relative; }
/* Bu hover köprüsü farenin boşluğa düşüp menüyü kapatmasını engeller */
.dropdown::after {
    content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 20px;
}

.dropdown-content { 
    display: none; position: absolute; 
    top: calc(100% + 15px); /* Margin yerine top kullanıldı */
    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Ü ─── */
.mobile-toggle { display: none; background: transparent; border: none; cursor: pointer; color: var(--ink); }

@media (max-width: 992px) {
    .mobile-toggle { display: block; }
    
    .nav-wrapper { 
        display: none; flex-direction: column; position: absolute; 
        top: 100%; left: 0; width: 100%; background: var(--white); 
        padding: 24px; border-top: 1px solid var(--border); box-shadow: var(--shadow-md); gap: 24px;
        /* SCROLL SORUNU ÇÖZÜMÜ */
        max-height: calc(100vh - 70px); 
        overflow-y: auto; 
    }
    .nav-wrapper.active { display: flex; }
    
    .nav-menu { position: static; flex-direction: column; width: 100%; align-items: flex-start; gap: 20px; transform: none;}
    .nav-menu > a, .dropdown-btn { font-size: 16px; width: 100%; justify-content: space-between;}

    .header-actions { width: 100%; flex-direction: column; border-top: 1px solid var(--border); padding-top: 24px; gap: 12px; }
    .header-actions .btn { width: 100%; }

    /* Mobil Dropdown */
    .dropdown { width: 100%; }
    .dropdown::after { display: none; } /* Mobilde köprüye gerek yok */
    .dropdown-content { 
        position: static; box-shadow: none; border: none; border-left: 2px solid var(--primary); 
        border-radius: 0; width: 100%; margin-top: 10px; transform: none; display: none;
    }
    .dropdown-content a { padding: 10px 15px; }
    
    /* JS Sınıfı ile Açma Kapama */
    .dropdown.is-open .dropdown-content { display: block; }
    .dropdown.is-open .dropdown-btn svg { transform: rotate(180deg); color: var(--primary); }
}

/* ─── 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; }
/* ─── 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%; 
        height: calc(100vh - 70px); 
        background: var(--white); 
        padding: 32px 24px; 
        flex-direction: column; 
        gap: 24px;
        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.15rem; 
        width: 100%; 
        justify-content: space-between;
        padding: 18px 0;
        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: 16px; 
        margin-top: auto;
    }
    .header-actions .btn { width: 100%; padding: 16px; font-size: 15px;}
}