/* ==========================================================================
   Navbar Styles (Dark Green Premium Theme)
   ========================================================================== */

.af-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--primary-color);
  /* Deep green background */
  box-shadow: var(--shadow-md);
  /* Optional: Glassmorphism effect */
  background-color: var(--primary-color);
  backdrop-filter: blur(8px);
}

.af-navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 var(--spacing-md);
}

/* Brand / Logo */
.af-navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.af-brand-text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--surface-color);
  /* White text against dark green */
  letter-spacing: 0.05em;
}

/* Desktop Navigation Links */
.af-navbar-links {
  display: none;
  align-items: center;
  gap: var(--spacing-lg);
}

.af-nav-link {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--surface-color);
  /* White text */
  text-decoration: none;
  transition: all var(--transition-fast);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  /* Pill shape for hover */
}

.af-nav-link:hover {
  /* Soft light green background on hover */
  background-color: rgba(208, 232, 181, 0.15);
  color: var(--secondary-color);
  /* #d0e8b5 */
}

.af-nav-link.active {
  color: var(--accent-color);
  font-weight: 600;
}

/* Actions & Mobile Button */
.af-navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* OVERRIDE: Make the Primary Button pop on the dark green background */
.af-navbar .af-btn-primary {
  background-color: var(--secondary-color);
  /* Light Green */
  color: var(--primary-color-dark);
  /* Dark Green text for contrast */
}

.af-navbar .af-btn-primary:hover {
  background-color: var(--surface-color);
  /* Turns white on hover */
  color: var(--primary-color-dark);
}

.af-mobile-menu-btn {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--surface-color);
  /* White icon */
  cursor: pointer;
  padding: var(--spacing-sm);
  transition: color var(--transition-fast);
}

.af-mobile-menu-btn:hover {
  color: var(--secondary-color);
}

/* Responsive Overrides */
.af-desktop-only {
  display: none !important;
}

@media (min-width: 1024px) {
  .af-navbar-links {
    display: flex;
  }

  .af-mobile-only {
    display: none !important;
  }

  .af-desktop-only {
    display: inline-flex !important;
  }
}

/* ==========================================================================
   Mobile Menu Overlay Styles
   ========================================================================== */

.af-brand-wrapper {
  display: flex;
  align-items: center;
}

.af-mobile-menu-overlay {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 80px);

  /* Solid premium dark green prevents background elements from ruining readability */
  background-color: rgba(1, 40, 22, 0.98);

  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 3rem 1.5rem;

  /* Allows scrolling if the screen is too short, preventing items from overlapping */
  overflow-y: auto;

  animation: slideDown 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.af-mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  /* Increased gap to comfortably separate items */
  align-items: center;
  text-align: center;
  width: 100%;
  margin-bottom: 3rem;
  /* Extra padding at the bottom */
}

.af-mobile-link-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.af-mobile-link {
  font-family: var(--font-heading);
  font-size: 2rem;
  /* Adjusted for better proportion */
  color: var(--surface-color);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 1px;
  transition: color var(--transition-fast);
  display: block;
}

.af-mobile-link:hover,
.af-mobile-link:active {
  color: var(--secondary-color);
}

.af-mobile-link.active {
  color: var(--accent-color);
}

/* Specific styling for the primary button inside the mobile menu */
.af-mobile-nav-action {
  width: 100%;
  max-width: 280px;
  margin-top: 1rem;
  /* Separate the button slightly more from the links */
  display: flex;
  justify-content: center;
}

.af-mobile-contact-btn {
  width: 100%;
  padding: 1rem 0;
  font-size: 1.15rem;
  background-color: var(--secondary-color);
  color: var(--primary-color-dark);
}

/* Brand / Logo */
.af-navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
  max-width: 360px;
  flex-shrink: 1;
}

.af-navbar-brand img {
  display: block;
  height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Keep wrapper from stretching badly */
.af-brand-wrapper {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
}

/* Optional: tighter logo sizing on smaller screens */
@media (max-width: 1023px) {
  .af-navbar-container {
    height: 72px;
  }

  .af-mobile-menu-overlay {
    top: 72px;
    height: calc(100vh - 72px);
  }

  .af-navbar-brand {
    max-width: 240px;
  }

  .af-navbar-brand img {
    height: 44px;
  }
}

.af-navbar-logo {
  display: block;
  height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}