/* General Reset & Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
  padding-top: 70px; /* Add padding to body to prevent content from hiding under fixed header. Adjust this value based on actual header height. */
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Header Styles */
.site-header {
  background-color: #003366; /* Primary color */
  color: #fff;
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed; /* Changed to fixed */
  top: 0; /* Stick to the top */
  width: 100%; /* Take full width */
  z-index: 1000; /* Ensure it stays on top of other content */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFCC00; /* Secondary color */
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.logo:hover {
  color: #fff;
}

.main-nav .nav-list {
  display: flex;
  gap: 25px;
}

.main-nav a {
  color: #fff;
  font-weight: 600;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: #FFCC00; /* Secondary color */
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a:hover,
.main-nav a.active {
  color: #FFCC00; /* Secondary color */
}

/* New Button Styles */
.btn {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  font-size: 15px;
}

.btn-register {
  background-color: #FFCC00; /* Secondary color */
  color: #003366; /* Primary color */
  border: 1px solid #FFCC00;
}

.btn-register:hover {
  background-color: #e6b800; /* Darker yellow */
  color: #003366;
}

.btn-login {
  background-color: transparent;
  color: #FFCC00; /* Secondary color */
  border: 1px solid #FFCC00;
}

.btn-login:hover {
  background-color: #FFCC00;
  color: #003366;
}

.header-actions {
  display: flex; /* Show on desktop */
  gap: 10px;
  align-items: center;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above mobile nav */
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFCC00; /* Secondary color */
  margin: 5px 0;
  transition: all 0.3s ease;
}

.mobile-nav {
  /* display: none; /* Hidden by default - REMOVED */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #003366; /* Primary color */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  overflow: hidden;
  max-height: 0; /* For smooth slide effect */
  visibility: hidden; /* Added: Hide without removing from layout flow */
  opacity: 0; /* Added: Make it transparent */
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, visibility 0s 0.3s; /* Modified: Add opacity and visibility transitions */
}

.mobile-nav.active {
  max-height: 500px; /* Adjust as needed */
  visibility: visible; /* Added: Make it visible */
  opacity: 1; /* Added: Make it opaque */
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, visibility 0s; /* Modified: No delay on open */
}

.mobile-nav-list li {
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-list li:last-child {
  border-bottom: none;
}

.mobile-nav-list a {
  display: block;
  padding: 15px 20px;
  color: #fff;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
  background-color: #004488; /* Slightly lighter primary */
  color: #FFCC00; /* Secondary color */
}

.mobile-buttons-row {
  display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
  background-color: #003366; /* Primary color */
  color: #e0e0e0;
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.footer-column {
  margin-bottom: 20px;
}

.footer-column h3 {
  color: #FFCC00; /* Secondary color */
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 5px;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: #FFCC00; /* Secondary color */
}

.footer-column p {
  margin-bottom: 10px;
}

.footer-column a {
  color: #e0e0e0;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: #FFCC00; /* Secondary color */
}

.footer-nav ul li {
  margin-bottom: 8px;
}

.footer-nav a {
  display: block;
  padding: 2px 0;
}

.copyright {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #bbb;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .main-nav .nav-list {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 120px; /* Adjusted padding-top for body on mobile to account for fixed header and mobile buttons row */
  }

  .site-header {
    padding: 10px 0; /* Slightly reduce header padding on mobile */
  }

  .header-container {
    /* This container now holds hamburger, logo, and potentially a hidden element for desktop */
    display: grid; /* Use grid for more control over alignment */
    grid-template-columns: auto 1fr auto; /* Hamburger | Logo (centered) | empty space */
    align-items: center;
    padding: 0 15px; /* Keep existing mobile padding */
  }

  .hamburger-menu {
    display: block; /* Show hamburger */
    grid-column: 1 / 2; /* Place in the first column */
    margin-right: auto; /* Push it to the left */
    order: -1; /* Ensure it's visually first in the grid flow */
  }

  .logo {
    grid-column: 2 / 3; /* Place in the second column */
    text-align: center; /* Center the logo within its grid column */
    margin: 0 auto; /* Ensure it's centered if it's the only item in its column */
  }

  .main-nav {
    display: none; /* Hide desktop nav */
  }

  .header-actions {
    display: none; /* Hide desktop action buttons */
  }

  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Mobile-specific buttons row */
  .mobile-buttons-row {
    display: block; /* Show this row on mobile */
    padding-bottom: 10px; /* Add some space below buttons */
    background-color: #003366; /* Match header background */
  }

  .mobile-buttons-row .header-container {
    display: flex; /* Arrange buttons horizontally */
    justify-content: center; /* Center the buttons */
    gap: 15px; /* Space between buttons */
    padding: 10px 20px; /* Padding for the button container */
  }

  .footer-container {
    grid-template-columns: 1fr; /* Stack columns */
    padding: 0 15px;
  }

  .footer-column {
    text-align: center;
  }

  .footer-column h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
  }
  
  .footer-nav ul li {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 24px;
  }
  .footer-nav ul {
    flex-direction: column;
    align-items: center;
  }
}