:root {
  --green: #1F6F3E;
  --green-dark: #154E2C;
  --green-light: #EAF3EC;
  --orange: #E07A1F;
  --orange-dark: #B85F13;
  --ink: #202324;
  --gray: #5B6266;
  --gray-light: #F4F6F5;
  --white: #FFFFFF;
  --border: #E1E6E2;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(20, 40, 28, 0.08);
  --maxw: 1160px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
}
h1, h2, h3, h4 {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--green-dark);
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--ink); }
a { color: var(--green); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-alt { background: var(--gray-light); }
.section-green { background: var(--green-light); }
.center { text-align: center; }
.eyebrow {
  display: inline-block;
  color: var(--orange-dark);
  background: #FDEFDF;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* Top bar */
.topbar {
  background: var(--green-dark);
  color: #DDEDE1;
  font-size: .82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: #DDEDE1; }
.topbar span { margin-right: 16px; }

/* Header / nav */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--green-dark);
}
.logo .logo-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.2rem;
}
nav.main-nav { display: none; }
nav.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
nav.main-nav > ul > li { position: relative; }
nav.main-nav a.nav-link {
  display: block;
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  border-radius: 8px;
}
nav.main-nav a.nav-link:hover { background: var(--green-light); color: var(--green-dark); }
.has-children > .dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  min-width: 260px;
  padding: 6px;
  list-style: none;
  margin: 4px 0 0;
}
.has-children:hover > .dropdown,
.has-children:focus-within > .dropdown { display: block; }
.dropdown li a { padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
.dropdown li a:hover { background: var(--green-light); }

.header-cta { display: flex; align-items: center; gap: 10px; }
.hamburger {
  display: inline-flex;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.mobile-nav { display: none; border-top: 1px solid var(--border); }
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 0; }
.mobile-nav > ul > li > a, .mobile-nav .sub-toggle { display: block; padding: 10px 20px; font-weight: 600; color: var(--ink); }
.mobile-nav ul ul { padding-left: 12px; }
.mobile-nav ul ul li a { font-weight: 400; padding: 8px 20px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-dark); color: white; }
.btn-outline { background: transparent; border-color: var(--green); color: var(--green-dark); }
.btn-outline:hover { background: var(--green-light); }
.btn-whatsapp { background: #22A45D; color: white; }
.btn-whatsapp:hover { background: #1c8a4d; color: white; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--green-light) 0%, var(--white) 100%);
  padding: 48px 0 40px;
}
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--gray-light);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; font-size: .85rem; color: var(--gray); }
.hero-badges span { background: white; border: 1px solid var(--border); padding: 5px 10px; border-radius: 999px; }

.placeholder-img {
  width: 100%; aspect-ratio: 4/3;
  background: repeating-linear-gradient(135deg, #DCEBE0, #DCEBE0 12px, #EAF3EC 12px, #EAF3EC 24px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--green-dark); font-size: .85rem; font-weight: 600;
  padding: 16px; border-radius: var(--radius);
}
.placeholder-img.small { aspect-ratio: 16/10; }

/* Cards grid */
.cards { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 28px; }
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.card .tag {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--orange-dark); font-weight: 700;
}
.card h3 { margin-bottom: 4px; }
.card .spacer { flex: 1; }

/* Steps */
.steps { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 24px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--green); color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: 'Poppins', sans-serif;
}
.step h4 { margin: 0 0 4px; font-size: 1.02rem; color: var(--ink); }
.step p { margin: 0; color: var(--gray); font-size: .95rem; }

/* Benefits list */
.benefits { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.benefits li {
  display: flex; gap: 10px; align-items: flex-start;
  background: white; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
.benefits li::before { content: "✓"; color: var(--green); font-weight: 700; }

/* Forms */
.form-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: .95rem; font-family: inherit; background: var(--gray-light);
}
.form-note { font-size: .8rem; color: var(--gray); margin-top: 10px; }
.form-success {
  display: none; background: var(--green-light); border: 1px solid var(--green);
  color: var(--green-dark); padding: 14px; border-radius: 10px; margin-top: 14px; font-size: .9rem;
}
.form-success.show { display: block; }

/* Calculator */
.calc-box {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.calc-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.calc-toggle button {
  flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--gray-light); font-weight: 600; cursor: pointer; font-size: .85rem;
}
.calc-toggle button.active { background: var(--green); color: white; border-color: var(--green); }
.calc-result { margin-top: 18px; padding: 16px; border-radius: 10px; background: var(--green-light); display: none; }
.calc-result.show { display: block; }
.calc-result .big { font-size: 1.5rem; font-weight: 700; color: var(--green-dark); font-family: 'Poppins', sans-serif; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }

/* FAQ */
details.faq-item {
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px;
}
details.faq-item summary {
  cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; color: var(--orange); font-size: 1.2rem; }
details.faq-item[open] summary::after { content: "–"; }
details.faq-item p { margin-top: 10px; color: var(--gray); }

/* Brands / trust bar */
.trust-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.trust-chip {
  background: white; border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 18px; font-size: .85rem; font-weight: 600; color: var(--green-dark);
}

/* Testimonials */
.testimonial { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.testimonial .who { font-weight: 700; margin-top: 10px; color: var(--green-dark); }
.testimonial .flag { font-size: .75rem; color: var(--orange-dark); font-weight: 700; text-transform: uppercase; }

/* Portfolio */
.project-card img, .project-card .placeholder-img { border-radius: 10px; margin-bottom: 12px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: .82rem; color: var(--gray); margin: 6px 0; }
.project-meta span { background: var(--gray-light); border-radius: 6px; padding: 4px 8px; }

/* Blog */
.blog-card .tag { color: var(--green); }

/* Footer */
footer.site-footer { background: var(--green-dark); color: #DCEBE0; padding: 48px 0 20px; margin-top: 40px; }
footer.site-footer h4 { color: white; font-size: 1rem; }
footer.site-footer a { color: #DCEBE0; }
footer.site-footer a:hover { color: white; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); margin-top: 30px; padding-top: 18px;
  font-size: .78rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #B9D4C1;
}

/* WhatsApp floating button */
.wa-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  background: #22A45D; color: white; width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); font-size: 1.6rem;
}
.wa-float:hover { background: #1c8a4d; }

/* Breadcrumb-style page header for inner pages */
.page-hero { background: var(--green-dark); color: white; padding: 34px 0; }
.page-hero .eyebrow { background: rgba(255,255,255,.15); color: #FDEFDF; }
.page-hero h1 { color: white; margin-bottom: 8px; }
.page-hero p { color: #DCEBE0; max-width: 640px; margin: 0; }

/* Utility grids at wider viewport */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 880px) {
  nav.main-nav { display: block; }
  .hamburger { display: none; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
  .cards.cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cards.cards-4 { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  h1 { font-size: 2.6rem; }
  h2 { font-size: 2rem; }
}

/* Marco para imágenes reales (una vez reemplazados los placeholders) */
.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}
.media-frame.small { aspect-ratio: 16/10; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }

/* Lightbox: ver foto en grande */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 18, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 30px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: white;
  color: var(--green-dark);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: var(--green-light); }

/* Selector de tipo de sistema en la calculadora */
.calc-type-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.calc-type-toggle button {
  padding: 10px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--gray-light);
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  color: var(--ink);
}
.calc-type-toggle button.active { background: var(--green); color: white; border-color: var(--green); }
@media (min-width: 420px) {
  .calc-type-toggle { grid-template-columns: repeat(4, 1fr); }
}

/* Galería de varias fotos por servicio */
.gallery-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.gallery-grid .media-frame {
  aspect-ratio: 4/3;
  background: var(--gray-light);
}
.gallery-grid .media-frame img {
  object-fit: contain; /* muestra la foto completa, sin recortarla, sea vertical u horizontal */
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
