/* ── HOME.CSS ── */
/* Homepage-specific styles for index.html only. */
/* Shared styles (nav, footer, buttons, typography) live in style.css. */
/* home.css loads after style.css so any overrides here take precedence. */
/* Fonts (Playfair Display + DM Sans) are loaded via Google Fonts in index.html's <head>. */

/* Section padding matches service pages */
section { padding: 80px 5%; }
/* Offset anchor scroll so fixed navbar doesn't overlap section headings */
#services, #gallery, #why { scroll-margin-top: 72px; }

/* ── HERO ── */
/* Full-screen hero section on the homepage. */
/* .hero-bg is a subtle radial gradient overlay behind the content. */
/* .hero-content contains the badge, h1, sub-text, CTA buttons and trust badges. */
/* fadeUp animation runs once on page load via keyframe defined below. */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  gap: 3rem;
  position: relative;
  overflow: hidden;
  padding: 100px 5% 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 70% 50%, rgba(42,98,41,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 20% 80%, rgba(90,171,89,0.06) 0%, transparent 60%);
}

/* Hero text content — max 640px wide to leave room for the tree image on desktop */
.hero-content {
  position: relative;
  max-width: 640px;
  animation: fadeUp 0.9s ease both;
}

/* Intro paragraph below the h1 */
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 520px;
}

/* Trust badges row — "Fully Insured", "5-Star Google Reviews", "Local & Reliable" */
.hero-trust {
  margin-top: 3.5rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-mid);
}
/* Circular icon container for each trust badge */
.trust-icon {
  width: 32px;
  height: 32px;
  background: rgba(42,98,41,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* ── HERO PHOTO ── */
/* In-flow flex item (order: 1) so it sits to the right of hero-content. */
/* flex: 1 fills all remaining space after the text — grows naturally on wide screens. */
/* Uses the hero's own padding for edge spacing, so it never hugs the right edge. */
/* Hidden on tablet (≤1024px) — see tablet breakpoint below. */
.hero-tree {
  order: 1;
  flex: 1;
  min-width: 300px;
  animation: fadeIn 1.2s ease both 0.3s;
  pointer-events: none;
}
.hero-tree img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

/* ── SERVICES ── */
/* Dark green services showcase section on the homepage. */
/* Different from the service page "Services Included" section — richer cards with hover animation. */
#services {
  background: var(--green-dark);
  color: var(--white);
}
#services .section-label { color: var(--green-light); }
#services h2 { color: var(--white); }

/* Intro row above the cards — heading left, description text right */
.services-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}
.services-intro p {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  max-width: 400px;
}

/* Homepage service cards — more detailed than service page cards (flex column, hover transform) */
.service-card {
  flex: 1 1 260px;
  max-width: 400px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2.4rem 2rem 2rem;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}
.service-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

/* Photo at the top of each service card — bleeds to card edges via negative margins */
/* overflow: hidden on .service-card clips it cleanly */
.service-card-img {
  display: block;
  width: calc(100% + 4rem);
  margin: -2.4rem -2rem 1.2rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.service-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--white);
}
.service-card p {
  font-size: 0.94rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.7;
  font-weight: 300;
  /* margin-bottom: auto pushes the button to the bottom of the card */
  margin-bottom: auto;
}
.service-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.25rem;
}
/* Pill-shaped "View Service" link button at the bottom of each card */
.service-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.72rem 1.05rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.service-link:hover {
  background: var(--white);
  color: var(--green-dark);
  transform: translateY(-1px);
}

/* ── GALLERY ── */
/* 4-column photo grid showing recent work. Drops to 2 columns on mobile. */
#gallery { background: var(--cream-dark); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
/* Portrait aspect ratio (3:4) for all gallery items */
.gallery-item {
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 3 / 4;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
/* Subtle zoom on hover */
.gallery-item:hover img { transform: scale(1.04); }
/* Small uppercase caption below each photo */
.gallery-caption {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-top: 0.6rem;
  text-align: center;
}

/* ── WHY US ── */
/* Right column shows the Shapo Google Reviews widget instead of a photo on the homepage. */
/* Gap and margin match service pages — both inherited from style.css. */

/* Container for the Shapo reviews embed */
.why-visual {
  position: relative;
  width: 100%;
  overflow-x: hidden;
}
/* Shapo Google Reviews widget — loaded via external script in index.html */
#shapo-widget-6b9aa6aa864f4af4827e {
  width: 100%;
  max-width: 100%;
}

/* ── ANIMATIONS ── */
/* fadeUp — used by .hero-content to slide up on page load */
/* fadeIn — used by .hero-tree to fade in with a slight delay */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── TABLET (max-width: 1024px) ── */
/* Hero tree hidden on tablets — not enough horizontal space alongside the text. */
/* Hero switches from full-screen (100vh) to auto height, top-aligned. */
@media (max-width: 1024px) {
  .hero-tree { display: none; }
  #hero {
    min-height: auto;
    align-items: flex-start;
    padding-top: 120px;
    padding-bottom: 80px;
  }
}

/* ── MOBILE (max-width: 768px) ── */
@media (max-width: 768px) {
  /* Trust badges wrap tighter */
  .hero-trust { gap: 1rem; }
  /* Service cards stack with more gap */
  .services-grid { gap: 1rem; }
  /* Reduce card padding on small screens */
  .service-card { padding: 1.6rem 1.35rem 1.5rem; }
  /* Service link buttons stack vertically */
  .service-actions { flex-direction: column; }
  /* Why Us stacks to single column with reduced gap */
  #why {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 60px 5%;
  }
  .why-features { grid-template-columns: 1fr; }
  /* Gallery drops from 4 columns to 2 */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
