/* Base Styles */
:root {
  --primary-color: #FFD700; /* Gold */
  --auxiliary-color: #1A1A2E; /* Dark Blue/Purple */
  --text-color: #FFFFFF;
  --link-color: #FFD700;
  --link-hover-color: #FFA500;
  --bg-dark: #121212;
  --bg-light-dark: #202020;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-dark);
  padding-top: 67px; /* Compensate for fixed header height */
}

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

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--link-color);
}

/* Header Styles */
.site-header {
  background-color: var(--auxiliary-color);
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  /* Added for sticky header */
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000; /* Ensure it stays on top */
}

.site-header .container {
  display: flex;
  /* justify-content: space-between; Removed as order and margins handle spacing */
  align-items: center;
  flex-wrap: nowrap; /* Ensure elements stay on one line on desktop */
}

.site-header .logo {
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  order: 1; /* For desktop */
  margin-right: auto; /* Pushes nav and buttons to the right */
}

.main-nav {
  order: 2; /* For desktop */
  margin-left: 25px; /* Spacing between logo and nav */
}

.main-nav ul {
  display: flex; /* Ensure it's flex on desktop */
  gap: 25px;
}

.main-nav a {
  color: var(--text-color);
  font-weight: 600;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: var(--primary-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: var(--primary-color);
}

.header-auth-buttons {
  order: 3; /* For desktop */
  display: flex; /* Arrange buttons side-by-side */
  gap: 15px; /* Spacing between buttons */
  margin-left: 25px; /* Spacing between nav and buttons */
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap; /* Prevent button text from wrapping */
}

.btn-register {
  background-color: var(--primary-color);
  color: var(--auxiliary-color);
  border: 1px solid var(--primary-color);
}

.btn-register:hover {
  background-color: var(--link-hover-color);
  border-color: var(--link-hover-color);
}

.btn-login {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-login:hover {
  background-color: var(--primary-color);
  color: var(--auxiliary-color);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1000;
}

.hamburger-menu span {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 6px 0;
  transition: 0.4s;
}

/* Footer Styles */
.site-footer {
  background-color: var(--auxiliary-color);
  color: var(--text-color);
  padding: 3rem 0 1.5rem;
  margin-top: 40px;
}

.site-footer h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

.footer-nav ul li {
  margin-bottom: 0.7rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color);
}

.footer-contact p {
  margin-bottom: 0.7rem;
}

.footer-contact a {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
}

.copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

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

@media (max-width: 768px) {
  .site-header .container {
    flex-wrap: wrap; /* Allow items to wrap */
    justify-content: flex-start; /* Align hamburger to start */
    align-items: center;
    padding-bottom: 1rem; /* Add padding here for bottom content */
  }

  .site-header {
    padding-bottom: 0; /* Remove bottom padding to allow container to define it */
  }

  /* Reorder and style elements for mobile */
  .hamburger-menu {
    display: block; /* Show hamburger */
    order: 1; /* Far left */
    margin-right: auto; /* Push logo to center */
  }

  .site-header .logo {
    order: 2; /* Centered */
    flex-grow: 1; /* Take available space to help centering */
    text-align: center; /* Center the logo text */
    margin: 0; /* Reset desktop margin */
  }

  .header-auth-buttons {
    order: 3; /* Below logo */
    width: 100%; /* Take full width */
    display: flex; /* Arrange buttons side-by-side */
    justify-content: center; /* Center buttons within their full-width container */
    margin-top: 15px; /* Space from logo */
    margin-bottom: 10px; /* Space before nav */
    margin-left: 0; /* Reset desktop margin */
  }

  .main-nav {
    order: 4; /* Below buttons */
    position: absolute;
    /* top: 70px; */ /* Original, adjusted below */
    top: 125px; /* Adjusted based on new header height with logo and buttons */
    left: 0;
    width: 100%;
    background-color: var(--auxiliary-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    display: none; /* Hidden by default */
    flex-direction: column;
    z-index: 999;
    padding-bottom: 15px;
  }

  .main-nav.active {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    padding: 0 15px;
  }

  .main-nav ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav ul li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    display: block;
    padding: 15px;
    width: 100%;
    text-align: center;
  }
  
  .main-nav a::after {
    display: none;
  }

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

  /* Hamburger menu styles are already correct */

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

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

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

  .footer-columns {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

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