:root {
  --primary-dark-color: #003366;
  --secondary-color: #FFCC00;
  --text-light-color: #ffffff;
  --text-dark-color: #003366;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-top-height-mobile: 50px;
  --mobile-buttons-height-mobile: 50px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop default padding */
  background-color: #f4f4f4;
}

body.no-scroll {
  overflow: hidden;
}

/* ==================================================================
   HEADER STYLES - DESKTOP FIRST
   ================================================================== */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column; /* Stacks header-top and main-nav */
  min-height: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop));
}

.header-top {
  background-color: var(--primary-dark-color);
  width: 100%;
  min-height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Padding for logo and buttons from container edges */
}

.logo {
  color: var(--secondary-color);
  font-size: 2.2em;
  font-weight: bold;
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.3s ease;
  display: block; /* Ensure logo is always displayed */
}

.logo:hover {
  color: var(--text-light-color);
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn-register {
  background: linear-gradient(to right, #FFCC00, #FFAA00);
  color: var(--text-dark-color);
  box-shadow: 0 4px 10px rgba(255, 204, 0, 0.4);
}

.btn-register:hover {
  background: linear-gradient(to right, #FFAA00, #FFBB00);
  box-shadow: 0 6px 15px rgba(255, 204, 0, 0.6);
  transform: translateY(-2px);
}

.btn-login {
  background-color: var(--text-light-color);
  color: var(--primary-dark-color);
  border: 2px solid var(--secondary-color);
}

.btn-login:hover {
  background-color: var(--secondary-color);
  color: var(--text-light-color);
  border-color: var(--text-light-color);
  transform: translateY(-2px);
}

.btn-app {
  background-color: var(--primary-dark-color);
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.btn-app:hover {
  background-color: var(--secondary-color);
  color: var(--primary-dark-color);
  transform: translateY(-2px);
}

.main-nav {
  background-color: var(--secondary-color);
  width: 100%;
  min-height: var(--main-nav-height-desktop);
  display: flex; /* Default to flex for desktop */
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop horizontal */
  justify-content: center; /* Center menu items */
  align-items: center;
  padding: 10px 30px;
}

.nav-link {
  color: var(--text-dark-color);
  text-decoration: none;
  padding: 10px 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark-color);
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 25px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) {
  top: 0;
}

.hamburger-menu span:nth-child(2) {
  top: 11px;
}

.hamburger-menu span:nth-child(3) {
  top: 22px;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 11px;
  background-color: var(--secondary-color);
}

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

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 11px;
  background-color: var(--secondary-color);
}

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

.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* ==================================================================
   FOOTER STYLES
   ================================================================== */
.site-footer {
  background-color: var(--primary-dark-color);
  color: var(--text-light-color);
  padding: 40px 20px 20px;
  font-size: 0.9em;
  border-top: 5px solid var(--secondary-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-column {
  flex: 1 1 200px; /* Allows columns to grow and shrink, with a base width */
  min-width: 180px;
}

.footer-column h3 {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 1.2em;
}

.footer-column p,
.footer-column ul {
  margin-bottom: 15px;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li a {
  color: var(--text-light-color);
  text-decoration: none;
  padding: 5px 0;
  display: block;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--secondary-color);
}

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

/* ==================================================================
   RESPONSIVE STYLES - MOBILE OVERRIDES
   ================================================================== */
@media (max-width: 768px) {
  body {
    padding-top: calc(var(--header-top-height-mobile) + var(--mobile-buttons-height-mobile)); /* Mobile padding */
  }

  .site-header {
    min-height: auto; /* Allow height to adjust */
  }

  .header-top {
    min-height: var(--header-top-height-mobile);
    padding: 0 15px;
  }

  .header-container {
    padding: 0;
    justify-content: space-between;
    position: relative; /* For logo centering relative to container */
  }

  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8em;
    padding: 8px 0;
    z-index: 1000;
    display: block; /* Ensure logo is always displayed */
  }

  .desktop-nav-buttons {
    display: none;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 25px;
    width: 30px;
    padding: 0;
    position: relative;
    z-index: 1001; /* Ensure it's above everything */
    left: 0;
  }

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-dark-color);
    padding: 10px 15px;
    width: 100%;
    min-height: var(--mobile-buttons-height-mobile);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 998; /* Below hamburger menu, above content */
  }

  .mobile-nav-buttons .btn {
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: 20px;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: calc(var(--header-top-height-mobile) + var(--mobile-buttons-height-mobile)); /* Position below header-top and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100vh - (var(--header-top-height-mobile) + var(--mobile-buttons-height-mobile)));
    overflow-y: auto;
    flex-direction: column;
    background-color: var(--primary-dark-color);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 999; /* Below hamburger, above overlay */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
  }

  .main-nav.active {
    display: flex; /* Must set display to show */
    transform: translateX(0); /* Slide in */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    max-width: none; /* Mobile container fills width */
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light-color);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
  }

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 997;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  .footer-container {
    flex-direction: column;
    gap: 25px;
  }

  .footer-column {
    flex: 1 1 100%;
    min-width: auto;
    text-align: center;
  }

  .footer-column ul {
    padding-left: 0;
  }

  .footer-column ul li a {
    display: inline-block;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .header-top {
    padding: 0 10px;
  }

  .logo {
    font-size: 1.6em;
  }

  .mobile-nav-buttons .btn {
    padding: 6px 12px;
    font-size: 0.85em;
  }

  .nav-link {
    font-size: 0.95em;
  }

  .footer-column h3 {
    font-size: 1.1em;
  }

  .footer-column p,
  .footer-column ul li a {
    font-size: 0.85em;
  }
}
