/* Universal Box-Sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Basic Reset */
body, h1, h2, h3, p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  margin: 0;
}
ul, ol {
  padding: 0;
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit; /* Default link color to inherit from parent */
}
img {
  max-width: 100%;
  display: block;
}
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Base Styles */
body {
  font-family: 'Arial', sans-serif;
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* NEW: Add padding-top to body to offset fixed header */
  padding-top: 70px; /* Adjust this value if header height changes */
}

body.no-scroll {
  overflow: hidden;
}

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

a {
  color: #F39C12; /* Secondary color for general links */
}

a:hover {
  color: #E67E22; /* Slightly darker orange on hover */
}

/* Header Styles */
.site-header {
  background-color: #2C3E50; /* Primary color */
  color: #fff;
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  /* NEW: Sticky Header */
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000; /* Ensure it stays on top */
}

.site-header .container {
  display: flex;
  align-items: center; /* Vertically align items */
  /* justify-content: space-between; -- Removed, flex margins will handle distribution */
}

.site-header .logo {
  font-size: 28px;
  font-weight: bold;
  color: #F39C12; /* Secondary color for logo */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  /* NEW: Push subsequent items to the right on desktop */
  margin-right: auto;
}

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

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

.main-nav {
  /* NEW: Space between nav and buttons on desktop */
  margin-right: 25px;
}

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

.main-nav a:hover,
.main-nav a.active {
  color: #F39C12; /* Secondary color on hover/active */
}

/* NEW: Header Action Buttons (Register/Login) */
.header-actions {
  display: flex; /* Arrange buttons side-by-side */
  gap: 10px; /* Space between buttons */
  align-items: center; /* Vertically align buttons */
}

.header-actions .btn {
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-block; /* Ensure padding works */
  white-space: nowrap; /* Prevent button text from wrapping */
}

.btn-register {
  background-color: #F39C12; /* Secondary color */
  color: #fff;
  border: 1px solid #F39C12;
}

.btn-register:hover {
  background-color: #E67E22;
  border-color: #E67E22;
}

.btn-login {
  background-color: transparent;
  color: #F39C12; /* Secondary color */
  border: 1px solid #F39C12;
}

.btn-login:hover {
  background-color: #F39C12;
  color: #fff;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001; /* Above nav */
}

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

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

/* Footer Styles */
.site-footer {
  background-color: #2C3E50; /* Primary color */
  color: #fff;
  padding: 40px 0;
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  justify-content: space-between;
  gap: 30px;
}

.footer-col {
  flex: 1;
  min-width: 250px; /* Minimum width for columns before wrapping */
}

.footer-col h3 {
  color: #F39C12; /* Secondary color for headings */
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 40px;
  height: 2px;
  background-color: #F39C12;
}

.footer-col .logo {
  font-size: 24px;
  font-weight: bold;
  color: #F39C12;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: inline-block;
}

.footer-col .logo:hover {
  color: #fff;
}

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

.footer-col a {
  color: #fff;
  display: block; /* Each link on its own line */
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: #F39C12;
}

.copyright {
  margin-top: 20px;
  color: #bbb;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #F39C12; /* Secondary color */
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  line-height: 50px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: none; /* Hidden by default */
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

.scroll-to-top:hover {
  background-color: #E67E22;
  transform: translateY(-3px);
}

.scroll-to-top.show {
  display: block;
  opacity: 1;
}

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

@media (max-width: 768px) {
  /* NEW: Mobile Header Layout: Hamburger left, Logo center, Buttons below */
  .site-header .container {
    display: grid; /* Use Grid for precise mobile layout */
    grid-template-columns: auto 1fr auto; /* Hamburger | Logo (flexible) | Empty space */
    grid-template-rows: auto auto; /* Top row, then buttons row */
    grid-template-areas:
      "hamburger logo ."
      "actions actions actions";
    align-items: center;
    gap: 10px 0; /* Row gap, no column gap for top row */
    padding: 0 15px; /* Adjust container padding for mobile */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    grid-area: hamburger; /* Place in grid */
    margin-right: 0; /* Reset any desktop margins */
  }

  .site-header .logo {
    grid-area: logo; /* Place in grid */
    text-align: center; /* Center logo text */
    margin: 0; /* Reset desktop margins */
  }

  .main-nav {
    display: none; /* Hide desktop nav by default on mobile */
    grid-area: nav; /* Placeholder, not visible in this grid layout */
    position: absolute; /* Revert to absolute for slide-in menu */
    top: 70px; /* Below header */
    left: 0;
    width: 100%;
    background-color: #2C3E50;
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    z-index: 1000;
  }

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

  .main-nav ul {
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
  }

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

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

  /* NEW: Mobile Header Actions */
  .header-actions {
    grid-area: actions; /* Place in grid, full width */
    display: flex; /* Ensure buttons are flex inside actions */
    justify-content: center; /* Center buttons within the actions div */
    width: 100%; /* Take full width of its grid area */
    margin: 0; /* Reset desktop margins */
    gap: 10px; /* Space between buttons */
  }

  /* Hamburger 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 .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-col {
    min-width: unset; /* Remove min-width for full width */
    width: 100%;
    margin-bottom: 30px; /* Add spacing between stacked columns */
  }

  .footer-col h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

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

@media (max-width: 480px) {
  .site-header .logo {
    font-size: 24px;
  }
  /* NEW: Smaller buttons on very small screens */
  .header-actions .btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}