/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
  padding-top: 72px; /* Compensate for fixed header height (desktop) */
}

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

ul {
  list-style: none;
}

/* Variables */
:root {
  --primary-color: #1A2E44;
  --secondary-color: #E7C200;
  --text-light: #f4f4f4;
  --text-dark: #333;
  --link-hover: #ffda47; /* Lighter shade of secondary for hover */
}

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

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  gap: 20px; /* Added gap for better spacing on desktop */
}

.site-header .logo {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Impact', sans-serif; /* Example unique font */
  transition: color 0.3s ease;
}

.site-header .logo:hover {
  color: var(--link-hover);
}

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

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

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

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

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

.user-actions {
  display: flex; /* Arrange buttons side-by-side */
  gap: 15px; /* Space between buttons */
  align-items: center;
}

.user-actions .btn {
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: 700;
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent buttons from wrapping */
}

.user-actions .btn-register {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--secondary-color);
}

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

.user-actions .btn-login {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.user-actions .btn-login:hover {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

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

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

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 3rem 0 1rem;
  font-size: 0.9rem;
}

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

.footer-col h3 {
  color: var(--secondary-color);
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
}

.footer-col p,
.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul li a {
  color: var(--text-light);
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--link-hover);
}

.footer-about .logo-footer {
  font-size: 2rem;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Impact', sans-serif;
  margin-bottom: 1rem;
  display: block;
}

.footer-contact-info a {
  color: var(--text-light);
  transition: color 0.3s ease;
}

.footer-contact-info a:hover {
  color: var(--link-hover);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  text-align: center;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  body {
    padding-top: 100px; /* Adjust for taller fixed header on mobile */
  }

  .site-header {
    padding: 0.8rem 0;
  }

  .header-container {
    display: grid; /* Use grid for mobile layout */
    grid-template-columns: auto 1fr auto; /* Hamburger | Logo (centered) | (empty) */
    grid-template-rows: auto auto; /* Row 1: Hamburger, Logo; Row 2: Buttons */
    gap: 10px;
    align-items: center;
    padding: 0 15px;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    grid-column: 1 / 2; /* Place in first column */
    grid-row: 1 / 2; /* Place in first row */
    justify-self: start; /* Align to the left */
  }

  .site-header .logo {
    grid-column: 2 / 3; /* Place in second column */
    grid-row: 1 / 2; /* Place in first row */
    justify-self: center; /* Center horizontally */
    font-size: 2rem; /* Adjust logo size for mobile */
  }

  .user-actions {
    display: flex; /* Keep flex for buttons themselves */
    grid-column: 1 / -1; /* Span across all columns */
    grid-row: 2 / 3; /* Place in the second row, below logo */
    justify-content: center; /* Center the buttons horizontally */
    gap: 10px; /* Adjust gap for mobile buttons */
    margin-top: 10px; /* Space below the logo row */
  }

  .user-actions .btn {
    padding: 6px 12px; /* Adjust button padding for mobile */
    font-size: 0.9rem;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 98px; /* Adjust based on new mobile header height (logo row + button row) */
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    padding: 20px 0;
    z-index: 999;
    text-align: center;
  }

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

  .main-nav .nav-list {
    flex-direction: column;
    gap: 15px;
  }

  .main-nav .nav-list a {
    font-size: 1.1rem;
    padding: 10px 0;
    display: block;
  }
  
  .main-nav .nav-list a::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .hamburger-menu {
    display: block;
  }

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

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

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

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

  .footer-col h3 {
    margin-top: 1.5rem;
  }

  .footer-about p {
    max-width: 80%;
    margin: 0 auto 1rem;
  }
}