/* Header/hamburger modular CSS (desktop + mobile) */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0.7rem 0;
  transition: background-color 0.3s ease;
  min-height: 60px; /* Ensure minimum height for mobile */
}

.header.scrolled {
  background-color: rgba(0, 57, 78, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header.scrolled .logo h1,
.header.scrolled .navigation a {
  color: #F6EEE0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  min-height: 44px; /* Ensure content has minimum height */
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.logo-image {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.logo h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  font-weight: normal;
  color: #F6EEE0;
  transition: color 0.3s ease;
  letter-spacing: 0.15em;
  margin: 0;
}

.logo-subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  font-weight: normal;
  color: #F6EEE0;
  transition: color 0.3s ease;
  letter-spacing: 0.1em;
  margin-top: -2px;
}

/* Mobile header adjustments */
@media (max-width: 700px) {
  .header {
    padding: 0;
    min-height: 60px;
    background-color: rgba(0, 57, 78, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  }
  
  .header-content {
    padding: 0;
    min-height: 60px;
    position: relative;
  }
  
  .header .logo { 
    position: absolute; 
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    z-index: 1002; 
  }
  
  .header .logo-link { 
    pointer-events: auto; 
  }
  
  /* Ensure logo text is visible on mobile */
  .header .logo h1 {
    font-size: 1.2rem;
    color: #F6EEE0;
  }
  
  .header .logo-subtitle {
    font-size: 0.7rem;
    color: #F6EEE0;
  }
}

/* Additional mobile breakpoint for very small devices */
@media (max-width: 480px) {
  .header {
    min-height: 56px;
  }
  
  .header-content {
    min-height: 56px;
  }
  
  .header .logo h1 {
    font-size: 1rem;
  }
  
  .header .logo-subtitle {
    font-size: 0.6rem;
  }
  
  .header .logo {
    left: 0.75rem;
  }
  
  .nav-toggle {
    right: 0.75rem;
  }
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 44px; height: 36px;
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 0; padding: 6px; cursor: pointer;
  border-radius: 8px; color: #F6EEE0;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-toggle .bar {
  display: block; width: 22px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Default hamburger positions */
.nav-toggle .bar:nth-child(1) { transform: translate(-50%, calc(-50% - 6px)); }
.nav-toggle .bar:nth-child(2) { transform: translate(-50%, -50%); }
.nav-toggle .bar:nth-child(3) { transform: translate(-50%, calc(-50% + 6px)); }

/* Animated hamburger to X transformation */
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Desktop navigation */
.navigation {
  display: flex;
  align-items: center;
}

.navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.navigation a {
  color: #F6EEE0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.navigation a:hover {
  color: #EB561D;
}

.navigation a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #EB561D;
  transition: width 0.3s ease;
}

.navigation a:hover::after {
  width: 100%;
}

.navigation a.active {
  color: #EB561D;
}

.navigation a.active::after {
  width: 100%;
}

/* Collapsible nav */
@media (max-width: 700px) {
  .nav-toggle { 
    display: inline-flex; 
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 1002;
  }
  
  /* Hide desktop navigation on mobile */
  .navigation:not([data-collapsible]) {
    display: none;
  }
  
  /* Show collapsible navigation */
  .navigation[data-collapsible] {
    display: block;
  }
  
  .navigation {
    display: none;
  }
  
  .navigation[data-collapsible] {
    position: fixed; 
    top: 0; 
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 57, 78, 0.98);
    border: none;
    border-radius: 0; 
    padding: 2rem 1rem 1rem 1rem; 
    display: none;
    box-shadow: none;
    transition: clip-path 0.5s ease;
    clip-path: circle(0% at 100% 0%);
    width: 100%;
    height: 100vh;
    backdrop-filter: blur(10px);
  }
  
  .navigation[data-open="true"] { 
    display: block; 
    clip-path: circle(150% at 100% 0%);
  }
  
  .navigation[data-collapsible] ul { 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: center;
    height: 100%;
  }
  
  .navigation[data-collapsible] a { 
    padding: 1rem 1.5rem; 
    display: block; 
    color: #F6EEE0;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    text-align: center;
    font-size: 1.2rem;
  }
  
  .navigation[data-collapsible] a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .navigation[data-collapsible] a.active {
    background-color: rgba(235, 86, 29, 0.2);
    color: #EB561D;
  }
  
  /* Remove underline effect on mobile */
  .navigation[data-collapsible] a::after {
    display: none;
  }
}

/* Desktop navigation styles */
@media (min-width: 701px) {
  .nav-toggle {
    display: none !important;
  }
  
  .navigation[data-collapsible] {
    display: none !important;
  }
  
  .navigation:not([data-collapsible]) {
    display: flex !important;
  }
  
  /* Ensure desktop navigation is visible */
  .desktop-nav {
    display: flex !important;
  }
  
  .mobile-nav {
    display: none !important;
  }
}

/* Responsive header adjustments */
@media (max-width: 700px) {
  .header-content {
    padding: 0 1rem;
  }
  
  .logo h1 {
    font-size: 1.5rem;
  }
  
  .logo-subtitle {
    font-size: 0.8rem;
  }
  
  .desktop-nav {
    display: none !important;
  }
  
  .mobile-nav {
    display: block;
  }
}


