/* GALAREN — mobile + performance */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 767px) {
  .hero-bg {
    background-attachment: scroll !important;
  }
}

html, body {
  overflow-x: clip;
  max-width: 100%;
}

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Touch-friendly targets */
a, button, [role="button"], input, select, textarea, label {
  touch-action: manipulation;
}

.nav-link,
.mobile-menu-link,
footer a,
.btn-hover {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.mobile-menu-link {
  display: flex;
  width: 100%;
}

/* Header & hamburger (shared — all pages) */
#header {
  position: sticky;
  top: 0;
  z-index: 50;
}

#header .container {
  position: relative;
}

.hamburger {
  cursor: pointer;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}

.hamburger-top,
.hamburger-middle,
.hamburger-bottom {
  position: absolute;
  left: 50%;
  width: 1.5rem;
  height: 2px;
  margin-left: -0.75rem;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease, bottom 0.3s ease;
  pointer-events: none;
}

.hamburger-top {
  top: calc(50% - 8px);
}

.hamburger-middle {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-bottom {
  bottom: calc(50% - 8px);
}

.hamburger.open .hamburger-top {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.open .hamburger-middle {
  opacity: 0;
}

.hamburger.open .hamburger-bottom {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #00bf63;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile drawer menu */
@media (max-width: 767px) {
  #header .container > nav[aria-label="Main navigation"] {
    display: none !important;
  }

  .hamburger {
    display: flex;
    z-index: 55;
  }

  body.menu-open .hamburger {
    opacity: 0;
    pointer-events: none;
  }

  .menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 52;
    background: rgba(3, 17, 13, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(20rem, 92vw);
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 54;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1a2e28 0%, #263238 40%, #1e2a26 100%);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.42s;
    overflow: hidden;
  }

  .mobile-menu.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 1rem 1.25rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    border-bottom: 1px solid rgba(0, 191, 99, 0.2);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.15);
  }

  .mobile-menu-logo img {
    height: 2.25rem;
    width: auto;
    display: block;
  }

  .menu-close-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .menu-close-btn:hover,
  .menu-close-btn:focus-visible {
    background: rgba(0, 191, 99, 0.25);
    border-color: #00bf63;
    outline: none;
  }

  .menu-close-btn:active {
    transform: scale(0.92);
  }

  .mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 0.75rem max(1.25rem, env(safe-area-inset-bottom));
  }

  .mobile-menu-label {
    margin: 0.75rem 0 0.25rem;
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(0, 191, 99, 0.85);
    opacity: 0;
    transform: translateX(1.25rem);
    transition: opacity 0.35s ease, transform 0.35s ease;
    transition-delay: calc(var(--i, 0) * 0.045s + 0.12s);
  }

  .mobile-menu.is-open .mobile-menu-label {
    opacity: 1;
    transform: translateX(0);
  }

  .mobile-menu-link {
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.2rem;
    border-radius: 0.625rem;
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    opacity: 0;
    transform: translateX(1.25rem);
    transition:
      opacity 0.35s ease,
      transform 0.35s ease,
      background 0.2s ease,
      color 0.2s ease;
    transition-delay: calc(var(--i, 0) * 0.045s + 0.12s);
  }

  .mobile-menu.is-open .mobile-menu-link {
    opacity: 1;
    transform: translateX(0);
  }

  .mobile-menu-link i {
    width: 1.35rem;
    text-align: center;
    font-size: 1.05rem;
    color: #00bf63;
    flex-shrink: 0;
    transition: transform 0.2s ease;
  }

  .mobile-menu-link:active {
    background: rgba(255, 255, 255, 0.06);
  }

  .mobile-menu-link:hover,
  .mobile-menu-link:focus-visible {
    background: rgba(0, 191, 99, 0.12);
    color: #42f5b3;
    outline: none;
  }

  .mobile-menu-link-sub {
    padding-left: 1.35rem;
    font-size: 0.95rem;
  }

  .mobile-menu-link-sub i {
    font-size: 0.95rem;
  }

  .mobile-menu-link-cta {
    margin-top: 0.5rem;
    background: rgba(0, 191, 99, 0.15);
    border: 1px solid rgba(0, 191, 99, 0.35);
  }

  .mobile-menu-link-cta i {
    color: #42f5b3;
  }

  body.menu-open {
    overflow: hidden;
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .menu-overlay,
    .mobile-menu-link,
    .mobile-menu-label {
      transition-duration: 0.01ms !important;
      transition-delay: 0ms !important;
    }
  }

  .container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  h1 {
    font-size: clamp(1.75rem, 7vw, 3.75rem) !important;
    line-height: 1.15 !important;
  }

  h2 {
    font-size: clamp(1.5rem, 5.5vw, 2.25rem) !important;
  }

  .hero-bg {
    padding-top: 4.5rem !important;
    padding-bottom: 4.5rem !important;
  }

  iframe {
    max-width: 100%;
  }

  .map-container,
  .h-64 iframe {
    min-height: 220px;
    height: min(50vh, 320px) !important;
  }

  .grid.md\:grid-cols-2,
  .grid.md\:grid-cols-3,
  .grid.md\:grid-cols-4,
  .grid.lg\:grid-cols-3 {
    gap: 1rem;
  }

  .flex.flex-col.md\:flex-row {
    gap: 0.75rem;
  }

  .btn-hover {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  footer .grid {
    gap: 2rem;
  }

  form.flex {
    flex-direction: column;
  }

  form.flex input {
    border-radius: 0.5rem !important;
    margin-bottom: 0.5rem;
  }

  form.flex button {
    border-radius: 0.5rem !important;
    width: 100%;
    min-height: 44px;
  }
}

/* Header compact on scroll */
#header.header-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

#header.header-scrolled .container {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Footer center fix */
footer .border-t .flex {
  justify-content: center !important;
  text-align: center !important;
}

footer .border-t p {
  width: 100% !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Map container */
.map-container {
  height: min(50vh, 320px);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #e5e7eb;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Content visibility for below-fold sections */
section:not(:first-of-type) {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* SEO breadcrumbs */
.seo-breadcrumb {
  background: #f8faf9;
  border-bottom: 1px solid #e5e7eb;
}

.seo-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.seo-breadcrumb li {
  display: inline-flex;
  align-items: center;
}

/* Social icons */
.social-links a {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}
