/* ============================================
   DERELİ MARİNA — Header / Navigation
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
  padding: var(--space-3) 0;
  margin: 0;
}

.site-header.is-scrolled {
  background: rgba(247, 244, 237, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-line);
  padding: var(--space-1) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-white);
  transition: color 0.35s var(--ease);
  text-decoration: none;
}

.brand-logo {
  max-height: 40px;
  width: auto;
}

.logo-scrolled {
  display: none;
}

.site-header.is-scrolled .logo-default {
  display: none;
}

.site-header.is-scrolled .logo-scrolled {
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-links {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
  opacity: 0.88;
  position: relative;
}

.site-header.is-scrolled .nav-links a {
  color: var(--color-ink);
}

.nav-links a:hover {
  opacity: 1;
  color: var(--color-copper);
}

.nav-links a.active {
  opacity: 1;
  color: var(--color-copper);
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-sm);
  background: var(--color-copper);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn-header:hover {
  background: var(--color-copper-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  cursor: pointer;
  padding: 4px 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.site-header.is-scrolled .nav-toggle span {
  background: var(--color-ink);
}

/* ============================================
   DESKTOP NAVIGATION & DROPDOWN (min-width: 921px)
   ============================================ */
@media (min-width: 921px) {
  .nav-links a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    background: var(--color-copper);
    border-radius: 2px;
  }

  .has-dropdown {
    position: relative;
  }

  .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-radius: var(--radius-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s var(--ease);
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
  }

  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .dropdown li {
    margin: 0;
  }

  .dropdown li a {
    color: var(--color-ink) !important;
    padding: 0.65rem 1.4rem;
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .dropdown li a::after {
    display: none !important;
  }

  .dropdown li a:hover {
    background: rgba(241, 131, 21, 0.08);
    color: var(--color-copper) !important;
    opacity: 1;
    padding-left: 1.6rem;
  }
}

/* ============================================
   MOBILE NAVIGATION (max-width: 920px)
   ============================================ */
@media (max-width: 920px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(85vw, 320px);
    background: #14131a;
    flex-direction: column;
    align-items: stretch;
    padding: 5.5rem 1.6rem 2.5rem;
    gap: 0.35rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    overflow-y: auto;
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-links > li {
    width: 100%;
    list-style: none;
    margin-bottom: 0.2rem;
  }

  .nav-links a {
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 1.05rem;
    font-weight: 500;
    opacity: 1;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    border-bottom: none;
    transition: all 0.2s ease;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-copper) !important;
  }

  .nav-links a.active {
    background: rgba(241, 131, 21, 0.12);
    color: var(--color-copper) !important;
    font-weight: 600;
  }

  .nav-links a.active::after {
    display: none !important;
  }

  /* Mobile Dropdown Sub-items (Never White on Scroll!) */
  .dropdown,
  .site-header.is-scrolled .dropdown {
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 10px;
    margin: 0.3rem 0 0.5rem 0.5rem;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .dropdown li {
    margin: 0;
    list-style: none;
  }

  .dropdown li a,
  .site-header.is-scrolled .dropdown li a {
    padding: 0.55rem 0.9rem !important;
    font-size: 0.92rem !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    border-radius: 6px;
    display: block;
    border-bottom: none !important;
    transition: all 0.2s ease;
  }

  .dropdown li a:hover,
  .dropdown li a.active,
  .site-header.is-scrolled .dropdown li a:hover,
  .site-header.is-scrolled .dropdown li a.active {
    background: rgba(241, 131, 21, 0.15) !important;
    color: var(--color-copper) !important;
    transform: translateX(4px);
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .btn-header {
    display: none;
  }

  /* Overlay when menu open */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }

  .nav-overlay.is-open {
    opacity: 1;
    pointer-events: all;
  }
}

@media (max-width: 480px) {
  .header-inner {
    gap: var(--space-2);
  }

  .brand {
    font-size: 1.2rem;
  }
}
