/* ==========================================================================
   Mega Reformas Costel S.L. — Hoja de estilos
   Identidad: verde #32A852 · oscuro #1D1D1D · blanco #FFFFFF
   Tipografías: Cinzel SemiBold (títulos) · Montserrat (texto)
   Mobile-first, HTML semántico, JS mínimo.
   ========================================================================== */

:root {
  color-scheme: light;
  --verde: #32A852;
  --verde-oscuro: #278c43;
  --verde-claro: #e8f5ec;
  --oscuro: #1D1D1D;
  --oscuro-suave: #2a2a2a;
  --blanco: #FFFFFF;
  --gris-100: #f6f7f6;
  --gris-200: #eceeec;
  --gris-600: #6b6f6b;
  --gris-700: #4c504c;
  --sombra: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
  --radio: 8px;
  --max-width: 1120px;
  --font-titulo: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-texto: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-texto);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--oscuro);
  background: var(--blanco);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-titulo);
  font-weight: 600;
  line-height: 1.2;
  color: var(--oscuro);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--verde); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0; padding: 0; list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ===== Utilidades ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding: 3.5rem 0; }
.section-alt { background: var(--gris-100); }
.section-header { max-width: 720px; margin-bottom: 2rem; }
.section-header p { color: var(--gris-700); }
.section-header h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin-top: 0.6rem;
  border-radius: 2px;
  background: var(--verde);
}

.text-center { text-align: center; }
.section-action { margin-top: 1.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radio);
  font-family: var(--font-texto);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--verde); color: var(--blanco); }
.btn-primary:hover { background: var(--verde-oscuro); }

.btn-outline { background: transparent; color: var(--verde); border-color: var(--verde); }
.btn-outline:hover { background: var(--verde); color: var(--blanco); }

.btn-light { background: var(--blanco); color: var(--oscuro); }
.btn-light:hover { background: var(--gris-200); }

.btn-lg { padding: 1rem 1.75rem; font-size: 1.05rem; }

/* ===== Cabecera ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blanco);
  box-shadow: var(--sombra);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 88px;
}

.brand { display: inline-flex; align-items: center; }
.brand img { width: 350px; height: auto; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--oscuro);
  font-weight: 500;
  padding: 0.4rem 0;
}
.main-nav a:hover { color: var(--verde); }
.main-nav a[aria-current="page"] { color: var(--verde); }

.nav-cta { display: flex; align-items: center; gap: 0.5rem; }
.nav-cta .nav-phone {
  background: var(--verde);
  color: var(--blanco);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radio);
  font-weight: 600;
  white-space: nowrap;
}
.nav-cta .nav-phone:hover { background: var(--verde-oscuro); }

.wa-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  flex: 0 0 auto;
  transition: background 0.2s ease;
}
.wa-badge:hover { background: #1ebe5d; }
.wa-badge svg { width: 22px; height: 22px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--oscuro);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #16301f 0%, #1f5a31 55%, var(--verde-oscuro) 100%);
  color: var(--blanco);
  padding: 3rem 0;
}
.hero::after {
  content: "";
  position: absolute;
  top: -45%;
  right: -8%;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(50, 168, 82, 0.28) 0%, rgba(50, 168, 82, 0) 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
}
.hero-kicker {
  color: #7fd49a;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}
.hero h1 {
  color: var(--blanco);
  margin-bottom: 0.75rem;
}
.hero .lead {
  color: #e8ede9;
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-accent { color: #7fd49a; }

/* ===== Tarjetas / grids ===== */
.grid { display: grid; gap: 1.25rem; }

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

.card {
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-radius: var(--radio);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
  border-color: var(--verde);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--gris-700); margin: 0; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--verde-claro);
  color: var(--verde);
  margin-bottom: 0.9rem;
  font-size: 1.3rem;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--verde-claro);
  color: var(--verde);
  margin-bottom: 0.9rem;
  flex: 0 0 auto;
}
.service-icon svg { width: 24px; height: 24px; }

/* ===== Bento grid (servicios destacados) ===== */
.bento {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.bento .card--feature {
  background: var(--verde);
  color: #fff;
  border-color: var(--verde);
}
.bento .card--feature h3 { color: #fff; }
.bento .card--feature p { color: #e8f5ec; }
.bento .card--feature .service-icon { background: rgba(255, 255, 255, 0.22); color: #fff; }

@media (min-width: 600px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .card--feature { grid-column: span 2; }
}
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento .card--feature { grid-column: span 2; grid-row: span 2; }
}

/* ===== Confianza (hero) ===== */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.7rem;
  row-gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: #cfd9d1;
}
.hero-trust li { display: inline-flex; align-items: center; gap: 0.7rem; }
.hero-trust li + li::before {
  content: "·";
  color: var(--verde);
  font-weight: 700;
}
.hero-trust a { color: #7fd49a; font-weight: 500; }
.hero-trust a:hover { color: #fff; }

.servicios-list .service-icon { width: 40px; height: 40px; }
.servicios-list .service-icon svg { width: 20px; height: 20px; }

/* ===== Lista de servicios ===== */
.servicios-list { display: grid; gap: 0.75rem; }
.servicios-list li {
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-left: 4px solid var(--verde);
  border-radius: var(--radio);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.servicios-list .check { color: var(--verde); font-weight: 700; }

/* ===== CTA / banda ===== */
.cta-band { background: var(--verde); color: var(--blanco); text-align: center; padding: 3rem 0; }
.cta-band h2 { color: var(--blanco); }
.cta-band p { color: #e8f5ec; margin-bottom: 0; }
.cta-band .btn { margin-top: 1.25rem; }

/* ===== Horario ===== */
.horario { max-width: 460px; }
.horario li {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--gris-200);
}
.horario li:last-child { border-bottom: none; }
.horario .dia { font-weight: 500; }
.horario .cerrado { color: var(--gris-600); font-weight: 400; }

/* ===== Formulario ===== */
.form {
  display: grid;
  gap: 1rem;
}
.form label { display: block; font-weight: 500; margin-bottom: 0.3rem; }
.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--gris-200);
  border-radius: var(--radio);
  font-family: var(--font-texto);
  font-size: 1rem;
  color: var(--oscuro);
  background: var(--blanco);
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid var(--verde);
  outline-offset: 1px;
  border-color: var(--verde);
}
.form textarea { min-height: 130px; resize: vertical; }
.form small { color: var(--gris-600); }

.contacto-grid { display: grid; gap: 2rem; }

/* ===== Contacto: tarjetas y lista ===== */
.contact-card {
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-top: 4px solid var(--verde);
  border-radius: var(--radio);
  padding: 1.75rem;
  box-shadow: var(--sombra);
}
.contact-card h2 { margin-bottom: 0.4rem; }
.contact-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gris-100);
}
.contact-item:last-child { border-bottom: none; }
.contact-item > div { display: flex; flex-direction: column; min-width: 0; }
.contact-item strong { font-weight: 600; }
.contact-item div a { color: var(--verde); font-weight: 500; overflow-wrap: anywhere; }
.contact-item div a:hover { text-decoration: underline; }
.contact-item span.muted { color: var(--gris-700); }
.contact-item a.badge,
.contact-item a.wa-badge { color: #fff; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  flex: 0 0 auto;
}
.badge svg { width: 20px; height: 20px; }
.badge-verde { background: var(--verde); }
.badge-wa { background: #25D366; }
.badge, .wa-badge { text-decoration: none; }
.badge:hover, .wa-badge:hover { text-decoration: none; }

/* ===== Localidades ===== */
.zonas-grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}
.zona-col {
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-top: 4px solid var(--verde);
  border-radius: var(--radio);
  padding: 1.25rem 1.25rem 0.9rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.zona-col h3 {
  color: var(--verde);
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}
.zona-col ul { list-style: none; padding: 0; margin: 0; }
.zona-col li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--gris-100);
  color: var(--gris-700);
  font-size: 0.95rem;
}
.zona-col li:last-child { border-bottom: none; }

@media (min-width: 600px) {
  .zonas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .zonas-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Pie ===== */
.site-footer {
  background: var(--oscuro);
  color: #c3c7c3;
  padding: 3rem 0 1.5rem;
  border-top: 4px solid var(--verde);
}
.site-footer h2 {
  color: var(--blanco);
  font-size: 1rem;
  margin-bottom: 0.9rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer-list li { padding: 0.25rem 0; }
.footer-list a { color: #c3c7c3; }
.footer-list a:hover { color: var(--blanco); }
.footer-brand {
  font-family: var(--font-titulo);
  color: var(--blanco);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.25rem;
  color: #9aa09a;
  font-size: 0.9rem;
}
.footer-bottom p { margin: 0; }

/* ===== Migas de pan ===== */
.breadcrumb { margin: 0 0 1rem; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}
.breadcrumb li + li::before {
  content: "›";
  margin-right: 0.4rem;
  color: #7fd49a;
}
.breadcrumb a { color: #b8c7bb; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb li[aria-current="page"] { color: #7fd49a; }

/* ===== FAQ ===== */
.faq { max-width: 720px; }
.faq-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gris-200);
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 {
  font-family: var(--font-texto);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--oscuro);
  margin: 0 0 0.4rem;
}
.faq-item p { margin: 0; color: var(--gris-700); }

/* ===== Reseñas (marquee) ===== */
.section-reviews {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--verde-oscuro) 0%, #1f5a31 50%, #16301f 100%);
  color: #e8f5ec;
}
.section-reviews::before {
  content: "";
  position: absolute;
  top: -45%;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}
.section-reviews .container,
.section-reviews .reviews-marquee {
  position: relative;
  z-index: 1;
}
.section-reviews .section-header h2 { color: var(--blanco); }
.section-reviews .section-header h2::after { background: var(--blanco); }

.section-header--center {
  margin-inline: auto;
  text-align: center;
}
.section-header--center h2::after {
  margin-left: auto;
  margin-right: auto;
}

.reviews-summary {
  display: flex;
  justify-content: center;
  margin: 0 0 2.25rem;
}
.reviews-summary a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: var(--blanco);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.reviews-summary a:hover {
  color: var(--blanco);
  border-color: var(--blanco);
  background: rgba(0, 0, 0, 0.32);
  text-decoration: none;
}
.reviews-summary-stars { color: var(--blanco); letter-spacing: 0.1em; }
.reviews-summary strong { color: var(--blanco); font-weight: 600; }

.reviews-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.reviews-track {
  display: flex;
  width: max-content;
  animation: reviews-scroll 45s linear infinite;
}
.reviews-marquee:hover .reviews-track { animation-play-state: paused; }

.reviews-group {
  display: flex;
  flex: 0 0 auto;
  gap: 1.25rem;
  padding-right: 1.25rem;
}

.review-card {
  flex: 0 0 auto;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-radius: var(--radio);
  padding: 1.5rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.40);
}
.review-stars {
  color: var(--verde);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  line-height: 1;
}
.review-text {
  margin: 0;
  color: var(--gris-700);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-author {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.review-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--verde);
  color: var(--blanco);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.review-name { font-weight: 600; font-size: 0.9rem; color: var(--oscuro); }

@keyframes reviews-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 480px) {
  .review-card { width: 270px; }
}

@media (prefers-reduced-motion: reduce) {
  .reviews-track { animation: none; }
  .reviews-marquee { overflow-x: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .brand img { width: 200px; }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--blanco);
    box-shadow: var(--sombra);
    display: none;
    border-top: 1px solid var(--gris-200);
  }
  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
  }
  .main-nav li { border-bottom: 1px solid var(--gris-100); }
  .main-nav li:last-child { border-bottom: none; }
  .main-nav a {
    display: block;
    padding: 0.9rem 1.5rem;
  }
  .nav-cta { padding: 0.75rem 1.5rem; justify-content: center; }
  .nav-cta .nav-phone { display: block; text-align: center; flex: 1 1 auto; }
  .nav-cta .wa-badge { display: inline-flex; padding: 0; flex: 0 0 auto; }
}

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .contacto-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Barra CTA fija (móvil) ===== */
.mobile-cta {
  display: none;
}

@media (max-width: 860px) {
  .mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--blanco);
    border-top: 1px solid var(--gris-200);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.10);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-cta a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 56px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--blanco);
    text-decoration: none;
  }
  .mobile-cta a:hover { text-decoration: none; }
  .mobile-cta svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
  }
  .mobile-cta-call { background: var(--verde); }
  .mobile-cta-call:active { background: var(--verde-oscuro); }
  .mobile-cta-wa { background: #25D366; }
  .mobile-cta-wa:active { background: #1ebe5d; }

  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}

/* ===== Trabajos: comparador antes/después ===== */
.antes-despues-grid { display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .antes-despues-grid { grid-template-columns: 1fr 1fr; } }

.cmp-frame {
  position: relative; aspect-ratio: 4 / 5;
  border-radius: var(--radio); overflow: hidden; background: var(--gris-200);
  touch-action: pan-y; user-select: none;
}
.cmp-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}
.cmp-frame .layer-before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.cmp-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%);
  width: 3px; margin-left: -1.5px; background: #fff;
  box-shadow: 0 0 8px rgba(0,0,0,.5); pointer-events: none; z-index: 3;
}
.cmp-handle {
  position: absolute; top: 50%; left: var(--pos, 50%);
  transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--oscuro);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,.45);
  pointer-events: none; z-index: 4;
}
.cmp-tag {
  position: absolute; top: 0.6rem; z-index: 3;
  padding: 0.25rem 0.7rem; border-radius: 999px;
  background: rgba(29,29,29,.78); color: #fff;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.cmp-tag--before { left: 0.6rem; }
.cmp-tag--after { right: 0.6rem; background: rgba(50,168,82,.95); }
.cmp-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize; z-index: 5; touch-action: pan-y;
}
.cmp-range:focus-visible { outline: 3px solid var(--verde); outline-offset: -3px; }
.cmp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.85rem; }
.cmp-switch { display: inline-flex; border: 1px solid var(--gris-200); border-radius: 999px; overflow: hidden; }
.cmp-switch button {
  border: 0; background: #fff; color: var(--gris-700);
  font: inherit; font-size: 0.9rem; font-weight: 600; padding: 0.45rem 1rem; cursor: pointer;
}
.cmp-switch button[aria-pressed="true"] { background: var(--verde); color: #fff; }
.cmp-hint { margin: 0; color: var(--gris-600); font-size: 0.85rem; }
.cmp-hint::before { content: "\2194 "; color: var(--verde); font-weight: 700; }
.cmp-fig { margin: 0; }

/* ===== Trabajos: galería ===== */
.trabajos-grid { display: grid; gap: 1.25rem; }
@media (min-width: 600px) { .trabajos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .trabajos-grid { grid-template-columns: repeat(3, 1fr); } }
.trabajo-card {
  background: var(--blanco); border: 1px solid var(--gris-200);
  border-radius: var(--radio); overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.trabajo-card:hover { transform: translateY(-4px); box-shadow: var(--sombra); border-color: var(--verde); }
.trabajo-card figure { margin: 0; aspect-ratio: 1 / 1; overflow: hidden; background: var(--gris-200); }
.trabajo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trabajo-body { padding: 1rem 1.15rem 1.25rem; }
.trabajo-tipo {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--verde); margin-bottom: 0.35rem;
}
.trabajo-body h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.trabajo-body p { margin: 0; color: var(--gris-700); font-size: 0.92rem; }

/* ===== Trabajos: tira "más trabajos" ===== */
.trabajos-strip { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .trabajos-strip { grid-template-columns: repeat(5, 1fr); } }
.trabajos-strip figure { margin: 0; }
.trabajos-strip .strip-img { display: block; border-radius: var(--radio); overflow: hidden; background: var(--gris-200); }
.trabajos-strip img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.trabajos-strip figcaption { font-size: 0.8rem; color: var(--gris-700); margin-top: 0.5rem; }
.trabajos-strip figcaption strong { color: var(--oscuro); font-weight: 600; }

/* ===== Ajustes 2026-10-04: ritmo vertical + tarjetas comparador ===== */
.section { padding: 3rem 0; }
.hero { padding: 2.5rem 0; }
.hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); }

.antes-despues-grid { gap: 2rem; }
.trabajo-cmp {
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-top: 4px solid var(--verde);
  border-radius: var(--radio);
  padding: 1.25rem 1.25rem 1.35rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.trabajo-cmp-head { margin-bottom: 1rem; }
.trabajo-cmp-head h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.trabajo-cmp-head p { margin: 0; color: var(--gris-700); font-size: 0.92rem; }

/* ===== Trabajos: galería con tira + lightbox ===== */
.gal-grid { display: grid; gap: 1.75rem 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .gal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .gal-grid { grid-template-columns: repeat(3, 1fr); } }

.gal-card {
  display: grid; grid-template-rows: auto auto auto auto;
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-top: 3px solid var(--verde);
  border-radius: var(--radio);
  padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.gal-card:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
@supports (grid-template-rows: subgrid) {
  .gal-grid { grid-auto-rows: auto; }
  .gal-card { grid-template-rows: subgrid; grid-row: span 4; }
}
.gal-card [hidden] { display: none; }

.gal-head { margin-bottom: 0.75rem; }
.gal-head h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.gal-head p { margin: 0; color: var(--gris-700); font-size: 0.9rem; }
.gal-tipo { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--verde); margin-bottom: 0.25rem; }

.gal-main {
  position: relative; display: block; width: 100%; margin: 0; padding: 0;
  border: 0; background: var(--gris-200); cursor: zoom-in;
  aspect-ratio: 1 / 1; border-radius: var(--radio); overflow: hidden;
}
.gal-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-zoom {
  position: absolute; right: 0.55rem; bottom: 0.55rem;
  padding: 0.3rem 0.65rem; border-radius: 999px;
  background: rgba(29,29,29,.75); color: #fff; font-size: 0.75rem; font-weight: 600;
}
.gal-strip {
  display: flex; gap: 0.5rem; margin-top: 0.6rem; padding-bottom: 0.3rem;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.gal-thumb {
  flex: 0 0 auto; width: 84px; scroll-snap-align: start;
  border: 0; padding: 0; margin: 0; background: none; cursor: zoom-in;
  border-radius: 6px; overflow: hidden; line-height: 0;
}
.gal-thumb img { width: 84px; height: 84px; object-fit: cover; display: block; }
.gal-thumb:focus-visible, .gal-main:focus-visible, .gal-more:focus-visible { outline: 3px solid var(--verde); outline-offset: 2px; }
.gal-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.75rem; }
.gal-more { font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--verde); background: none; border: 0; padding: 0.2rem 0; cursor: pointer; }
.gal-more:hover { text-decoration: underline; }
.gal-count { color: var(--gris-600); font-size: 0.82rem; }

/* Lightbox */
dialog.lb { border: none; padding: 0; background: transparent; max-width: min(96vw, 1100px); max-height: 94vh; }
dialog.lb::backdrop { background: rgba(0,0,0,.85); }
.lb-frame { position: relative; display: flex; align-items: center; justify-content: center; }
.lb-img { max-width: 100%; max-height: 84vh; width: auto; height: auto; border-radius: 6px; display: block; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; border: 0; cursor: pointer; border-radius: 50%;
  background: #fff; color: var(--oscuro); width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.lb-close { top: -0.4rem; right: -0.4rem; }
.lb-prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.6rem; top: 50%; transform: translateY(-50%); }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.3rem 0; color: #eee; font-size: 0.85rem; }
.lb-counter { color: #7fd49a; font-weight: 600; white-space: nowrap; }
.lb-cap { color: #dfe6e1; }

/* Tira "Más trabajos" clicable */
.trabajos-strip .gal-mini { border: 0; padding: 0; margin: 0; background: none; cursor: zoom-in; text-align: left; width: 100%; display: block; }
.trabajos-strip .gal-mini:focus-visible { outline: 3px solid var(--verde); outline-offset: 3px; border-radius: var(--radio); }
