:root {
  --primary-color: #4A2780;
  --secondary-color: #FFD700;
  --text-color-light: #f0f0f0;
  --text-color-dark: #333;
  --button-hover-darken: #e6c200;
  --button-glow-color: rgba(255, 215, 0, 0.7);
  --header-height-desktop: 80px;
  --header-height-mobile-top: 60px;
  --header-height-mobile-buttons: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  padding-top: var(--header-height-desktop); /* Adjust for fixed header on desktop */
}

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: var(--header-height-desktop);
  background-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  color: var(--text-color-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.header-content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  min-height: var(--header-height-desktop);
}

.logo {
  font-family: 'Arial Black', sans-serif;
  font-size: 2.2em;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  padding: 5px 0;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 30px; /* Space between logo and nav on desktop */
}

.main-nav {
  flex-grow: 1;
  text-align: center;
}

.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.nav-list li {
  margin: 0 15px;
}

.nav-link {
  color: var(--text-color-light);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
}

.header-desktop-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-register {
  background: linear-gradient(45deg, #FF6B6B, #FFD700);
  color: var(--primary-color);
  box-shadow: 0 0 15px var(--button-glow-color);
}

.btn-register:hover {
  background: linear-gradient(45deg, #FFD700, #FF6B6B);
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--button-glow-color), 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-download {
  background: linear-gradient(45deg, #00BFFF, #1E90FF);
  color: var(--text-color-light);
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

.btn-download:hover {
  background: linear-gradient(45deg, #1E90FF, #00BFFF);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.7), 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Higher than mobile-header-buttons */
}

.hamburger-menu .line {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 6px 0;
  transition: all 0.3s ease;
}

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

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

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

.header-filler-right, .mobile-header-buttons {
  display: none; /* Hidden by default on desktop */
}

/* --- Site Footer --- */
.site-footer {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  padding: 40px 20px 20px;
  font-size: 0.9em;
}

.footer-content-wrapper {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto 30px;
  gap: 30px;
}

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

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

.footer-logo {
  font-family: 'Arial Black', sans-serif;
  font-size: 2em;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

.footer-nav {
  list-style: none;
}

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

.footer-nav a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--secondary-color);
}

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

.footer-bottom p {
  color: #aaa;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  body {
    padding-top: calc(var(--header-height-mobile-top) + var(--header-height-mobile-buttons));
  }

  .site-header {
    flex-direction: column; /* Stack top area and buttons area */
    min-height: auto;
  }

  .header-content-wrapper { /* This is the mobile top area: [Hamburger] [Logo (centered)] [Filler] */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    min-height: var(--header-height-mobile-top);
    width: 100%;
  }

  .hamburger-menu {
    display: block;
    order: 1;
    flex-shrink: 0;
  }

  .logo {
    order: 2;
    flex-grow: 1; /* Allow logo to take central space */
    text-align: center; /* Center the logo text */
    font-size: 1.8em;
    margin: 0; /* Reset desktop margin */
  }

  .header-filler-right {
    display: block;
    order: 3;
    width: 50px; /* Approximate width of hamburger for centering effect */
    flex-shrink: 0;
  }

  .main-nav,
  .header-desktop-buttons {
    display: none; /* Hidden on mobile */
  }

  .main-nav { /* This is the menu that expands */
    position: absolute;
    top: var(--header-height-mobile-top); /* Below the top header section */
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    flex-direction: column;
    height: 0; /* Hidden by default */
    overflow: hidden;
    transition: height 0.3s ease-in-out;
    z-index: 1001; /* Higher than mobile-header-buttons */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .main-nav.nav-open {
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
  }

  .nav-list li {
    margin: 10px 0;
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 12px 0;
    font-size: 1.1em;
    border-bottom: none;
  }

  .nav-link:hover,
  .nav-link.active {
    border-bottom: none;
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--secondary-color);
  }

  .mobile-header-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 15px;
    background-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Lower than hamburger menu and expanded main-nav */
    min-height: var(--header-height-mobile-buttons);
  }

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

  .footer-col {
    min-width: unset;
    width: 100%;
    max-width: 300px;
  }

  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.6em;
  }
  .btn {
    padding: 8px 15px;
    font-size: 0.9em;
  }
  .mobile-header-buttons {
    flex-wrap: wrap;
  }
}