/**
 * DREAM JOURNEY TRAVEL - UNIFIED HEADER STYLES
 * Clean responsive design with proper media queries
 * Desktop First approach with Mobile overrides
 */

/* ===================================
   RESET & BASE STYLES
   =================================== */
.site-header,
.site-header--desktop,
.site-header--mobile {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===================================
   DESKTOP HEADER (>= 1025px)
   =================================== */

/* Top Navigation Bar */
.site-header--desktop {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(11, 11, 11, 0.98) 0%, rgba(11, 11, 11, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  display: block;
}

.header-top-bar {
  background: rgba(10, 10, 10, 0.7);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  padding: 12px 0;
}

.header-top-bar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-top-bar__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 1 auto;
}

.header-top-bar__right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 1 auto;
}

.top-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0 10px;
  white-space: nowrap;
}

.top-bar-link:hover {
  color: #d4af37;
  transform: translateX(2px);
}

.top-bar-link i {
  font-size: 14px;
}

.top-bar-divider {
  width: 1px;
  height: 20px;
  background: rgba(212, 175, 55, 0.2);
}

/* Main Header Bar */
.header-main {
  background: transparent;
}

.header-main__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
}

/* Brand/Logo */
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.site-brand:hover {
  transform: scale(1.05);
}

.site-brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #d4af37;
  flex-shrink: 0;
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-brand__name {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  color: #d4af37;
  letter-spacing: 1px;
  line-height: 1;
}

.site-brand__sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 10px 18px;
  border-radius: 10px;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #d4af37;
  background: rgba(212, 175, 55, 0.1);
  transform: translateY(-2px);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #d4af37, #f5e08b);
  color: #0a0a0a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.header-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  color: #d4af37;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-dropdown__trigger:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.4);
}

.lang-dropdown__arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.lang-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  min-width: 160px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 2000;
}

.lang-dropdown.active .lang-dropdown__menu {
  display: block;
}

.lang-dropdown.active .lang-dropdown__arrow {
  transform: rotate(180deg);
}

.lang-dropdown__item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-dropdown__item:first-child {
  border-radius: 10px 10px 0 0;
}

.lang-dropdown__item:last-child {
  border-radius: 0 0 10px 10px;
}

.lang-dropdown__item:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  padding-left: 20px;
}

.lang-dropdown__item.active {
  background: rgba(212, 175, 55, 0.1);
  color: #d4af37;
  font-weight: 600;
}

/* ===================================
   MOBILE HEADER (<= 1024px)
   =================================== */

.site-header--mobile {
  display: none;
}

/* ===================================
   HEADER SPACER (For content padding)
   =================================== */

.header-spacer {
  height: 100px;
}

/* ===================================
   RESPONSIVE: TABLET (768px - 1024px)
   =================================== */

@media (max-width: 1024px) {

  /* Hide Desktop Header */
  .site-header--desktop {
    display: none !important;
  }

  /* Show Mobile Header */
  .site-header--mobile {
    display: block !important;
  }

  /* Mobile Fixed Header Bar */
  .mobile-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
  }

  /* Mobile Brand */
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
  }

  .mobile-brand__name {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-brand__sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    white-space: nowrap;
    display: none;
  }

  /* Mobile Header Actions */
  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }

  /* Mobile Language Button */
  .mobile-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 20px;
    padding: 6px 12px;
    color: #d4af37;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
  }

  .mobile-lang-btn:active {
    background: rgba(212, 175, 55, 0.3);
    transform: scale(0.95);
  }

  .mobile-lang-btn i {
    font-size: 14px;
  }

  .lang-code {
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Mobile Menu Toggle Button */
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    cursor: pointer;
    gap: 5px;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
  }

  .mobile-menu-toggle:active {
    background: rgba(212, 175, 55, 0.3);
    transform: scale(0.95);
  }

  .mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, #d4af37, #f5e08b);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
  }

  /* Burger Animation when active */
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Mobile Menu Panel */
  .mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 85vw;
    max-width: 350px;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.99) 0%, rgba(15, 15, 15, 0.98) 100%);
    backdrop-filter: blur(20px);
    z-index: 10001;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
  }

  .mobile-menu-panel.active {
    right: 0;
  }

  /* Mobile Menu Header */
  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    flex-shrink: 0;
  }

  .mobile-menu-title {
    font-size: 14px;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  .mobile-menu-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }

  .mobile-menu-close:active {
    color: #d4af37;
    transform: scale(0.9);
  }

  /* Language Section */
  .mobile-lang-section {
    padding: 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    flex-shrink: 0;
  }

  .section-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
  }

  .lang-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .lang-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .lang-option:active {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    color: #d4af37;
    transform: scale(0.95);
  }

  .lang-option.active {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
    color: #d4af37;
  }

  .flag {
    font-size: 20px;
  }

  .code {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .name {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
  }

  /* Navigation Sections */
  .mobile-nav-sections {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
  }

  .nav-section {
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  }

  .nav-section-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 12px 16px 8px;
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
  }

  .nav-link:active {
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
    padding-left: 20px;
  }

  .nav-link.active {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.08);
  }

  .nav-link--whatsapp {
    color: #25d366;
  }

  .nav-link--whatsapp:active {
    background: rgba(37, 211, 102, 0.1);
    color: #fff;
  }

  /* Menu Footer */
  .mobile-menu-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    flex-shrink: 0;
  }

  .mobile-book-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #d4af37, #f5e08b);
    color: #0a0a0a;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
  }

  .mobile-book-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
  }

  /* Header Spacer */
  .header-spacer {
    height: 70px;
  }
}

/* ===================================
   RESPONSIVE: MOBILE (< 768px)
   =================================== */

@media (max-width: 768px) {
  /* Mobile-specific adjustments only - main styles now in max-width: 1024px */

  /* Header Spacer - smaller for mobile */
  .header-spacer {
    height: 60px;
  }
}

/* ===================================
   VERY SMALL PHONES (< 360px)
   =================================== */

@media (max-width: 360px) {
  
  .header-main__inner {
    padding: 0 20px;
  }

  .mobile-header-bar {
    padding: 0 12px;
  }

  .mobile-brand__name {
    font-size: 14px;
  }

  .mobile-lang-btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    gap: 4px;
  }

  .mobile-menu-toggle span {
    width: 20px;
    height: 2px;
  }

  .nav-link {
    font-size: 13px;
    padding: 10px 14px;
  }
}

/* ===================================
   CROSS-BROWSER FIXES
   =================================== */

/* Safari iOS specific fixes */
@supports (-webkit-touch-callout: none) {
  .site-header--mobile {
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }

  .mobile-menu-panel {
    -webkit-appearance: none;
    -webkit-border-radius: 0;
  }
}

/* Firefox fixes */
@-moz-document url-prefix() {
  .mobile-menu-toggle span {
    background: linear-gradient(90deg, #d4af37, #f5e08b);
  }
}

/* IE11 fallback (if needed) */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .header-main__inner {
    display: -ms-flexbox;
    -ms-flex-pack: justify;
  }
}
