/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: visible;
  width: 100%;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Hero Background Video */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Ensure video covers the entire hero on all screen sizes */
@media (min-aspect-ratio: 16/9) {
  .hero-video {
    width: 100%;
    height: auto;
  }
}

@media (max-aspect-ratio: 16/9) {
  .hero-video {
    width: auto;
    height: 100%;
  }
}

/* ==========================================================================
   Progressive Navigation Headers
   ========================================================================== */

/* Base Header Styles */
.header {
  width: 100%;
  padding: var(--space-4) 0;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  letter-spacing: -0.02em;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: all var(--transition-fast);
}

.lang-btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.lang-switcher.is-open .lang-btn svg {
  transform: rotate(180deg);
}

.lang-flag {
  font-size: 1rem;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  overflow: hidden;
}

.lang-switcher.is-open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: background var(--transition-fast);
}

.lang-option:hover {
  background: var(--color-accent-light);
}

.lang-option.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* Sign In Button */
.btn-signin {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.btn-signin svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Hero Header (Transparent State)
   ========================================================================== */

.header-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
}

.header-hero .logo-text {
  color: var(--color-text-inverse);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-hero .lang-btn {
  color: var(--color-text-inverse);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-hero .lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header-hero .btn-signin {
  color: var(--color-text-inverse);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-hero .btn-signin:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header-hero .mobile-menu-toggle {
  color: var(--color-text-inverse);
}

/* ==========================================================================
   Fixed Header (Scrolled State)
   ========================================================================== */

.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.header-fixed.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header-fixed .logo-text {
  color: var(--color-text);
}

.header-fixed .nav-link {
  color: var(--color-text-muted);
}

.header-fixed .nav-link:hover {
  color: var(--color-text);
  background: var(--color-accent-light);
}

.header-fixed .lang-btn {
  color: var(--color-text);
}

.header-fixed .lang-btn:hover {
  background: var(--color-accent-light);
}

.header-fixed .btn-signin {
  color: var(--color-text);
}

.header-fixed .btn-signin:hover {
  background: var(--color-accent-light);
}

.header-fixed .mobile-menu-toggle {
  color: var(--color-text);
}

/* ==========================================================================
   Mobile Menu Toggle
   ========================================================================== */

.mobile-menu-toggle {
  display: none;
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  transition: background var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header-fixed .mobile-menu-toggle:hover {
  background: var(--color-accent-light);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Responsive - Desktop
   ========================================================================== */

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .btn-signin span {
    display: none;
  }
  
  .lang-text {
    display: none;
  }
}

/* Hero Content */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-12) var(--container-padding);
  padding-bottom: var(--space-32);
}

.hero-title {
  font-size: var(--text-5xl);
  color: var(--color-text-inverse);
  max-width: 900px;
  margin-bottom: var(--space-6);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.9);
  max-width: 640px;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
}

/* ==========================================================================
   Hero Search Panel with Tabs
   ========================================================================== */

.hero-search-panel {
  position: absolute;
  bottom: var(--space-12);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  padding: 0 var(--container-padding);
  z-index: 100;
}

/* Search Tabs - Connected to Search Box */
.search-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.search-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-tab:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.search-tab.active {
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Tab Icon */
.search-tab-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.search-tab.active .search-tab-icon {
  background: var(--color-primary);
}

.search-tab-icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-text-inverse);
  transition: color 0.3s ease;
}

.search-tab.active .search-tab-icon svg {
  color: var(--color-text-inverse);
}

/* Tab Content */
.search-tab-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.search-tab-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text-inverse);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.search-tab.active .search-tab-title {
  color: var(--color-text);
  text-shadow: none;
}

.search-tab-desc {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.search-tab.active .search-tab-desc {
  color: var(--color-text-muted);
}

/* Connection indicator - visual link to search box */
.search-tab.active::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  transform: translateX(-50%) rotate(45deg);
  z-index: -1;
}

/* Responsive Tabs */
@media (max-width: 768px) {
  .search-tabs {
    gap: var(--space-2);
    margin-bottom: var(--space-2);
  }
  
  .search-tab {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-3);
    gap: var(--space-2);
  }
  
  .search-tab-icon {
    width: 40px;
    height: 40px;
  }
  
  .search-tab-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .search-tab-title {
    font-size: var(--text-sm);
  }
  
  .search-tab-desc {
    display: none;
  }
  
  .search-tab.active::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .search-tab {
    padding: var(--space-2);
  }
  
  .search-tab-icon {
    width: 36px;
    height: 36px;
  }
  
  .search-tab-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .search-tab-title {
    font-size: var(--text-xs);
  }
}

.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 100;
}

.search-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--color-accent);
}

.search-field:last-of-type {
  border-right: none;
}

.search-field-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.search-field-input {
  border: none;
  background: transparent;
  font-size: var(--text-base);
  color: var(--color-text);
  padding: 0;
  width: 100%;
}

.search-field-input:focus {
  outline: none;
}

.search-field-input::placeholder {
  color: var(--color-text-muted);
}

.search-field select {
  border: none;
  background: transparent;
  font-size: var(--text-base);
  color: var(--color-text);
  padding: 0;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: var(--space-5);
}

.search-field select:focus {
  outline: none;
}

/* Custom Select Dropdown */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: var(--space-1) 0;
}

.custom-select-value {
  font-size: var(--text-base);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-value[data-placeholder]:not(.has-value) {
  color: var(--color-text-muted);
}

.custom-select-arrow {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.custom-select.is-open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 280px;
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 9999;
  max-height: 360px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.custom-select.is-open .custom-select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-accent);
}

.custom-select-search svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.custom-select-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none;
}

.custom-select-search-input::placeholder {
  color: var(--color-text-light);
}

.custom-select-options {
  overflow-y: auto;
  max-height: 300px;
  padding: var(--space-2);
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.custom-select-option:hover,
.custom-select-option.is-focused {
  background: var(--color-accent-light);
}

.custom-select-option.is-selected {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.custom-select-option.is-selected .option-sub,
.custom-select-option.is-selected .option-count,
.custom-select-option.is-selected .option-badge {
  color: rgba(255, 255, 255, 0.8);
}

.custom-select-option.is-hidden {
  display: none;
}

/* Option content wrapper - stacks text vertically */
.option-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.option-icon {
  font-size: 1.125rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.custom-select-option.is-selected .option-icon {
  background: rgba(255, 255, 255, 0.2);
}

.option-text {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.option-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.option-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.option-badge {
  font-size: var(--text-xs);
  color: var(--color-primary);
  background: var(--color-accent-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: auto;
  flex-shrink: 0;
}

.custom-select-option.is-selected .option-badge {
  background: rgba(255, 255, 255, 0.2);
}

/* Country header options */
.custom-select-option.option-header {
  background: var(--color-accent-light);
  margin-top: var(--space-2);
}

.custom-select-option.option-header:first-child {
  margin-top: 0;
}

.custom-select-option.option-header .option-text {
  font-weight: var(--font-semibold);
}

.custom-select-option.option-header:hover {
  background: var(--color-accent);
}

.custom-select-empty {
  display: none;
  padding: var(--space-6) var(--space-4);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.custom-select-empty.is-visible {
  display: block;
}

/* Date Field */
.date-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.date-field-display {
  flex: 1;
  border: none;
  background: transparent;
  font-size: var(--text-base);
  color: var(--color-text);
  cursor: pointer;
  padding: var(--space-1) 0;
  padding-right: var(--space-6);
}

.date-field-display::placeholder {
  color: var(--color-text-muted);
}

.date-field-picker {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.date-field-icon {
  position: absolute;
  right: 0;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .custom-select-dropdown {
    left: -12px;
    right: -12px;
    max-height: 280px;
  }
  
  .custom-select-options {
    max-height: 200px;
  }
}

.search-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: var(--font-medium);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.search-btn:hover {
  background-color: var(--color-primary-dark);
}

.search-btn svg {
  width: 20px;
  height: 20px;
}

/* Mobile Search */
@media (max-width: 768px) {
  .hero {
    min-height: 100svh;
  }
  
  .hero-content {
    padding-bottom: var(--space-20);
  }
  
  .hero-search {
    bottom: var(--space-6);
    padding: 0 var(--space-4);
  }
  
  .search-box {
    flex-direction: column;
    padding: var(--space-4);
    gap: var(--space-3);
  }
  
  .search-field {
    width: 100%;
    padding: var(--space-3);
    border-right: none;
    border-bottom: 1px solid var(--color-accent);
    background: var(--color-accent-light);
    border-radius: var(--radius-lg);
  }
  
  .search-field:last-of-type {
    border-bottom: none;
  }
  
  .search-btn {
    width: 100%;
    justify-content: center;
    padding: var(--space-4);
  }
}

/* Scroll Indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-inverse);
  opacity: 0.7;
  animation: bounce 2s infinite;
}

.hero-scroll span {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

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

