/* Variables */
:root {
  --primary-bg: #0A192F;
  --secondary-accent: #FFD700;
  --text-color: #f0f0f0;
  --link-hover-color: #FFD700;
}

/* Base styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--text-color);
  background-color: #1a1a1a;
  line-height: 1.6;
  /* Added padding-top to body to prevent content from being hidden under the fixed header */
  padding-top: 70px; /* Adjust this value based on actual desktop header height */
}

/* Added for mobile menu overlay */
body.menu-open {
  overflow: hidden; /* Prevent scrolling when mobile menu is open */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header styles */
.site-header {
  position: fixed; /* Make the header fixed */
  top: 0; /* Position it at the top of the viewport */
  width: 100%; /* Ensure it spans the full width */
  z-index: 1000; /* Ensure it stays above other content */
  background-color: var(--primary-bg);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.site-header .container {
  display: flex;
  justify-content: space-between; /* Spreads logo, nav, buttons */
  align-items: center;
}

/* Base styles for ALL logos */
.site-header .logo {
  font-family: 'Impact', sans-serif;
  color: var(--secondary-accent);
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  transition: color 0.3s ease;
}

.site-header .logo:hover {
  color: #fff;
}

/* Desktop-specific logo (visible by default) */
.site-header .desktop-logo {
  display: block; /* Ensure it's visible */
  font-size: 2.5em; /* Desktop font size */
  order: 1; /* Position in flex container */
}

/* Mobile-specific logo (hidden by default on desktop) */
.site-header .mobile-logo {
  display: none;
}

/* Hide mobile-specific wrapper and hamburger on desktop */
.header-mobile-top-bar {
  display: none; /* Hidden by default on desktop */
}

.site-header .main-nav {
  order: 2; /* Default order for desktop */
  margin-left: auto; /* Push nav and buttons to the right */
}

.site-header .main-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; /* Display on desktop */
}

.site-header .main-nav .nav-list li {
  margin-left: 30px;
}

.site-header .main-nav .nav-list a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.site-header .main-nav .nav-list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-accent);
  transition: width 0.3s ease;
}

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

.site-header .main-nav .nav-list a:hover,
.site-header .main-nav .nav-list a.active {
  color: var(--secondary-accent);
}

/* Auth Buttons (Desktop) */
.auth-buttons {
  order: 3; /* Default order for desktop */
  display: flex; /* Show on desktop */
  gap: 10px; /* Space between buttons */
  margin-left: 20px; /* Space from main-nav */
}

.auth-buttons .btn {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 0.9em;
  white-space: nowrap; /* Prevent buttons from wrapping text */
}

.auth-buttons .btn-register {
  background-color: var(--secondary-accent);
  color: var(--primary-bg);
  border: 1px solid var(--secondary-accent);
}

.auth-buttons .btn-register:hover {
  background-color: #fff;
  color: var(--primary-bg);
  border-color: #fff;
}

.auth-buttons .btn-login {
  background-color: transparent;
  color: var(--secondary-accent);
  border: 1px solid var(--secondary-accent);
}

.auth-buttons .btn-login:hover {
  background-color: var(--secondary-accent);
  color: var(--primary-bg);
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default, shown on mobile */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001; /* Ensure it's above other content */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-accent);
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Footer styles */
.site-footer {
  background-color: var(--primary-bg);
  padding: 40px 0 20px;
  margin-top: 50px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.site-footer .footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 30px;
}

.site-footer .footer-col {
  flex: 1;
  min-width: 250px;
  margin-right: 20px;
  margin-bottom: 20px;
}

.site-footer .footer-col:last-child {
  margin-right: 0;
}

.site-footer .footer-col h3 {
  color: var(--secondary-accent);
  font-size: 1.2em;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 5px;
}

.site-footer .footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.site-footer .footer-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.3s ease;
}

.site-footer .footer-nav a:hover {
  color: var(--secondary-accent);
}

.site-footer .footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  padding-top: 20px;
  margin-top: 20px;
}

.site-footer .footer-bottom p {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Responsive styles */
@media (max-width: 992px) {
  .site-header .main-nav .nav-list li {
    margin-left: 20px;
  }
}

@media (max-width: 768px) {
  body {
    /* Adjust padding-top for mobile header height */
    padding-top: 65px; 
  }

  .site-header .container {
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
  }

  /* Hide desktop logo on mobile */
  .site-header .desktop-logo {
    display: none;
  }

  /* Mobile Top Bar (Hamburger + Logo) */
  .header-mobile-top-bar {
    display: grid; /* Use grid for precise left-center layout */
    grid-template-columns: 1fr auto 1fr; /* Left, Center, Right columns */
    align-items: center;
    width: 100%;
    order: 1; /* Place at the top of the column flow */
    padding-bottom: 15px; /* Space below this bar */
  }

  /* Show mobile logo on mobile */
  .site-header .mobile-logo {
    display: block; /* Make it visible */
    font-size: 2em; /* Mobile font size */
    grid-column: 2 / 3; /* Place in the second (center) column within the grid */
    justify-self: center; /* Align to the center of the column */
    margin: 0; /* Reset margins from desktop styles */
  }

  /* Hamburger */
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    grid-column: 1 / 2; /* Place in the first column */
    justify-self: start; /* Align to the start of the column (left) */
    z-index: 1002; /* Ensure it's above the overlay */
  }

  /* Main Navigation (Overlay Menu) */
  .site-header .main-nav {
    order: 3; /* Place after logo and buttons in column flow */
    width: 100%; /* Take full width, but display is none by default */
    position: static; /* Reset position for main-nav container */
  }

  .site-header .main-nav .nav-list {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed; /* Make it a floating/overlay menu */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Full screen overlay */
    background-color: var(--primary-bg); /* Dark background */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    padding: 80px 0 20px; /* Padding for content, considering header height */
    z-index: 1000; /* Below hamburger, above content */
    overflow-y: auto; /* Scroll if content is long */
    justify-content: flex-start; /* Align items to top */
    align-items: center; /* Center nav items */
    transform: translateX(100%); /* Start off-screen to the right */
    transition: transform 0.3s ease-in-out;
  }

  .site-header .main-nav .nav-list.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide in */
  }

  .site-header .main-nav .nav-list li {
    margin: 0;
    text-align: center;
    padding: 15px 0;
    width: 100%; /* Make list items take full width for tapping */
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  }

  .site-header .main-nav .nav-list li:last-child {
    border-bottom: none;
  }

  .site-header .main-nav .nav-list a {
    display: block;
    padding: 10px 15px;
    font-size: 1.2em; /* Larger font for mobile menu */
  }

  .site-header .main-nav .nav-list a::after {
    display: none; /* Remove underline animation for mobile */
  }

  /* Auth buttons for mobile */
  .auth-buttons {
    display: flex; /* Show buttons */
    order: 2; /* Place after header-mobile-top-bar and before main-nav */
    width: 100%; /* Take full width */
    justify-content: center; /* Center buttons */
    margin-top: 15px; /* Space below header-mobile-top-bar */
    margin-left: 0; /* Reset margin */
    padding-top: 15px; /* Add some padding from the line above */
    border-top: 1px solid rgba(255, 215, 0, 0.2); /* Separator line */
    gap: 20px; /* Increase gap for mobile buttons */
  }

  .auth-buttons .btn {
    padding: 10px 20px; /* Slightly larger buttons for mobile */
    font-size: 1em;
  }

  /* Hamburger menu animation */
  .hamburger-menu.active {
    position: fixed; /* Keep hamburger fixed when menu is open */
    top: 25px; /* Adjust position */
    left: 15px; /* Adjust position */
    background-color: transparent; /* Ensure no background */
  }
  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--secondary-accent); /* Keep color consistent */
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--secondary-accent); /* Keep color consistent */
  }

  /* Footer responsive styles */
  .site-footer .footer-columns {
    flex-direction: column;
    align-items: center;
  }

  .site-footer .footer-col {
    width: 100%;
    max-width: 300px;
    margin-right: 0;
    text-align: center;
  }

  .site-footer .footer-col h3 {
    text-align: center;
  }
}