a {
  text-decoration: none;
  color: var(--official-green);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary);
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--background);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  width: 100%;
  overflow-x: hidden;
}

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

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

.logo .agency-name {
  font-size: 1.5rem;
  font-weight: bold;
}

.logo .primary {
  color: var(--official-green);
}

.logo .secondary {
  color: var(--official-brown);
}

/* Desktop menu */
.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.35rem 0.25rem;
  transition: color 0.25s ease, transform 0.2s ease;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background-color: var(--official-green);
}

.nav-links a:hover {
  color: var(--official-brown);
  transform: scale(1.06);
}

.nav-links:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.button-hero {
  background-color: var(--official-green);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background 0.3s ease;
}

.button-hero:hover {
  background-color: var(--official-green);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  align-items: stretch;
  justify-content: flex-start;
  height: 100vh;
  width: 100vw;
}

.mobile-menu__panel {
  background: #fff;
  width: min(86vw, 360px);
  max-width: 420px;
  height: 100%;
  min-height: 100vh;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 6px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(-100%);
  animation: slideIn 0.25s ease forwards;
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.mobile-menu__title {
  font-weight: 700;
  font-size: 1.1rem;
}

.mobile-menu__close {
  background: none;
  border: none;
  padding: 0.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mobile-menu__close:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: scale(1.06);
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu__links a {
  font-size: 1.05rem;
  padding: 0.85rem 0.75rem;
  border-radius: 10px;
  color: var(--main-font-color);
  background: #f8f8f8;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.mobile-menu__links a.active {
  background: rgba(103, 157, 67, 0.12);
  border: 1px solid rgba(103, 157, 67, 0.28);
  color: var(--official-green);
  font-weight: 600;
}

.mobile-menu__links a:hover {
  background: rgba(115, 85, 59, 0.12);
  color: var(--official-brown);
  transform: translateX(4px);
}

.mobile-menu__cta {
  margin-top: auto;
  width: 100%;
  text-align: center;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }
}

@media (max-width: 767px) {
  .nav-inner {
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
  }

  .logo {
    min-width: 0;
    flex-shrink: 1;
    max-width: calc(100% - 60px);
  }

  .logo .agency-name {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo img {
    height: 32px;
  }

  .mobile-menu-btn {
    display: flex;
    flex-shrink: 0;
    padding: 0.5rem;
    font-size: 1.5rem;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Avoid content sitting under the fixed nav bar on small screens */
  body {
    padding-top: 80px;
  }

  .nav-links a.active::after {
    color: white !important;
    background-color: var(--official-green);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}
