/* ============================================
   MODERN NAVIGATION STYLES
   ============================================ */

/* Header Container */
header {
  background: linear-gradient(135deg, var(--light-bg) 0%, var(--light-secondary-bg) 100%);
  color: var(--light-text);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-shadow: 0 4px 20px var(--light-shadow);
  border-bottom: 2px solid var(--light-border);
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 25px var(--light-shadow);
}

[data-theme="dark"] header {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
}

[data-theme="dark"] header.scrolled {
  background: rgba(13, 13, 13, 0.98);
}

header .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  gap: 1.5rem;
}

header .nav-container > * {
  flex-shrink: 0;
}

/* Logo Container */
.header-logo {
  flex-shrink: 0;
}

/* Navigation Container */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  overflow: visible;
  min-width: 0;
}

nav {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
}

/* Logo Styles */
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-light);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  height: 100px;
  width: auto;
  max-width: 350px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(191, 162, 107, 0.5));
  transition: all 0.3s ease;
}

.logo:hover img {
  filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(191, 162, 107, 0.8));
  transform: scale(1.05);
}

/* Navigation Menu - Desktop */
nav ul {
  list-style: none;
  display: flex;
  gap: 0.05rem;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
  position: relative;
}

nav ul li {
  position: relative;
}

nav ul li > a {
  color: var(--light-text);
  font-weight: 500;
  font-size: 0.8rem;
  text-decoration: none;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  white-space: nowrap;
}

nav ul li > a::before {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

nav ul li > a:hover {
  color: var(--secondary);
  background: rgba(191, 162, 107, 0.1);
  transform: translateY(-2px);
}

nav ul li > a:hover::before {
  opacity: 1;
}

nav ul li > a.active {
  color: var(--secondary) !important;
  background: rgba(191, 162, 107, 0.2) !important;
  border: 1px solid rgba(191, 162, 107, 0.3);
}

nav ul li > a.active::before {
  opacity: 1;
}

/* Dropdown Menu Styles - BASIT VE ÇALIŞAN */
.dropdown {
  position: relative;
}

.dropdown > a {
  position: relative;
  cursor: pointer;
}

.dropdown > a i {
  margin-left: 0.3rem;
  font-size: 0.7em;
  transition: transform 0.3s ease;
}

.dropdown:hover > a i,
.dropdown.active > a i {
  transform: rotate(180deg);
}

/* Dropdown Menu - Gizli başlangıç */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: linear-gradient(135deg, var(--light-card) 0%, var(--light-secondary-bg) 100%);
  backdrop-filter: blur(20px);
  min-width: 320px;
  box-shadow: 0 8px 32px var(--light-shadow),
              0 0 0 1px var(--light-border);
  border-radius: 12px;
  padding: 0.75rem 0;
  list-style: none;
  display: none;
  flex-direction: column;
  z-index: 1002;
  overflow: visible;
  margin-top: 0;
}

/* Dropdown ile menü arasındaki boşluğu kapatmak için görünmez köprü alanı */
.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
  background: transparent;
  pointer-events: auto;
  z-index: 1001;
}

/* Dropdown Menu - Hover ile göster */
.dropdown:hover .dropdown-menu {
  display: flex;
}

/* Dropdown menü üzerine gelince de açık kalsın */
.dropdown-menu:hover {
  display: flex !important;
}

/* Dropdown köprü alanı üzerine gelince de açık kalsın */
.dropdown:hover::after {
  pointer-events: auto;
}

/* Active class ile göster (mobile için) */
.dropdown.active .dropdown-menu {
  display: flex;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.dropdown-menu li {
  display: block;
  margin: 0;
  padding: 0;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: var(--light-text);
  transition: all 0.3s ease;
  font-size: 0.95rem;
  text-decoration: none;
  position: relative;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.dropdown-menu li a.active {
  color: var(--secondary) !important;
  background: rgba(191, 162, 107, 0.2) !important;
  border-left-color: var(--secondary);
}

.dropdown-menu li a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--secondary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.dropdown-menu li a:hover {
  background: linear-gradient(90deg, rgba(191, 162, 107, 0.15) 0%, rgba(191, 162, 107, 0.05) 100%);
  color: var(--secondary);
  padding-left: 2rem;
  transform: translateX(5px);
}

.dropdown-menu li a.active:hover {
  background: rgba(191, 162, 107, 0.25) !important;
  color: var(--secondary) !important;
}

.dropdown-menu li a:hover::before {
  transform: scaleY(1);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hamburger Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1002;
}

.hamburger:hover {
  background: rgba(191, 162, 107, 0.1);
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--secondary);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1200px) {
  nav ul {
    gap: 0.2rem;
  }
  
  nav ul li > a {
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
  }
  
  .dropdown-menu {
    min-width: 260px;
  }
}

@media (max-width: 1024px) {
  nav ul li > a {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .logo img {
    height: 85px;
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  header .nav-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .header-logo {
    flex-shrink: 0;
  }
  
  .header-nav {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  /* Mobile Menu */
  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    flex-direction: column;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    padding: 5rem 0 2rem 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    gap: 0;
    border-left: 2px solid rgba(191, 162, 107, 0.2);
    z-index: 1001;
  }
  
  nav ul.open {
    right: 0;
  }
  
  nav ul::before {
    content: 'Menü';
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
  }
  
  nav ul li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  nav ul li > a {
    width: 100%;
    padding: 1.25rem 2rem;
    justify-content: flex-start;
    border-radius: 0;
    font-size: 1rem;
  }
  
  nav ul li > a::before {
    display: none;
  }
  
  nav ul li > a:hover {
    background: rgba(191, 162, 107, 0.15);
    transform: translateX(10px);
    border-left: 3px solid var(--secondary);
  }
  
  /* Mobile Dropdown */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0;
    border-left: 3px solid transparent;
    min-width: auto;
    margin-top: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .dropdown.active .dropdown-menu {
    max-height: 500px;
    border-left-color: var(--secondary);
  }
  
  .dropdown-menu li a {
    padding: 1rem 2rem 1rem 3.5rem;
    font-size: 0.95rem;
  }
  
  .dropdown-menu li a::before {
    display: none;
  }
  
  .dropdown-menu li a:hover {
    padding-left: 4rem;
    transform: translateX(0);
  }
}

@media (max-width: 480px) {
  header .nav-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .logo img {
    height: 70px;
    max-width: 250px;
  }
  
  nav ul {
    width: 100%;
    max-width: 100vw;
  }
}

/* Scroll effect */
header.scrolled .logo img {
  height: 85px;
  max-width: 300px;
}

header.scrolled .nav-container {
  padding: 0.8rem 0;
}
