/* Basic Reset & Body Styling */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 65px; /* Added: Space for fixed header on desktop */
}

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

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Header Styling */
.site-header {
  background-color: #B22222; /* Primary color */
  color: #fff;
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: fixed; /* Modified: Changed from relative to fixed */
  top: 0;          /* Added: Aligns header to the top */
  width: 100%;     /* Added: Ensures header spans full width */
  z-index: 1000;
}

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

.site-header .logo {
  font-size: 2.2em;
  font-weight: bold;
  color: #FFD700; /* Secondary color for logo */
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

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

.main-nav a {
  color: #fff;
  font-weight: 600;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: #FFD700;
  transition: width 0.3s ease;
}

.main-nav a:hover {
  color: #FFD700;
}

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

/* Header Actions (Register/Login Buttons) */
.header-actions {
  display: flex; /* Added: Display buttons in a row */
  gap: 10px;     /* Added: Space between buttons */
  align-items: center;
}

.header-actions .btn {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9em;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.header-actions .btn-register {
  background-color: #FFD700; /* Secondary color */
  color: #B22222; /* Primary color */
  border: 1px solid #FFD700;
}

.header-actions .btn-register:hover {
  background-color: #e6c200;
  color: #B22222;
}

.header-actions .btn-login {
  background-color: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.header-actions .btn-login:hover {
  background-color: #fff;
  color: #B22222;
}

.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1100;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

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

/* Footer Styling */
.site-footer {
  background-color: #333;
  color: #f4f4f4;
  padding: 40px 0 20px;
  font-size: 0.9em;
}

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

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

.footer-logo {
  font-size: 1.8em;
  font-weight: bold;
  color: #FFD700;
  margin-top: 0;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.site-footer h4 {
  color: #FFD700;
  font-size: 1.1em;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.site-footer p {
  margin-bottom: 10px;
}

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

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

.site-footer ul a {
  color: #f4f4f4;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #555;
}

.copyright {
  color: #aaa;
  font-size: 0.85em;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding-top: 125px; /* Modified: Adjusted for taller mobile header (hamburger+logo row + actions row) */
  }

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

  .hamburger-menu {
    display: block;
    grid-column: 1 / 2; /* Modified: Place hamburger in the first column */
    grid-row: 1 / 2;    /* Modified: Place hamburger in the first row */
    justify-self: start; /* Added: Align hamburger to the start of its cell */
  }

  .site-header .logo {
    grid-column: 2 / 3; /* Modified: Place logo in the second (1fr) column */
    grid-row: 1 / 2;    /* Modified: Place logo in the first row */
    text-align: center; /* Added: Center the logo text within its grid cell */
    margin: 0;          /* Added: Reset any default margins that might interfere */
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background-color: #B22222;
    padding-top: 80px;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.4s ease;
    z-index: 999;
    overflow-y: auto;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .main-nav li {
    width: 100%;
    margin-bottom: 15px;
  }

  .main-nav a {
    display: block;
    padding: 10px 0;
    font-size: 1.1em;
  }

  body.nav-open .main-nav {
    right: 0;
  }

  body.nav-open .hamburger-menu span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

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

  body.nav-open .hamburger-menu span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .header-actions {
    grid-column: 1 / -1; /* Modified: Make buttons span full width */
    grid-row: 2 / 3;     /* Modified: Place buttons in the second row */
    display: flex;
    justify-content: center; /* Modified: Center the buttons horizontally */
    gap: 15px;
    margin-top: 10px; /* Added: Space below the logo/top row */
    padding-bottom: 10px; /* Added: Some padding below the buttons */
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-col {
    min-width: unset;
    width: 100%;
    margin-bottom: 20px;
  }

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

@media (min-width: 769px) and (max-width: 1024px) {
  .main-nav ul {
    gap: 15px;
  }
  .site-header .logo {
    font-size: 1.8em;
  }
}