/* ========================================
   AYDENIZ KARAVAN — Header / Navbar
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: var(--z-header);
  transition: all var(--transition-base);
}

.header--transparent {
  background: transparent;
}

.header--scrolled {
  background: rgba(15, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  height: 70px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  text-decoration: none;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: white;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.header--scrolled .brand-text {
  font-size: 0.9rem;
}

.header__logo img {
  height: 60px;
  width: auto;
  transition: height var(--transition-base);
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.header--scrolled .header__logo img {
  height: 48px;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.header__nav-link {
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.header__nav-link:hover,
.header__nav-link.active {
  color: white;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.header__nav-link:hover::after,
.header__nav-link.active::after {
  width: 60%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.header__phone:hover {
  color: var(--accent);
}

.header__phone svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* ── Mobile Menu Toggle ── */
.header__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

.header__menu-toggle span {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition-base);
}

.header__menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

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

/* ── Mobile Nav ── */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100vh;
  background: var(--primary-900);
  z-index: calc(var(--z-header) + 1);
  transition: right var(--transition-slow);
  padding: var(--space-20) var(--space-8);
  overflow-y: auto;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav__close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.mobile-nav__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-nav__close svg {
  width: 20px;
  height: 20px;
  color: white;
}

.mobile-nav__link {
  display: block;
  padding: var(--space-4) 0;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.mobile-nav__link:hover {
  color: var(--accent);
  padding-left: var(--space-3);
}

.mobile-nav__phone {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-lg);
}

.mobile-nav__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-header);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-nav__overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Page Header (non-home pages) ── */
.page-header {
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-600) 100%);
  padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header__title {
  color: white;
  margin-bottom: var(--space-3);
  position: relative;
}

.page-header__subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-lg);
  position: relative;
}

.page-header__breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  position: relative;
}

.page-header__breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
}

.page-header__breadcrumb a:hover {
  color: var(--accent);
}

.page-header__breadcrumb span {
  color: var(--accent);
}

/* ── Header Auth Buttons ── */
.header__auth-btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.4;
}

.header__auth-btn--login {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  margin-right: 10px;
}

.header__auth-btn--login:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.header__auth-btn--register {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-700));
  border: 1px solid var(--accent);
  box-shadow: 0 4px 20px rgba(232, 151, 58, 0.3);
  font-weight: 700;
  margin-right: 16px;
}

.header__auth-btn--register:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-400), var(--accent));
  box-shadow: 0 6px 28px rgba(232, 151, 58, 0.45);
  transform: translateY(-2px);
}

.header--scrolled .header__auth-btn--login {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .header__auth-btn {
    display: none;
  }
}
