/* ============================================
   HEADER COMPONENT
   ============================================ */

.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--spacing-lg) 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(20px);
  border-bottom: 0.1px solid var(--border-color);
  padding: var(--spacing-md) 0;
}

.header__container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (min-width: 1024px) and (max-width: 1440px) {
  .header__container {
    max-width: 1100px;
  }
}

/* Logo */
.header__logo {
  font-size: var(--font-size-xl);
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  line-height: 1.8;
  justify-self: start;
}

.logo-svg {
  height: 90px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.header__logo:hover .logo-svg {
  transform: scale(1.05);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

/* Mountain Icon Component */
.mountain-icon {
  width: 50px;
  height: 50px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mountain-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.3));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header__logo:hover .mountain-icon svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.5));
}

/* Hide hamburger menu button in desktop */
.header__menu-toggle {
  display: none;
}

/* Navigation */
.header__nav {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
  align-items: center;
  justify-content: center;
}

/* CTA: Show/hide based on device */
.header__nav-cta--mobile {
  display: none;
}

.header__nav-cta--desktop {
  display: flex;
}

/* CTA wrapper in third column */
.header__nav-cta-wrapper {
  display: flex;
  align-items: center;
  justify-self: end;
}

.header__nav-link,
.header__nav-contact-toggle {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: color 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
}

.header__nav-link::after,
.header__nav-contact-toggle::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

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

.header__nav-link:hover::after,
.header__nav-link.active::after,
.header__nav-contact-toggle:hover::after,
.header__nav-contact-toggle.active::after {
  width: 100%;
}

/* CTA Button */
.header__cta,
.header__nav-cta {
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-sm);
}

/* Google Calendar Button in Header - Override styles */

.header__nav-cta-wrapper button {
  background-color: rgb(3, 155, 229) !important;
  color: white !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 0.6rem 1.2rem !important;
  font-size: 0.9rem !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.header__nav-cta-wrapper button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4) !important;
}

/* Contact Dropdown */
.header__nav-contact-group {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
}

.header__nav-contact-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.header__nav-contact-toggle:hover,
.header__nav-contact-toggle:focus {
  color: var(--text-primary);
}

.header__nav-contact-dropdown {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 220px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0.75rem;
  z-index: 100;
  border: 1px solid var(--border-color);
  animation: fadeInMenu 0.22s ease;
}

@keyframes fadeInMenu {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header__nav-contact-item {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 0.2rem;
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
}

.header__nav-contact-item:hover,
.header__nav-contact-item:focus {
  background: var(--primary-gradient);
  color: #fff;
}

/* Laptop 1366x768 Optimization */
@media (min-width: 1024px) and (max-width: 1440px) and (max-height: 800px) {
  .header {
    padding: 0.75rem 0;
  }

  .header.scrolled {
    padding: 0.5rem 0;
  }

  .header__container {
    padding: 0 1.5rem;
  }

  .logo-svg {
    height: 70px;
  }

  .header__nav {
    gap: clamp(1rem, 2vw, 1.5rem);
  }

  .header__nav-link,
  .header__nav-contact-toggle {
    font-size: 0.9rem;
  }

  .header__cta,
  .header__nav-cta {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* Desktop Styles */
@media (min-width: 701px) {
  .header__nav-cta {
    margin: 0 !important;
    padding: var(--spacing-sm) var(--spacing-lg) !important;
    width: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    align-self: center;
  }

  /* Show dropdown on hover (desktop) */
  .header__nav-contact-group:hover .header__nav-contact-dropdown,
  .header__nav-contact-group:focus-within .header__nav-contact-dropdown {
    display: block;
  }
}

/* Mobile Styles */
@media (max-width: 700px) {
  .header {
    padding: 0.875rem 0;
  }

  .header__container {
    padding: 0 1rem;
  }

  .header__logo-text {
    font-size: 1.125rem;
    letter-spacing: 0.5px;
  }

  .header__logo .logo-svg {
    height: 90px;
  }

  /* Hamburger Menu Button - Simple and Functional */
  .header__menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    grid-column: -1;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 10000;
  }

  /* Hide the default span text */
  .header__menu-toggle span {
    display: none;
  }

  /* Simple hamburger icon with SVG-like styling */
  .header__menu-toggle::before {
    content: '☰';
    font-size: 28px;
    color: var(--text-primary);
    line-height: 1;
  }

  /* Change to X when open */
  .header__menu-toggle.open::before {
    content: '✕';
    font-size: 24px;
  }

  /* Simple Mobile Menu */
  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 80vw);
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 1.5rem 2rem;
    gap: 0;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow-y: auto;
  }

  .header__nav.open {
    right: 0;
  }

  /* Simple menu items */
  .header__nav-link {
    font-size: 1.125rem;
    font-weight: 500;
    padding: 1rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.2s ease;
    color: var(--text-secondary);
  }

  .header__nav-link:hover,
  .header__nav-link.active {
    color: #00d4ff;
  }

  /* Show mobile link, hide desktop widget */
  .header__nav-cta--mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(45deg, #00d4ff, #0066ff);
    border-radius: var(--radius-lg, 0.75rem);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .header__nav-cta--mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
  }

  .header__nav-cta--desktop {
    display: none;
  }

  /* Mobile CTA Button */
  .header__nav-cta {
    width: 100%;
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    justify-content: center;
  }
}

