/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #2C2C2C;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Variables ===== */
:root {
  --green: #2D5A27;
  --green-dark: #1E3D1A;
  --green-light: #4A7A42;
  --beige: #F5F0E8;
  --gold: #D4A843;
  --gold-dark: #B8922E;
  --white: #FFFFFF;
  --text: #2C2C2C;
  --text-light: #6B6B6B;
  --bg-light: #F9F7F3;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --max-width: 1200px;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background-color 0.25s, transform 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--accent {
  background: var(--gold);
  color: var(--white);
}

.btn--accent:hover {
  background: var(--gold-dark);
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--green-dark);
  color: var(--white);
  height: 72px;
  transition: background 0.3s;
}

.nav--scrolled {
  background: var(--green);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

  .nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
  }

.nav__logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.nav__links a:hover {
  opacity: 1;
}

  .nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    /* ensure the toggle stays visually above the mobile overlay when present */
    position: relative;
    z-index: 1102;
  }

.nav__toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(30, 61, 26, 0.85), rgba(45, 90, 39, 0.7)),
    linear-gradient(135deg, #2D5A27 0%, #1E3D1A 50%, #2D5A27 100%);
  color: var(--white);
  text-align: center;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero h1 {
  font-size: 3.25rem;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero__subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 36px;
  line-height: 1.5;
}

/* ===== Sections ===== */
.section {
  padding: 96px 0;
}

.section--light {
  background: var(--bg-light);
}

.section--dark {
  background: var(--green-dark);
  color: var(--white);
}

.section__title {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section__subtitle {
  font-size: 1.1rem;
  text-align: center;
  color: var(--text-light);
  margin-bottom: 56px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section--dark .section__subtitle {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Services Grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__title {
  font-size: 1.2rem;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.service-card__desc {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
}

/* ===== Before/After Slider ===== */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}
.ba-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ba-slider .ba-before {
  z-index: 1;
}
.ba-slider .ba-after {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}
.ba-slider .ba-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}
.ba-slider .ba-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--gold);
  border: 2px solid var(--white);
  border-radius: 50%;
}
.ba-slider .ba-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--gold);
  border: 2px solid var(--white);
  border-radius: 50%;
}
.ba-slider figcaption {
  margin-top: 12px;
  text-align: center;
  color: var(--white);
  font-style: italic;
  font-size: 0.95rem;
}

.gallery-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 20px;
}

.gallery-pair__image {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-pair__image--before {
  background: linear-gradient(135deg, #667759 0%, #55654a 100%);
}

.gallery-pair__image--after-1 {
  background: linear-gradient(135deg, #4A7A42 0%, #2D5A27 100%);
}

.gallery-pair__image--after-2 {
  background: linear-gradient(135deg, #6B8F5E 0%, #3D6B33 100%);
}

.gallery-pair__image--after-3 {
  background: linear-gradient(135deg, #5A8A4E 0%, #2D5A27 100%);
}

.gallery-pair__label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gallery-pair__caption {
  grid-column: 1 / -1;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-style: italic;
}

/* ===== Reviews ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.review-card__stars {
  color: var(--gold);
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.review-card__text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 16px;
  font-style: italic;
}

.review-card__author {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: normal;
  font-weight: 500;
}

.reviews__cta {
  text-align: center;
}

.reviews__cta p {
  margin-bottom: 20px;
  color: var(--text-light);
  font-size: 1rem;
}

.section--dark .reviews__cta p {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info__item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-info__item svg {
  flex-shrink: 0;
}

.contact-info__item strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-bottom: 2px;
}

.contact-info__item a,
.contact-info__item span {
  font-size: 1.05rem;
}

.contact-info__item a:hover {
  color: var(--gold);
}

/* ===== Contact Form ===== */
.contact-form {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 36px;
}

.contact-form__group {
  margin-bottom: 20px;
}

.contact-form__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  opacity: 0.8;
}

.contact-form__input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.25s;
}

.contact-form__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--gold);
}

.contact-form__input--textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form__input--error {
  border-color: #e74c3c;
}

.contact-form__error {
  display: block;
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 4px;
  min-height: 1.2em;
}

.contact-form__submit {
  width: 100%;
  font-size: 1.05rem;
}

.contact-form__success {
  text-align: center;
  font-size: 1rem;
  color: #7dcea0;
  margin-top: 16px;
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  background: var(--green-dark);
  color: var(--white);
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__brand strong {
  font-size: 1.1rem;
}

.footer__brand p {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 4px;
}

.footer__nav {
  display: flex;
  gap: 24px;
}

.footer__nav a {
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer__nav a:hover {
  opacity: 1;
}

.footer__social {
  font-size: 0.85rem;
  opacity: 0.5;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Center contact info when form is removed */
@media (min-width: 769px) {
  .contact-grid {
    /* single-column layout and center content */
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 64px;
  }

  .nav {
    height: 64px;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--green-dark);
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
    /* move well off-screen when closed to avoid partial overlap */
    transform: translateY(-150%);
    transition: transform 0.3s;
    /* Ensure the mobile nav panel appears above the fixed app bar */
    z-index: 1001;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    /* Keep overlay visually hidden and non-interactive when closed to avoid covering the toggle */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .nav__links--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav__links li {
    text-align: center;
  }

  .nav__links a {
    display: block;
    padding: 14px 24px;
    font-size: 1.05rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1.05rem;
  }

  .section {
    padding: 64px 0;
  }

  .section__title {
    font-size: 1.75rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery-pair {
    grid-template-columns: 1fr;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__nav {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .contact-form {
    padding: 24px;
  }
}

/* ===== App bar mobile improvements (appended) ===== */
/* Minimal, non-destructive overrides to improve touch targets and spacing on small screens. */

@media (max-width: 768px) {
  /* Ensure the nav inner uses the same horizontal padding as the site container so logo/toggle don't touch edges */
  .nav__inner {
    padding: 0 18px; /* slightly less than container to accommodate toggle */
    gap: 12px;
  }

  /* Increase tappable area for the toggle without changing visual size of the bars */
  .nav__toggle {
    padding: 10px; /* larger hit area */
    margin-left: 6px;
    margin-right: -6px;
    border-radius: 6px;
  }

  .nav__toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.18);
  }

  /* Make each nav link at least 44px tall for comfortable touch */
  .nav__links a {
    padding: 12px 20px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
  }

  /* Slightly shrink the logo to avoid wrapping on small widths */
  .nav__logo {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
  }

  /* Keep the nav background consistent when open and avoid overlapping status bar on devices with safe areas */
  .nav__links {
    top: calc(64px + env(safe-area-inset-top));
    padding-top: max(8px, env(safe-area-inset-top));
  }

  /* Make closing/opening feel smoother */
  .nav__links,
  .nav__toggle span {
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
}

/* Prevent background scrolling when mobile nav is open */
html.no-scroll,
body.no-scroll {
  height: 100%;
  overflow: hidden;
}

/* Hamburger -> X animation */
.nav__toggle.nav__toggle--open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle.nav__toggle--open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__toggle.nav__toggle--open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 480px) {
  /* Reduce nav height slightly to preserve vertical space but keep touch targets */
  .nav {
    height: 60px;
  }

  .nav__inner {
    padding: 0 12px;
  }

  .nav__logo {
    font-size: 1rem;
    max-width: 65%;
  }

  /* Make sure menu items remain comfortably tappable on small phones */
  .nav__links a {
    padding: 14px 18px;
    font-size: 1rem;
  }
}
