/* --- TEMEL AYARLAR --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
:root {
    --title-font-size: clamp(0.8rem, 0.72rem + 0.4vw, 1.25rem);
    --links-font-size: clamp(1rem, 0.8rem + 0.6vw, 1.25rem);
}

body { 
    overflow-x: hidden; 
    padding-top: 85px; /* Navbar fixed olduğu için içeriğin üste yapışmasını engeller */
}

.navbar {
    position: fixed; /* Sayfa kayarken ekranda kalması için sabitlendi */
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 1rem 5%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 2px solid #C1C1C1;
    transition: transform 0.3s ease; /* JS ile kayarken yumuşak gizlenip açılması için */
}

.logo-container { display: flex; align-items: center; gap: 9.6px; flex: 0 0 auto; min-width: 0; }
.logo-icon { width: 45px; height: auto; }
.title { color: #2c3e50; font-size: var(--title-font-size); font-weight: bold; line-height: 1.2; text-transform: uppercase; }

/* Menü Genel Link Stilleri */
.links {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 400;
    font-size: var(--links-font-size);
    display: flex;
    align-items: center;
}
.links img { margin-left: 8px; width: 12px; }

/* Nav linkler: tıklama/odakta tarayıcı outline ve dokunma vurgusu yok */
.nav-links a {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.nav-links a:focus,
.nav-links a:focus-visible,
.nav-links a:active {
    outline: none;
    box-shadow: none;
}

/* --- MASAÜSTÜ (1401px+) --- */
@media screen and (min-width: 1401px) {
    .nav-links { display: flex; list-style: none; gap: 25px; align-items: center; flex: 1 1 auto; justify-content: flex-end; flex-wrap: nowrap; }
    .title { white-space: normal; }
    .title br { display: block; }
    .dropdown { position: relative; }
    .dropdown-menu {
        position: absolute; top: 100%; left: 0; background-color: white; list-style: none;
        min-width: 220px; box-shadow: 0 8px 16px rgba(0,0,0,0.1); border-radius: 4px;
        padding: 10px 0; visibility: hidden; opacity: 0; transform: translateY(-10px); transition: 0.3s;
    }
    .dropdown.active .dropdown-menu { visibility: visible; opacity: 1; transform: translateY(0); }
    .dropdown-menu li a { padding: 10px 20px 10px 12px; display: block; font-size: 0.95rem; text-decoration: none; color: #2c3e50; }
    .dropdown-menu li a:hover,
    .dropdown-menu li a:focus { background-color: #E7E7E7; }
}

/* --- ÖZEL DÜZELTME: 1401px - 1633px aralığı --- */
@media screen and (min-width: 1401px) and (max-width: 1633px) {
    .nav-links { gap: 16px; }
    .nav-links > li > a.links { font-size: 0.95rem; padding: 6px 8px; white-space: nowrap; }
    .nav-links > li > a.links img { width: 10px; }
    .library-btn { padding: 10px 12px; border-radius: 12px; gap: 10px; }
    .title { font-size: calc(var(--title-font-size) * 0.95); }
}

.library-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #C7A26D;
    padding: 15px;
    border-radius: 15px;
    color: white !important;
    text-decoration: none;
    font-weight: 400;
    transition: background-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.library-btn:hover { background-color: #E6BB7E; }
.library-btn:active { background-color: #7A6443; }

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1100;
    position: relative;
    width: 27px;
    height: 27px;
    padding: 0;
    border: none;
    background: transparent;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.hamburger::-moz-focus-inner { border: 0; padding: 0; }
.hamburger:focus, .hamburger:focus-visible, .hamburger:active { outline: none; box-shadow: none; border: none; }

.hamburger-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 27px;
    height: auto;
    max-height: 27px;
    object-fit: contain;
    transition: opacity 0.35s ease, transform 0.35s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    pointer-events: none;
}
.hamburger-icon--menu { opacity: 1; transform: scale(1); }
.hamburger-icon--close { opacity: 0; transform: scale(0.92); pointer-events: none; }
.hamburger.active .hamburger-icon--menu { opacity: 0; transform: scale(0.92); pointer-events: none; }
.hamburger.active .hamburger-icon--close { opacity: 1; transform: scale(1); }

/* --- SADECE TABLET (768px - 1400px) - SAĞDAN GELEN PANEL --- */
@media screen and (min-width: 768px) and (max-width: 1400px) {
    .hamburger { display: flex; }
    .nav-links {
        display: flex; flex-direction: column; position: fixed;
        top: 0; right: -320px; width: 300px; height: 100vh;
        background-color: white; padding: 80px 0 20px 0;
        transition: right 0.4s ease-in-out; box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        z-index: 1050; list-style: none; overflow-y: auto;
    }
    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; border-top: 1px solid rgba(0,0,0,0.05); }
    .nav-links li > a:not(.library-btn) {
        padding: 15px 25px;
        width: 100%;
        text-decoration: none;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
    }
    .nav-links .links:not(.library-btn) img { margin-left: 0; }
    
    .dropdown-menu { max-height: 0; opacity: 0; overflow: hidden; transition: 0.4s; background-color: #f9f9f9; }
    .dropdown.active .dropdown-menu { max-height: 500px; opacity: 1; padding: 5px 0; }
    .dropdown-menu li a { padding: 12px 45px 12px 35px !important; text-align: left; width: 100%; display: block; color: #2c3e50; text-decoration: none; }
    
    .nav-links li:last-child { border: none; display: flex; justify-content: center; padding: 25px 0 !important; }
    .nav-links .library-btn { width: 90%; max-width: 260px; justify-content: center; align-items: center; margin: 0 auto; }
}

/* --- SADECE MOBİL (max-width: 767px) - YUKARIDAN AŞAĞI AÇILAN --- */
@media screen and (max-width: 767px) {
    .navbar { box-shadow: 0 2px 10px rgba(0,0,0,0.1); border-bottom: 2px solid #C1C1C1; }
    .hamburger { display: flex; }
    .nav-links {
        display: block;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background-color: white;
        max-height: 0; overflow: hidden;
        transition: max-height 0.5s ease-in-out;
        z-index: 1050; list-style: none;
        padding: 0 !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .nav-links.active { max-height: 100vh; overflow-y: auto; }
    .nav-links li { width: 100%; border-bottom: 1px solid rgba(0,0,0,0.05); }
    .nav-links li > a:not(.library-btn) {
        padding: 18px 20px;
        width: 100%;
        text-decoration: none;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
    }
    .nav-links .links:not(.library-btn) img { margin-left: 0; }
    
    .dropdown-menu { max-height: 0; opacity: 0; overflow: hidden; transition: 0.3s; background-color: #fcfcfc; }
    .dropdown.active .dropdown-menu { max-height: 500px; opacity: 1; }
    .dropdown-menu li a { padding: 15px 40px 15px 30px !important; text-align: left; display: block; color: #2c3e50; text-decoration: none; }
    
    .nav-links li:last-child { display: flex; justify-content: center; padding: 25px 0 !important; border: none; }
    .nav-links .library-btn { width: 80%; justify-content: center; align-items: center; margin: 0 auto; }
}