/* ============================================================
   FACUNDO TREES — styles.css
   ============================================================ */

/* Custom Properties */
:root {
  --bg:           #f0ede1;
  --text:         #1e3328;
  --muted-bg:     #f5f4ee;
  --brand:        #2e4b36;
  --brand-dark:   #1a2e1e;
  --accent:       #d05c08;
  --accent-hover: #b34f06;
  --brown:        #6b4f32;
  --border:       #d6d4c8;
  --light:        #f0ede1;
  --white:        #ffffff;
  --text-muted:   #5a7060;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: "Merriweather", Georgia, serif;
  line-height: 1.2;
  margin-top: 0;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); margin-bottom: .5rem; }
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem);   margin-bottom: 1rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; margin-bottom: .3rem; }

p { margin-top: 0; }
ul { padding-left: 1.25rem; margin: 0; }

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Buttons */
.btn-primary, .btn-outline, .btn-white {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 4px;
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
  font-size: .92rem;
  text-decoration: none;
  transition: background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--light);
  border: 2px solid rgba(255,255,255,.7);
}
.btn-outline:hover { background: rgba(255,255,255,.12); }

.btn-white {
  background: #fff;
  color: var(--brand-dark);
  border: 2px solid #fff;
}
.btn-white:hover { background: var(--light); }

/* Section helpers */
.section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title.light { color: var(--light); }
.bg-muted { background: var(--muted-bg); }
.bg-brand { background: var(--brand); color: var(--light); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
}

.brand {
  font-family: "Merriweather", serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .05em;
  color: var(--light);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

nav a {
  color: rgba(240,237,225,.85);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 3px;
  white-space: nowrap;
  transition: color .15s;
}
nav a:hover { color: var(--light); }

.phone {
  white-space: nowrap;
  color: var(--light);
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  padding: 6px 14px;
  flex-shrink: 0;
  transition: background .15s;
}
.phone:hover { background: rgba(255,255,255,.1); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--light);
  border-radius: 2px;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--brand-dark);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--light);
  text-decoration: none;
  padding: 11px 5%;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: .92rem;
  font-weight: 600;
}
.mobile-nav a:hover { background: rgba(255,255,255,.06); }
.mobile-nav .mobile-phone { color: #f59c5a; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 96px 0 112px;
  background:
    linear-gradient(to bottom right, rgba(26,46,30,.82), rgba(26,46,30,.58)),
    url("images/685f0ceda8f9d33920e05491.png")
      center / cover no-repeat;
  color: var(--light);
}

.hero-content { max-width: 660px; }

.eyebrow {
  margin: 0 0 10px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
}

.hero h1 { color: var(--light); margin-bottom: 14px; }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 26px;
  max-width: 520px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 20px 22px;
  transition: box-shadow .2s, transform .2s;
}
.service-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.1);
  transform: translateY(-3px);
}
.service-card img {
  width: 64px;
  height: 64px;
  border-radius: 0;
  object-fit: contain;
  margin-bottom: 14px;
}
.service-card h3 { color: var(--brand); margin-bottom: 8px; font-size: 1.05rem; }
.service-card p  { margin: 0 0 auto; font-size: .9rem; color: #555; flex: 1; }
.card-link {
  display: block;
  margin-top: 14px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 18px;
  text-align: center;
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--light);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.step h3 { margin-bottom: 8px; color: var(--brown); font-size: .97rem; }
.step p  { margin: 0; font-size: .88rem; color: #555; }

.step-arrow {
  font-size: 1.6rem;
  color: var(--brand);
  opacity: .45;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: var(--accent);
  padding: 26px 0;
}

.cta-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-banner p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 6px;
}

/* ============================================================
   SERVICE DETAIL SECTIONS
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}

.detail-grid--reverse .detail-text   { order: 2; }
.detail-grid--reverse .detail-images { order: 1; }

.detail-text h2 { margin-bottom: 14px; }
.detail-text h2 a { color: var(--brand); text-decoration: none; }
.detail-text h2 a:hover { text-decoration: underline; }
.detail-text p { color: #3d4d41; line-height: 1.75; margin-bottom: 16px; }

.service-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.service-list li {
  background: var(--brand);
  color: var(--light);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: .83rem;
  font-weight: 600;
}

/* Image pairs in detail sections */
.detail-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-images img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 6px;
}

.detail-images img:only-child {
  grid-column: 1 / -1;
  height: 320px;
}

/* Sub-services */
.sub-services {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 22px;
}

.sub-service {
  background: var(--white);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 5px 5px 0;
}
.sub-service h4 { color: var(--brand); margin-bottom: 4px; }
.sub-service p  { margin: 0; font-size: .88rem; color: #4a5a4e; }

/* ============================================================
   SERVICE AREA
   ============================================================ */
.service-area-text {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  font-size: 1rem;
  color: rgba(240,237,225,.88);
  line-height: 1.8;
}
.service-area-text strong { color: var(--light); }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-text h2 { margin-bottom: 16px; }
.about-text p { margin-bottom: 14px; }

.trust-badges { display: flex; flex-direction: column; gap: 14px; }

.badge {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px 18px;
}

.badge-icon {
  width: 34px;
  height: 34px;
  background: var(--brand);
  color: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.badge strong { display: block; font-size: .93rem; }
.badge p { margin: 2px 0 0; font-size: .82rem; color: #666; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-wrap { max-width: 760px; margin: 0 auto; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
  font-size: .95rem;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--brand);
}
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 400;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
  padding: 12px 20px 16px;
  margin: 0;
  font-size: .92rem;
  color: #3d4d41;
  border-top: 1px solid var(--border);
}

.faq-cta { text-align: center; margin-top: 28px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--brand-dark);
  color: rgba(240,237,225,.8);
  padding: 52px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-logo {
  font-family: "Merriweather", serif;
  font-weight: 900;
  font-size: 1rem;
  color: var(--light);
  letter-spacing: .05em;
  margin: 0 0 8px;
}

.footer-brand p { font-size: .88rem; color: rgba(240,237,225,.6); margin: 0 0 16px; }

.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  text-decoration: none;
  font-size: .85rem;
  transition: background .15s;
}
.social-links a:hover { background: rgba(255,255,255,.1); }

.footer-col h4 {
  color: var(--light);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: "Open Sans", sans-serif;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul a,
.footer-col p a {
  color: rgba(240,237,225,.65);
  text-decoration: none;
  font-size: .88rem;
  transition: color .15s;
}
.footer-col ul a:hover,
.footer-col p a:hover { color: var(--light); }
.footer-col p { font-size: .88rem; color: rgba(240,237,225,.65); }

.footer-bottom { padding: 16px 0; }

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: rgba(240,237,225,.45);
}
.footer-bottom-inner p { margin: 0; }
.footer-bottom-inner a { color: rgba(240,237,225,.55); text-decoration: none; }
.footer-bottom-inner a:hover { color: var(--light); }

/* ============================================================
   SUB-PAGE HERO
   ============================================================ */
.hero--page {
  background-image: linear-gradient(to right, rgba(18,36,22,.78) 0%, rgba(18,36,22,.45) 60%, rgba(18,36,22,.20) 100%), var(--page-hero-bg, none);
  background-size: cover;
  background-position: center;
  min-height: 360px;
  padding: 80px 0 100px;
}
.hero--page h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }

/* ============================================================
   SECTION INTRO
   ============================================================ */
.section-intro {
  font-size: 1.1rem;
  line-height: 1.75;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--text);
}

/* ============================================================
   SERVICES GRID  (sub-page service cards)
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.service-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 22px;
}
.service-item h3 {
  font-family: 'Merriweather', serif;
  font-size: 1rem;
  color: var(--brand-dark);
  margin: 0 0 10px;
}
.service-item p {
  font-size: .92rem;
  line-height: 1.68;
  margin: 0;
  color: var(--text);
}
.bg-muted .service-item { background: var(--white); }

/* ============================================================
   BEFORE / AFTER GRID
   ============================================================ */
.before-after-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.before-after-item h3 {
  font-family: 'Merriweather', serif;
  font-size: .95rem;
  color: var(--brand-dark);
  margin: 0 0 10px;
}
.before-after-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  nav a { font-size: .76rem; padding: 4px 5px; }
}

@media (max-width: 860px) {
  nav { display: none; }
  .hamburger { display: flex; }

  .detail-grid,
  .detail-grid--reverse { grid-template-columns: 1fr; gap: 28px; }
  .detail-grid--reverse .detail-text   { order: 1; }
  .detail-grid--reverse .detail-images { order: 2; }

  .detail-images { grid-template-columns: 1fr 1fr; }
  .detail-images img { height: 160px; }
  .detail-images img:only-child { height: 260px; grid-column: 1 / -1; }

  .about-grid { grid-template-columns: 1fr; gap: 28px; }

  .steps { grid-template-columns: 1fr; }
  .step-arrow { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .section { padding: 44px 0; }
  .hero { padding: 64px 0 80px; }
  .hero--page { padding: 56px 0 72px; min-height: 280px; }

  .service-cards { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }

  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery img { height: 140px; }

  .detail-images { grid-template-columns: 1fr; }
  .detail-images img,
  .detail-images img:only-child { height: 200px !important; grid-column: unset; }

  .cta-banner-inner { flex-direction: column; text-align: center; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand { grid-column: unset; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }

  .site-header { position: static; }
}

@media (max-width: 380px) {
  .gallery { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline { text-align: center; }
}

/* ============================================================
   INTERACTIVITY
   ============================================================ */

/* ── Header scroll shadow ─────────────────────────────────── */
.site-header {
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled {
  box-shadow: 0 2px 18px rgba(20,40,25,.18);
  background: rgba(30,51,40,.97);
}

/* ── Scroll-reveal animations ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Back-to-top button ───────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(.85);
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#back-to-top:hover {
  background: var(--brand-dark);
  transform: translateY(-2px) scale(1.05);
}

/* ── Lightbox ─────────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10,20,12,.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}
#lightbox.open {
  display: flex;
  animation: lb-in .2s ease;
}
@keyframes lb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#lightbox #lb-img {
  max-width: min(92vw, 960px);
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  cursor: default;
}
#lightbox #lb-caption {
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  text-align: center;
  margin: 0;
  max-width: 600px;
}
#lb-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: .75;
  transition: opacity .2s;
  padding: 4px 10px;
}
#lb-close:hover { opacity: 1; }
#lb-prev,
#lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  width: 48px;
  height: 64px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
#lb-prev { left: 12px; }
#lb-next { right: 12px; }
#lb-prev:hover,
#lb-next:hover { background: rgba(255,255,255,.25); }

/* ── Active nav link ──────────────────────────────────────── */
.site-header nav a.active,
.mobile-nav a.active {
  color: #fff;
  font-weight: 700;
}
.site-header nav a.active::after {
  width: 100%;
}

/* ── FAQ enhanced focus ───────────────────────────────────── */
.faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.faq-item[open] summary {
  color: var(--brand-dark);
}
.faq-item[open] > p,
.faq-item[open] > div {
  animation: faq-expand .2s ease;
}
@keyframes faq-expand {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Gallery image hover ──────────────────────────────────── */
.gallery img {
  transition: transform .3s ease, box-shadow .3s ease;
}
.gallery img:hover {
  transform: scale(1.035);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  z-index: 1;
  position: relative;
}

/* ── CTA banner pulse ─────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .cta-banner .btn-white {
    animation: cta-pulse 3s ease-in-out infinite;
  }
  @keyframes cta-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); }
    50%       { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  }
}
