:root {
  --primary-color: #0A2463;
  --accent-color: #FFD700;
  --text-color: #333;
  --light-text-color: #f0f0f0;
  --bg-dark: #1a1a1a;
  --bg-light: #ffffff;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-light);
}

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

/* Header Styling */
.site-header {
  background-color: var(--primary-color);
  color: var(--light-text-color);
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

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

/* New: Wrapper for main nav and action buttons on desktop */
.site-header .header-right {
  display: flex;
  align-items: center;
  gap: 30px; /* Space between nav and header-actions */
}

/* New: Container for register/login buttons */
.site-header .header-actions {
  display: flex; /* To arrange buttons side-by-side */
  align-items: center;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
}

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

.btn-register:hover {
  background-color: #e6c200; /* Slightly darker gold */
  border-color: #e6c200;
  color: var(--primary-color);
}

.btn-login {
  background-color: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  margin-left: 15px;
}

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

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

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

.main-nav a {
  color: var(--light-text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  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(--accent-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(--accent-color);
}

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

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--light-text-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Footer Styling */
.site-footer {
  background-color: var(--bg-dark);
  color: var(--light-text-color);
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-col h3 {
  color: var(--accent-color);
  font-size: 18px;
  margin-bottom: 15px;
}

.site-footer .footer-col p,
.site-footer .footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer .footer-col a {
  color: var(--light-text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.site-footer .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 10px;
}

.site-footer .about-us-col p {
  line-height: 1.8;
}

.site-footer .contact-info-col p {
  margin-bottom: 8px;
}

.site-footer .copyright {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* Scroll to Top Button */
#scrollToTopBtn {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  line-height: 50px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#scrollToTopBtn:hover {
  background-color: #e6c200; /* Slightly darker gold */
  transform: translateY(-3px);
}


/* Responsive Design */
@media (max-width: 992px) {
  .site-header .logo {
    font-size: 24px;
  }
  .main-nav li {
    margin-left: 20px;
  }
}

@media (max-width: 768px) {
  .site-header .container {
    /* Override desktop flexbox with grid for mobile */
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Hamburger (left), Logo (center), empty space (right) */
    grid-template-rows: auto auto; /* First row for hamburger/logo, second for buttons */
    gap: 15px 0; /* Vertical gap between rows, no horizontal gap within rows */
    padding: 0 15px; /* Keep existing padding */
    align-items: center; /* Vertically center items in their grid cells */
    justify-content: unset; /* Reset justify-content for grid */
  }

  /* Hamburger menu position */
  .hamburger-menu {
    grid-column: 1 / 2; /* Place hamburger in the first column */
    grid-row: 1 / 2; /* First row */
    justify-self: start; /* Align to the start (left) */
    display: block; /* Show hamburger on mobile */
    margin: 0; /* Reset any potential margins */
    padding: 10px; /* Keep its original padding for touch area */
  }

  /* Logo position */
  .site-header .logo {
    grid-column: 2 / 3; /* Place logo in the second (middle) column */
    grid-row: 1 / 2; /* First row */
    justify-self: center; /* Center horizontally */
    margin: 0; /* Override any auto margins */
    font-size: 24px;
  }

  /* REPAIR: Place header-right in the grid, manage its children visibility */
  .site-header .header-right {
    grid-column: 1 / -1; /* Span across all columns */
    grid-row: 2 / 3; /* Place in the second row */
    display: flex; /* Make it a flex container for its children */
    justify-content: center; /* Center its content (header-actions) */
    align-items: center; /* Vertically center content */
    margin-top: 0; /* Reset any desktop margins */
    gap: 0; /* Reset desktop gap */
  }

  /* REPAIR: Hide main navigation by default on mobile */
  .site-header .header-right .main-nav {
    display: none; /* Hidden by default on mobile */
    position: absolute;
    top: 100%; /* MODIFIED: Position below the site-header */
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    z-index: 999;
    transition: transform 0.3s ease-in-out;
    transform: translateY(-100%); /* Start off-screen */
  }

  /* FIX: Increase specificity to ensure active state overrides default hidden state */
  .site-header .header-right .main-nav.active {
    display: flex; /* Override display: none when active */
    flex-direction: column;
    transform: translateY(0);
  }

  .main-nav ul {
    flex-direction: column;
    text-align: center;
  }

  .main-nav li {
    margin: 10px 0;
  }

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

  /* REPAIR: header-actions is now correctly managed by its parent header-right */
  .site-header .header-actions {
    display: flex; /* Ensure buttons are side-by-side */
    justify-content: center; /* Center buttons within header-right */
    /* No need for grid-column/row here, as its parent header-right is in the grid */
  }

  .site-header .header-actions .btn-login {
    margin-left: 15px; /* Keep spacing between buttons */
  }

  /* Hamburger menu animation */
  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr; /* Single column layout for footer */
    text-align: center;
  }

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

  .site-footer .footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-footer .footer-nav li {
    margin: 5px 10px;
  }

  .site-footer .footer-col h3 {
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .site-header .logo {
    font-size: 22px;
  }
  .site-footer .footer-logo {
    font-size: 20px;
  }
  #scrollToTopBtn {
    width: 40px;
    height: 40px;
    font-size: 20px;
    line-height: 40px;
    bottom: 20px;
    right: 20px;
  }
}