/* HEADER & CONTAINER */
.header {
  background-color: transparent;
  box-shadow: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 999999;
  width: 100%;
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Scroll sonrası: beyaz arka plan, sabit konum */
.header.scrolled {
  position: fixed;
  background-color: rgba(255, 255, 255, 1);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.header.scrolled .nav-link {
  color: #333;
}

.header.scrolled .nav-link:hover {
  color: #2563eb;
}

.header.scrolled .hamburger {
  color: #333;
}

.header.scrolled .nav-logo {
  color: #333;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 0;
  width: 100%;
}

/* LOGO */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.2rem;
}

.nav-logo:hover {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #73c8e3;
  font-weight: 600;
  font-size: 1.2rem;
}

.nav-logo img {
  max-height: 50px;
  width: auto;
  display: block;
}

/* MENÜ LİSTESİ (SAĞDA) */
.nav-menu {
  display: flex;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
  cursor: pointer;
}

.nav-link:hover {
  color: #73c8e3;
}

/* DROPDOWN (MASAÜSTÜ) */
.has-dropdown::after {
  /* Hover bridge: Fare dropdown menüye inerken kapanmayı engeller */
  content: '';
  position: absolute;
  left: 0;
  bottom: -20px;
  width: 100%;
  height: 20px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 15px);
  left: 0;
  transform: translateY(10px);
  background-color: #fff;
  min-width: 300px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  list-style: none;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.dropdown-menu.lang-dropdown {
  min-width: auto;
  width: max-content;
  left: auto;
  right: -6px;
  margin-top: -24px;
}

/* Diğer diller için daha geniş menü (Dolmuş rotaları uzun olduğu için) */
html:not([lang="tr"]) .dropdown-menu:not(.lang-dropdown) {
  min-width: 360px;
}

.dropdown-menu.lang-dropdown .dropdown-link {
  white-space: nowrap;
}

/* Hover durumunda dropdown göster */
.has-dropdown:hover .dropdown-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #4b5563;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.dropdown-link:hover {
  background-color: #f3f4f6;
  color: #2563eb;
}

/* HAMBURGER */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.hamburger:hover {
  color: #000;
}

/* OVERLAY (Sayfa Boşluğu) */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
}

/* ================= MOBİL EKRANLAR (992px altı) ================= */
@media (max-width: 992px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }

  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    /* Soldan kayarak açılır */
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background-color: #ffffff;
    padding: 80px 0 40px;
    /* Removed side padding so items span full width */
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
    z-index: 995;
    overflow-y: auto;
    transition: left 0.4s cubic-bezier(0.77, 0, 0.18, 1);
    display: block;
    /* Ensure it's not a flex row */
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-list {
    display: block;
    /* Override desktop flex */
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .nav-item {
    display: block;
    width: 100%;
    border-bottom: 1px solid #f3f4f6;
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-link {
    justify-content: space-between;
    padding: 1.2rem 20px;
    /* Added side padding */
    font-size: 1.1rem;
    width: 100%;
    color: #333;
    /* Mobil menüde arka plan beyaz olduğu için metin koyu olmalı */
  }

  /* Mobil Dropdown (Akordeon Mantığı) */
  .has-dropdown::after {
    display: none;
    /* Mobilde görünmez köprüye gerek yok */
  }

  /* Masaüstü hover efektinin mobilde tıklanınca transform: translateX(-50%) yapıp menüyü sola kaydırmasını engeller */
  .has-dropdown:hover .dropdown-menu {
    transform: none;
  }

  .dropdown-menu {
    position: static;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    /* Removed left padding */
    border: none;
    width: 100%;
    margin: 0;
    display: block;

    /* Akordeon için yükseklik 0 ile başlar */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease;
  }

  .dropdown-menu li {
    display: block;
    width: 100%;
    margin: 0;
  }

  /* JS tarafından 'open' classı eklenince açılır */
  .has-dropdown.open .dropdown-menu {
    max-height: 500px;
    margin-top: 0.5rem;
  }

  /* Açıkken ikon döner */
  .has-dropdown.open .nav-link i {
    transform: rotate(180deg);
  }

  .nav-link i {
    transition: transform 0.3s ease;
  }

  .dropdown-link {
    display: block;
    width: 100%;
    padding: 1rem 20px;
    /* Sublinks aligned with main links, no extra indent */
    border-radius: 0;
    border-bottom: 1px dashed #e5e7eb;
    color: #6b7280;
  }

  .dropdown-link:last-child {
    border-bottom: none;
  }

  /* Dil menüsü mobil tam genişlik düzeltmesi */
  .dropdown-menu.lang-dropdown {
    width: 100%;
  }

  .dropdown-menu.lang-dropdown .dropdown-link {
    white-space: normal;
  }
}

/* DOLMUS INFO POPUP */
.dolmus-info-popup {
  position: absolute;
  right: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  width: 360px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 160, 255, 0.15);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.6;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  pointer-events: none;
  font-weight: 400;
  text-align: left;
}

.dolmus-info-popup::before {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid rgba(0, 160, 255, 0.15);
  border-top: 1px solid rgba(0, 160, 255, 0.15);
  border-left: none;
  border-bottom: none;
}

.nav-item:hover .dolmus-info-popup {
  visibility: visible;
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Mobile: Hide Popup */
@media (max-width: 992px) {
  .dolmus-info-popup {
    display: none !important;
  }
}

/* MOBILE MENU EXTRAS */
.mobile-menu-extras {
  display: none;
}

@media (max-width: 992px) {
  .mobile-menu-extras {
    display: block;
    padding: 24px 20px;
    border-top: 1px solid #f1f5f9;
    margin-top: 15px;
    background: #f8fafc;
  }

  .mobile-menu-extras h4 {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    font-weight: 600;
  }

  .mobile-social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
  }

  .mobile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 10px;
    color: #475569;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
  }

  .mobile-social-link:active {
    transform: scale(0.95);
  }

  .mobile-utility-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-utility-link {
    font-size: 0.95rem;
    color: #475569;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
  }

  .mobile-utility-link i {
    font-size: 1.2rem;
    color: #3b82f6;
  }
}