/* ==========================================================================
   Header, Navigation & Baromak-Style Header Control Capsule
   Matches the exact UI requested: [ 🇹🇷 TR (toggle) 🇬🇧/🇺🇸 EN ] ( 🌙 ) [ ≡ ]
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: var(--bg-glass-nav);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  height: 70px;
  background: rgba(7, 9, 14, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 25px rgba(15, 23, 42, 0.08);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* Brand Logo */
.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  z-index: 1002;
}

.brand-logo-img {
  height: clamp(38px, 4.5vw, 46px);
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.brand-logo-link:hover .brand-logo-img {
  transform: scale(1.02);
}

.logo-dark-mode {
  display: block;
}

.logo-light-mode {
  display: none;
}

[data-theme="light"] .logo-dark-mode {
  display: none;
}

[data-theme="light"] .logo-light-mode {
  display: block;
}

/* Desktop Navigation Menu */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links-list {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-gradient-primary);
  transition: width var(--transition-normal), left var(--transition-normal);
  border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* Dropdown Menu */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -20px;
  width: 260px;
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-md);
  padding: 0.8rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  list-style: none;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.65rem 0.9rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-link:hover {
  color: #fff;
  background: rgba(0, 210, 255, 0.12);
  transform: translateX(4px);
}

/* ==========================================================================
   Header Action Cluster (Exact Baromak Screenshot Matching)
   [ 🇹🇷 TR (slider) 🇬🇧/🇺🇸 EN ]  ( 🌙 )  [ ≡ ]
   ========================================================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* 1. Vertical Language Toggle Capsule (Üst: 🇹🇷 TR | Alt: 🇬🇧/🇺🇸 UK/US) */
.lang-toggle-capsule {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 34px;
  height: 42px;
  padding: 3px 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  box-sizing: border-box;
}

[data-theme="light"] .lang-toggle-capsule {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.lang-toggle-capsule:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .lang-toggle-capsule:hover {
  background: #e2e8f0;
}

/* Flag Wrappers inside Vertical Capsule */
.lang-flag-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 17px;
  z-index: 2;
  position: relative;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.flag-icon {
  width: 19px;
  height: 12.5px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  display: inline-block;
  vertical-align: middle;
  pointer-events: none;
}

/* Flag Active/Inactive Opacity Indicator */
.flag-tr {
  opacity: 1;
}

.flag-en {
  opacity: 0.45;
}

html[lang="en"] .flag-tr {
  opacity: 0.45;
}

html[lang="en"] .flag-en {
  opacity: 1;
}

/* Vertical Sliding Background Track & Animated Knob */
.lang-switch-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 12px;
}

.lang-switch-knob {
  position: absolute;
  top: 3px;
  left: 2px;
  width: 28px;
  height: 17px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.28s var(--ease-apple), background 0.28s var(--ease-apple), border-color 0.28s var(--ease-apple);
  z-index: 1;
}

[data-theme="light"] .lang-switch-knob {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

/* When English is Active, Knob Glides Downwards to UK/US Flag */
html[lang="en"] .lang-switch-knob {
  transform: translateY(19px);
  background: rgba(2, 132, 199, 0.3);
  border-color: #0284c7;
}

[data-theme="light"] html[lang="en"] .lang-switch-knob {
  background: #e0f2fe;
  border-color: #0284c7;
}

/* 2. Circular Theme Toggle Button ( 🌙 / ☀️ ) */
.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
}

[data-theme="light"] .theme-toggle-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: rotate(20deg);
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: #e2e8f0;
}

/* 3. Rounded Square Hamburger Button [ ≡ ] */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  z-index: 1002;
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

[data-theme="light"] .hamburger-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

[data-theme="light"] .hamburger-btn:hover {
  background: #e2e8f0;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 2px 0;
  border-radius: 2px;
  transition: all 0.35s var(--ease-apple);
  transform-origin: center;
}

/* Active Hamburger transforms into an 'X' */
.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Header Quote CTA Button (Visible on Desktop) */
.header-quote-btn {
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--accent-gradient-orange);
  color: #ffffff;
  border-radius: var(--border-radius-full);
  box-shadow: 0 2px 15px rgba(255, 94, 26, 0.35);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.header-quote-btn:hover {
  box-shadow: 0 4px 22px rgba(255, 94, 26, 0.6);
  transform: translateY(-2px);
}

/* ==========================================================================
   Animated Sidebar Navigation Drawer (Sliding from Right)
   ========================================================================== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1005;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-apple), visibility 0.4s var(--ease-apple);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-sidebar,
.sidebar-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(440px, 90vw);
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-medium);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
  z-index: 1010;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(5rem, 8vh, 6rem) 2.2rem 2.5rem 2.2rem;
  transition: right 0.45s var(--ease-apple);
  overflow-y: auto;
}

.mobile-sidebar.active,
.sidebar-drawer.active {
  right: 0;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.sidebar-nav-item {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.4s var(--ease-apple), transform 0.4s var(--ease-apple);
}

.mobile-sidebar.active .sidebar-nav-item,
.sidebar-drawer.active .sidebar-nav-item {
  opacity: 1;
  transform: translateX(0);
}

.mobile-sidebar.active .sidebar-nav-item:nth-child(1),
.sidebar-drawer.active .sidebar-nav-item:nth-child(1) { transition-delay: 0.06s; }
.mobile-sidebar.active .sidebar-nav-item:nth-child(2),
.sidebar-drawer.active .sidebar-nav-item:nth-child(2) { transition-delay: 0.12s; }
.mobile-sidebar.active .sidebar-nav-item:nth-child(3),
.sidebar-drawer.active .sidebar-nav-item:nth-child(3) { transition-delay: 0.18s; }
.mobile-sidebar.active .sidebar-nav-item:nth-child(4),
.sidebar-drawer.active .sidebar-nav-item:nth-child(4) { transition-delay: 0.24s; }
.mobile-sidebar.active .sidebar-nav-item:nth-child(5),
.sidebar-drawer.active .sidebar-nav-item:nth-child(5) { transition-delay: 0.30s; }
.mobile-sidebar.active .sidebar-nav-item:nth-child(6),
.sidebar-drawer.active .sidebar-nav-item:nth-child(6) { transition-delay: 0.36s; }

.sidebar-nav-link {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.sidebar-nav-link:hover {
  color: var(--accent-cyan);
  transform: translateX(6px);
}

.sidebar-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.sidebar-social-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-social-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.sidebar-social-icon:hover {
  transform: translateY(-2px);
}

.sidebar-social-icon.yt:hover {
  background: #ff0000;
  border-color: #ff0000;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.4);
}

.sidebar-social-icon.ig:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: #dc2743;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 39, 67, 0.4);
}

.sidebar-social-icon.li:hover {
  background: #0077b5;
  border-color: #0077b5;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 119, 181, 0.4);
}

[data-theme="light"] .sidebar-social-icon {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Hide desktop menu on tablet/mobile */
@media (max-width: 1080px) {
  .desktop-nav,
  .header-quote-btn {
    display: none;
  }
}
