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

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
}

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

ul {
  list-style: none;
}

/* Header Styles */
.site-header {
  background-color: #0A192F;
  color: #fff;
  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;
}

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

.site-header .logo {
  font-size: 2.2rem;
  font-weight: bold;
  color: #FFD700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

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

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

.site-header .main-nav ul {
  display: flex;
}

.site-header .main-nav li {
  margin-left: 2rem;
}

.site-header .main-nav a {
  color: #fff;
  font-weight: 600;
  padding: 0.5rem 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

.site-header .main-nav a:hover,
.site-header .main-nav a.active {
  color: #FFD700;
  border-bottom: 2px solid #FFD700;
}

.site-header .header-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: 2rem; /* Space between nav and buttons */
}

.site-header .header-buttons .btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
}

.site-header .header-buttons .btn-register {
  background-color: #FFD700;
  color: #0A192F;
  border: 2px solid #FFD700;
}

.site-header .header-buttons .btn-register:hover {
  background-color: #e6c200;
  color: #0A192F;
}

.site-header .header-buttons .btn-login {
  background-color: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.site-header .header-buttons .btn-login:hover {
  background-color: #FFD700;
  color: #0A192F;
}

.site-header .hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  z-index: 1000;
}

.site-header .hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: #FFD700;
  transition: all 0.3s ease-in-out;
}

/* Footer Styles */
.site-footer {
  background-color: #0A192F;
  color: #fff;
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer .footer-column {
  flex: 1;
  min-width: 250px;
}

.site-footer .footer-column h3 {
  color: #FFD700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.site-footer .footer-column p,
.site-footer .footer-column li {
  margin-bottom: 0.5rem;
}

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

.site-footer .footer-column a:hover {
  color: #FFD700;
}

.site-footer .footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1rem 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer .copyright {
  color: rgba(255, 255, 255, 0.7);
}

.back-to-top-btn {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #FFD700;
  color: #0A192F;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.5rem;
  line-height: 45px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-to-top-btn:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .site-header .header-container {
    padding: 0 1rem;
    display: grid; /* Use grid for mobile layout */
    grid-template-columns: auto 1fr auto; /* Hamburger | Logo | (empty space) */
    grid-template-rows: auto auto; /* Row 1: hamburger+logo, Row 2: buttons */
    align-items: center;
    gap: 1rem 0; /* Vertical gap 1rem, horizontal gap 0 */
    position: relative; /* Positioning context for absolute nav */
  }

  .site-header .logo {
    font-size: 1.8rem;
    grid-column: 2 / 3; /* Place in second column */
    grid-row: 1 / 2; /* Place in first row */
    justify-self: center; /* Center the logo horizontally */
    margin: 0; /* Remove desktop auto margins */
  }

  .site-header .main-nav {
    display: none; /* Hide main nav by default on mobile */
    margin-left: 0; /* Remove desktop auto margin */
    grid-column: 1 / -1; /* Span all columns when active (though absolute pos will override) */
    grid-row: 3 / 4; /* Place it below buttons, but absolute pos makes this less relevant */
  }

  .site-header .main-nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; /* Relative to header-container */
    left: 0;
    width: 100%;
    background-color: #0A192F;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
  }

  .site-header .main-nav ul {
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
  }

  .site-header .main-nav li {
    margin: 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .site-header .main-nav a {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
  }

  .site-header .header-buttons {
    display: flex; /* Ensure buttons are visible and flex */
    justify-content: center; /* Center buttons horizontally */
    grid-column: 1 / -1; /* Span all columns */
    grid-row: 2 / 3; /* Place in the second row */
    padding-top: 0.5rem; /* Space from logo above */
    margin-left: 0; /* Remove desktop margin */
  }

  .site-header .hamburger-menu {
    display: block;
    grid-column: 1 / 2; /* First column */
    grid-row: 1 / 2; /* First row */
    justify-self: start; /* Align to start of cell (left) */
    margin: 0; /* Remove any default margins */
  }

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

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

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

  .site-footer .footer-container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .site-footer .footer-column {
    min-width: unset;
    width: 100%;
    text-align: center;
  }
  
  .site-footer .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }

  .site-footer .back-to-top-btn {
    position: static;
    margin-top: 1rem;
  }
}

@media (max-width: 480px) {
  .site-header .logo {
    font-size: 1.6rem;
  }
}