/* Header with semi-transparent yellow background and white text */
header {
  background-color: rgba(
    250,
    208,
    44,
    0.85
  ); /* Semi-transparent yellow (#FAD02C) */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  padding: 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  backdrop-filter: blur(
    5px
  ); /* Adds a slight blur effect to content underneath */
  -webkit-backdrop-filter: blur(5px); /* For Safari support */
}

header.scrolled {
  background-color: rgba(250, 208, 44, 0.95); /* More opaque when scrolled */
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: stretch; /* Changed from center to stretch for full height */
  height: 90px; /* Increased height to accommodate larger logo */
  max-width: 1400px; /* Wider container for more space */
  padding: 0 20px; /* Added horizontal padding */
}

.logo {
  display: flex;
  align-items: center;
  padding: 8px 0;
  min-height: 90px;
}

.logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo img {
  max-height: 90px; /* Increased logo size */
  width: auto;
  object-fit: contain;
  display: block;
  background-color: transparent;
}

nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: stretch; /* Align nav to stretch full height */
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch; /* Stretch to full height */
  height: 100%;
}

.nav-links li {
  margin: 0;
  position: relative;
  display: flex;
  align-items: stretch; /* Stretch to full height */
}

.nav-links a {
  color: #111 !important; /* Black text */
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0 20px; /* Horizontal padding only */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  transition: all 0.3s ease;
  margin-top: 5px; /* Added margin to center with larger header height */
  position: relative;
  text-shadow: none !important; /* Remove text shadow */
}

.nav-links a:hover,
.nav-links a.active {
  color: #fad02c !important; /* Yellow for hover/active state */
  opacity: 0.9; /* Slightly reduce opacity for hover effect */
}

.nav-links a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #ffffff; /* Update the active indicator line color to white */
  transform: none; /* Remove the transform */
}

/* Light mode styles - if needed */
.light-mode header {
  background-color: rgba(250, 208, 44, 0.65);
}

.light-mode .nav-links a {
  color: #ffffff;
}

.light-mode .nav-links a:hover,
.light-mode .nav-links a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  align-self: center;
  margin-left: 20px;
  margin-top: 5px;
  z-index: 1001;
  padding: 2px;
}

.hamburger div {
  width: 100%;
  height: 3px;
  background-color: #111; /* Dark hamburger lines for better visibility */
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile navigation */
@media screen and (max-width: 992px) {
  header .container {
    height: 80px; /* Slightly smaller on mobile but still accommodating larger logo */
  }

  .nav-links {
    position: fixed;
    right: -100%;
    top: 80px; /* Match the container height */
    flex-direction: column;
    background-color: rgba(250, 208, 44, 0.95); /* Matching header color */
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 80px); /* Fixed to match the top value */
    text-align: center;
    transition: right 0.5s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    border-top-left-radius: 0; /* Remove radius for cleaner look */
    z-index: 999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: auto; /* Allow scrolling if menu is too long */
  }

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

  .nav-links li {
    margin: 0;
    width: 100%;
  }

  .nav-links a {
    padding: 15px 20px;
    font-size: 1rem;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-links a.active::after {
    display: none;
  }

  .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.15);
  }

  .hamburger {
    display: flex;
    z-index: 1000;
  }

  .hamburger.active .line1 {
    transform: translateY(10px) rotate(45deg);
  }

  .hamburger.active .line2 {
    opacity: 0;
  }

  .hamburger.active .line3 {
    transform: translateY(-10px) rotate(-45deg);
  }

  /* Additional mobile menu fixes for better visibility and functionality */
  /* Ensure hamburger is always visible on mobile */
  .hamburger {
    display: flex !important;
    position: relative;
    background: none;
    border: none;
    padding: 5px;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* Remove blue highlight on mobile */
  }

  /* Improve hamburger line visibility */
  .hamburger .line1,
  .hamburger .line2,
  .hamburger .line3 {
    background-color: #111 !important;
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Ensure nav container doesn't interfere with hamburger */
  nav {
    position: relative;
  }

  /* Prevent touch callouts on mobile */
  .hamburger,
  .nav-links {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

/* Additional padding to body to account for fixed header */
body {
  padding-top: 80px;
}

@media screen and (max-width: 992px) {
  body {
    padding-top: 70px; /* Match the mobile header height */
  }
}

/* Logo specific fixes */
.logo img {
  background-color: transparent;
}

/* In case logo is an SVG that needs specific styling */
.logo svg path {
  fill: #ffffff;
}

/* Fix if the logo is too dark in dark mode - exclude EAELOGO.png */
.logo img[src*='.png']:not([src*='EAELOGO.png']) {
  filter: brightness(0) invert(1); /* Make all other PNG logos white */
}

/* Preserve original colors for EAELOGO.png */
.logo img[src*='EAELOGO.png'] {
  filter: none; /* Keep original colors */
}

/* Responsive: slightly reduce logo size on tablets and phones */
@media (max-width: 991px) {
  .logo img {
    max-height: 70px;
  }
  .logo {
    min-height: 70px;
  }
  header .container {
    min-height: 80px;
  }
}
@media (max-width: 576px) {
  .logo img {
    max-height: 55px;
  }
  .logo {
    min-height: 55px;
  }
  header .container {
    min-height: 60px;
    padding: 0 10px;
  }
}

/* --- HEADER BLACK FONT UPDATE --- */
header .site-title h1 {
  color: #111 !important;
  text-shadow: none !important;
}

header nav .nav-links a {
  color: #111 !important;
  text-shadow: none !important;
}

header nav .nav-links a.active,
header nav .nav-links a:focus,
header nav .nav-links a:hover {
  color: #fad02c !important;
}
/* --- END HEADER BLACK FONT UPDATE --- */
