/* Index Navbar Component CSS
   Modern center-logo navbar with transparent/solid transitions
   Based on test.html design patterns */

/* CSS Reset for navbar */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Main Navbar */
.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    box-shadow: var(--box-shadow-lg);
    z-index: 999;
    height: 75px;
    transition: all 0.4s ease;
}

/* Transparent state (at top of page) */
.navbar.transparent {
    background: rgba(255, 255, 255, 0);
    box-shadow: none;
    backdrop-filter: none;
}

/* Scrolled state */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--box-shadow-xl);
    padding: 15px 30px;
    height: 75px;
}

/* Navigation Container */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    height: 100%;
}

/* Left and Right Navigation */
.nav-left, .nav-right {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Hamburger'ı sağ tarafa yerleştir */
.hamburger {
    margin-left: auto;
    order: 999;
}

/* Mobilde nav-container'ı flexbox ile düzenle */
@media (max-width: 991.98px) {
    .nav-container {
        justify-content: flex-start;
        gap: 15px;
    }
}

/* Center Logo */
.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo-container {
    position: relative;
    width: 40px;
    height: 40px;
}

/* Logo dosyalarını kullan */
.logo-light, .logo-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

.logo-light img, .logo-dark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-light {
    opacity: 0;
}

.logo-dark {
    opacity: 1;
}

/* Logo switching based on navbar state */
.navbar.transparent .logo-light {
    opacity: 1;
}

.navbar.transparent .logo-dark {
    opacity: 0;
}

/* Brand text */
.brand-text {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-black) !important;
    transition: color 0.4s ease;
}

.navbar.transparent .brand-text {
    color: var(--text-white);
}

/* Navigation Links */
.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
    position: relative;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.navbar.transparent .nav-link {
    color: var(--text-white);
}

.nav-link:hover {
    color: var(--primary-500);
    transform: translateY(-2px);
}

/* Active state */
.nav-link.active {
    color: var(--primary-500);
}

/* External link indicator */
.nav-link.external-link::after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.7;
}

.nav-link.external-link.active::after {
    content: " ↗";
    position: static;
    width: auto;
    height: auto;
    background: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    padding: 5px;
}

.hamburger div {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.navbar.transparent .hamburger div {
    background: var(--text-white);
}

/* Hamburger animation when active */
.hamburger.active div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active div:nth-child(2) {
    opacity: 0;
}

.hamburger.active div:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    position: fixed;
    top: 75px;
    left: 0;
    width: 100%;
    padding: 30px 20px;
    box-shadow: var(--box-shadow-xl);
    backdrop-filter: blur(15px);
    z-index: 998;
    gap: 15px;
}

.mobile-menu.show {
    display: flex;
    animation: slideDownMenu 0.4s ease-out;
}

.mobile-menu.hide {
    animation: slideUpMenu 0.3s ease-in;
}

/* Mobile menu link styles */
.mobile-menu a {
    padding: 5px 25px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-20px);
}

.mobile-menu.show a {
    animation: slideInMenuItem 0.5s ease-out forwards;
}

.mobile-menu.hide a {
    animation: slideOutMenuItem 0.3s ease-in forwards;
}

/* Sequential animation delays */
.mobile-menu a:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu a:nth-child(2) { animation-delay: 0.2s; }
.mobile-menu a:nth-child(3) { animation-delay: 0.3s; }
.mobile-menu a:nth-child(4) { animation-delay: 0.4s; }
.mobile-menu a:nth-child(5) { animation-delay: 0.5s; }
.mobile-menu a:nth-child(6) { animation-delay: 0.6s; }

.mobile-menu a:hover {
    color: var(--primary-500);
    background: var(--bg-primary-light);
    border-color: var(--border-primary-light);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
}

.mobile-menu a.active {
    color: var(--primary-500);
    font-weight: 600;
}

/* Animations */
@keyframes slideDownMenu {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpMenu {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes slideInMenuItem {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutMenuItem {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .nav-left, .nav-right {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Mobilde menü açıkken navbar bg color beyaz */
    .navbar.mobile-menu-open {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        box-shadow: var(--box-shadow-xl) !important;
    }
    
    /* Nav-center'ı mobilde sola yerleştir */
    .nav-center {
        position: static;
        left: auto;
        transform: none;
        margin-right: auto;
        order: 1;
    }
    
    /* Hamburger'ı sağda tut */
    .hamburger {
        order: 2;
    }
    
    .navbar {
        padding: 12px 20px;
        height: 75px;
    }
    
    .navbar.scrolled {
        padding: 12px 20px;
        height: 75px;
    }
    
    .mobile-menu {
        top: 75px;
    }
    
    /* Mobilde brand-text'i göster */
    .brand-text {
        font-size: 1.2rem;
        display: inline !important;
    }
}

@media (max-width: 480px) {
    /* 480px altında brand-text'i gizleme kuralını kaldır */
    .brand-text {
        display: inline !important;
        font-size: 1.1rem;
    }
    
    /* Nav-center pozisyonunu mobilde ayarla */
    .nav-center {
        left: auto;
    }
}