:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --dark-bg-color: #212529;
  --light-text-color: #ffffff;
  --dark-text-color: #333333;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-top-height-mobile: 50px;
  --mobile-buttons-height-mobile: 50px;
}

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

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--dark-text-color);
  padding-top: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop content padding */
}

/* Site Header - Fixed and Floating */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background-color: var(--dark-bg-color); /* Fallback, but header-top and main-nav have specific colors */
}

/* Header Top Area (Desktop) */
.header-top {
  background-color: var(--dark-bg-color);
  width: 100%;
  min-height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  padding: 5px 0;
  display: block; /* Ensure logo is always visible */
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

/* Main Navigation Area (Desktop) */
.main-nav {
  background-color: var(--primary-color);
  width: 100%;
  min-height: var(--main-nav-height-desktop);
  display: flex; /* Desktop default: visible */
  position: static; /* Desktop default: normal flow */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop default: horizontal */
  justify-content: center;
  align-items: center;
  padding: 10px 30px;
}

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

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

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

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

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

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

/* Mobile Buttons Area */
.mobile-buttons-area {
  display: none; /* Hidden by default on desktop */
  width: 100%;
  background-color: var(--dark-bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-height: var(--mobile-buttons-height-mobile);
  padding-bottom: 5px; /* Adjust for visual spacing */
}

.mobile-buttons-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 15px;
  width: 100%;
  max-width: none; /* Ensure it takes full width on mobile */
  margin: 0 auto;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  backdrop-filter: blur(2px); /* Optional blur effect */
}

.mobile-menu-overlay.active {
  display: block;
}

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

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--dark-bg-color);
}

.btn-primary:hover {
  background-color: #e0a800;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--primary-color);
  color: var(--light-text-color);
}

.btn-secondary:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.btn-download {
  background-color: #28a745;
  color: var(--light-text-color);
}

.btn-download:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

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

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

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

.footer-col h3 {
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-size: 18px;
}

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

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

.footer-nav a {
  color: var(--light-text-color);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

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

  .header-container {
    padding: 5px 15px;
    width: 100%;
    max-width: none;
  }

  .hamburger-menu {
    display: block;
    order: 0; /* Place hamburger first */
  }

  .logo {
    flex: 1;
    text-align: center;
    font-size: 24px;
    order: 1; /* Place logo second, centered */
  }

  .desktop-nav-buttons {
    display: none;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed; /* Fixed position for mobile menu */
    top: 0;
    left: 0;
    width: 70%; /* Slide-in menu width */
    height: 100%;
    background-color: var(--dark-bg-color);
    overflow-y: auto;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    padding-top: calc(var(--header-top-height-mobile) + var(--mobile-buttons-height-mobile) + 20px); /* Adjust for header height */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }

  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide in */
  }

  .nav-container {
    flex-direction: column;
    padding: 20px 15px;
    width: 100%;
    max-width: none;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-buttons-area {
    display: block; /* Visible on mobile */
  }

  .footer-container {
    flex-direction: column;
    padding: 0 15px;
  }

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

  .footer-bottom {
    padding-top: 20px;
    margin-top: 20px;
  }

  body.no-scroll {
    overflow: hidden;
  }
}