/* ==========================================================================
   CyD — Carpinteros y Diseñadores
   Hoja de estilos principal (mobile-first)
   Breakpoints: 480px / 768px / 1024px
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES Y RESET
   -------------------------------------------------------------------------- */
:root {
  /* Paleta */
  --madera-oscura: #1a1008;     /* fondo hero y footer */
  --madera-media: #2c1d10;      /* superficies oscuras secundarias */
  --dorado: #c8913a;            /* acento principal */
  --dorado-claro: #e3b56b;      /* hover / detalles */
  --crema: #f7f1e8;             /* superficie clara cálida */
  --blanco: #fdfbf7;            /* superficie clara neutra */
  --tinta: #2b2118;             /* texto sobre fondos claros */
  --tinta-suave: #6b5d4f;       /* texto secundario */
  --verde-wa: #25d366;          /* WhatsApp */
  --verde-wa-oscuro: #1da851;

  /* Tipografía */
  --fuente-titulos: 'Playfair Display', Georgia, serif;
  --fuente-cuerpo: 'Inter', -apple-system, sans-serif;

  /* Otros */
  --radio: 10px;
  --sombra: 0 8px 30px rgba(26, 16, 8, 0.12);
  --transicion: 0.3s ease;
  --ancho-max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente-cuerpo);
  color: var(--tinta);
  background: var(--blanco);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* Foco visible para navegación por teclado (accesibilidad) */
:focus-visible {
  outline: 3px solid var(--dorado);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--ancho-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow { max-width: 720px; }

/* --------------------------------------------------------------------------
   2. TEXTURA DE VETA DE MADERA (CSS puro: líneas diagonales sutiles)
   -------------------------------------------------------------------------- */
.wood-texture {
  position: relative;
}
.wood-texture::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      105deg,
      rgba(200, 145, 58, 0.045) 0px,
      rgba(200, 145, 58, 0.045) 1px,
      transparent 1px,
      transparent 9px
    ),
    repeating-linear-gradient(
      100deg,
      rgba(255, 235, 205, 0.02) 0px,
      rgba(255, 235, 205, 0.02) 2px,
      transparent 2px,
      transparent 23px
    );
}
.wood-texture > * { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   3. BOTONES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--fuente-cuerpo);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radio);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transicion), background var(--transicion), color var(--transicion), border-color var(--transicion);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--gold { background: var(--dorado); color: var(--madera-oscura); }
.btn--gold:hover { background: var(--dorado-claro); }

.btn--outline { background: transparent; color: var(--crema); border-color: rgba(247, 241, 232, 0.45); }
.btn--outline:hover { border-color: var(--dorado); color: var(--dorado-claro); }

.btn--whatsapp { background: var(--verde-wa); color: #fff; }
.btn--whatsapp:hover { background: var(--verde-wa-oscuro); }

.btn--block { width: 100%; }
.btn--large { padding: 1rem 2.2rem; font-size: 1.05rem; }
.btn--small { padding: 0.5rem 1.1rem; font-size: 0.9rem; }

.icon-wa { width: 22px; height: 22px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   4. NAVBAR (transparente → sólida al hacer scroll, controlado por JS)
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: transparent;
  transition: background var(--transicion), box-shadow var(--transicion), padding var(--transicion);
}
/* Clase añadida por js/main.js al pasar de 60px de scroll */
.navbar.is-solid {
  background: rgba(26, 16, 8, 0.96);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  padding: 0.6rem 0;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo { display: flex; align-items: baseline; gap: 0.6rem; text-decoration: none; }

.logo-mark {
  font-family: var(--fuente-titulos);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--dorado);
  letter-spacing: 1px;
}
.logo-mark--grande { font-size: 2.4rem; }

.logo-text {
  display: none; /* oculto en móvil */
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crema);
}

/* Menú: en móvil es un panel desplegable */
.navbar__nav {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(26, 16, 8, 0.98);
  padding: 1rem 1.25rem 1.5rem;
}
.navbar__nav.is-open { display: flex; }

.navbar__nav a {
  color: var(--crema);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 0.4rem;
  transition: color var(--transicion);
}
.navbar__nav a:hover { color: var(--dorado-claro); }

/* Botón hamburguesa */
.navbar__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.navbar__toggle span {
  width: 26px; height: 2px;
  background: var(--crema);
  transition: transform var(--transicion), opacity var(--transicion);
}
.navbar__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle.is-open span:nth-child(2) { opacity: 0; }
.navbar__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. HERO
   -------------------------------------------------------------------------- */
.hero {
  background:
    linear-gradient(rgba(26, 16, 8, 0.78), rgba(26, 16, 8, 0.92)),
    url('https://images.unsplash.com/photo-1556911220-bff31c812dba?auto=format&fit=crop&w=1600&q=70') center/cover no-repeat,
    var(--madera-oscura);
  background-color: var(--madera-oscura);
  color: var(--crema);
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem 0 4rem;
}

.hero__eyebrow,
.section__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dorado);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero__title {
  font-family: var(--fuente-titulos);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero__tagline {
  max-width: 560px;
  font-size: 1.05rem;
  color: rgba(247, 241, 232, 0.85);
  margin-bottom: 2rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3.5rem; }

/* Estadísticas con contador animado */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 620px;
  border-top: 1px solid rgba(200, 145, 58, 0.3);
  padding-top: 1.8rem;
}

.stat__number {
  display: block;
  font-family: var(--fuente-titulos);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--dorado);
}
.stat__number::after { content: "+"; font-size: 0.7em; margin-left: 2px; }

.stat__label { font-size: 0.82rem; color: rgba(247, 241, 232, 0.7); }

/* --------------------------------------------------------------------------
   6. SECCIONES GENÉRICAS
   -------------------------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section--light { background: var(--blanco); }
.section--cream { background: var(--crema); }
.section--dark { background: var(--madera-media); background-color: var(--madera-media); }

.section__title {
  font-family: var(--fuente-titulos);
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.section__title--light { color: var(--crema); }

.section__subtitle {
  max-width: 640px;
  color: var(--tinta-suave);
  margin-bottom: 2.5rem;
}
.section__subtitle--light { color: rgba(247, 241, 232, 0.75); }

/* --------------------------------------------------------------------------
   7. SERVICIOS
   -------------------------------------------------------------------------- */
.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--crema);
  border: 1px solid rgba(200, 145, 58, 0.18);
  border-radius: var(--radio);
  padding: 2rem 1.6rem;
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra);
  border-color: var(--dorado);
}

.service-card__icon {
  width: 56px; height: 56px;
  color: var(--dorado);
  margin-bottom: 1.2rem;
}
.service-card__icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-family: var(--fuente-titulos);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.service-card p { font-size: 0.95rem; color: var(--tinta-suave); margin-bottom: 1.2rem; }

.service-card__price {
  display: inline-block;
  font-weight: 700;
  color: var(--dorado);
  font-size: 1.05rem;
  border-top: 1px dashed rgba(200, 145, 58, 0.4);
  padding-top: 0.8rem;
}

/* --------------------------------------------------------------------------
   8. COTIZADOR
   -------------------------------------------------------------------------- */
.cotizador {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 1.8rem;
}

.cotizador__group { border: none; margin-bottom: 1.6rem; }
.cotizador__group:last-child { margin-bottom: 0; }
.cotizador__group legend {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}
.cotizador__group legend output { color: var(--dorado); font-weight: 700; }

/* Opciones tipo "chip" seleccionables */
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.option-grid--3 { grid-template-columns: 1fr; }
.option-grid--2 { grid-template-columns: 1fr 1fr; }

.option { position: relative; display: block; }
.option input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  cursor: pointer;
}
.option span {
  display: block;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.7rem 0.5rem;
  border: 2px solid rgba(107, 93, 79, 0.25);
  border-radius: var(--radio);
  transition: border-color var(--transicion), background var(--transicion), color var(--transicion);
}
.option input:checked + span {
  border-color: var(--dorado);
  background: rgba(200, 145, 58, 0.12);
  color: var(--madera-oscura);
  font-weight: 600;
}
.option input:focus-visible + span { outline: 3px solid var(--dorado); outline-offset: 2px; }

/* Slider de metros lineales */
input[type="range"] {
  width: 100%;
  accent-color: var(--dorado);
  cursor: pointer;
  height: 28px;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--tinta-suave);
}

/* Panel de resultado / previsualización */
.cotizador__resultado {
  background: var(--madera-oscura);
  color: var(--crema);
  border-radius: var(--radio);
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.cotizador__res-title { font-family: var(--fuente-titulos); font-size: 1.35rem; color: var(--dorado-claro); }

.cotizador__resumen { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.cotizador__resumen li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px dashed rgba(200, 145, 58, 0.25);
  padding-bottom: 0.45rem;
}
.cotizador__resumen li span:first-child { color: rgba(247, 241, 232, 0.65); }
.cotizador__resumen li span:last-child { font-weight: 600; text-align: right; }

.cotizador__precio { margin-top: auto; }
.cotizador__precio-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(247, 241, 232, 0.6);
}
.cotizador__precio-valor {
  display: block;
  font-family: var(--fuente-titulos);
  font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 700;
  color: var(--dorado);
  /* Pequeña transición al actualizar (clase .bump añadida por JS) */
  transition: transform 0.18s ease;
}
.cotizador__precio-valor.bump { transform: scale(1.06); }
.cotizador__precio-nota { display: block; font-size: 0.75rem; color: rgba(247, 241, 232, 0.5); margin-top: 0.4rem; }

/* --------------------------------------------------------------------------
   9. GALERÍA (masonry con CSS columns) + LIGHTBOX
   -------------------------------------------------------------------------- */
.galeria__filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.filtro {
  font-family: var(--fuente-cuerpo);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 2px solid rgba(107, 93, 79, 0.3);
  background: transparent;
  color: var(--tinta-suave);
  cursor: pointer;
  transition: all var(--transicion);
}
.filtro:hover { border-color: var(--dorado); color: var(--tinta); }
.filtro.is-active { background: var(--dorado); border-color: var(--dorado); color: var(--madera-oscura); }

/* Masonry: columnas CSS, los items no se parten gracias a break-inside */
.galeria__grid { columns: 1; column-gap: 1.1rem; }

.galeria__item {
  break-inside: avoid;
  margin-bottom: 1.1rem;
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  cursor: zoom-in;
  border: none;
  padding: 0;
  background: none;
  display: block;
  width: 100%;
}
.galeria__item img {
  width: 100%;
  border-radius: var(--radio);
  transition: transform 0.45s ease;
}
.galeria__item:hover img { transform: scale(1.05); }

/* Etiqueta de categoría sobre la imagen */
.galeria__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2rem 1rem 0.85rem;
  background: linear-gradient(transparent, rgba(26, 16, 8, 0.85));
  color: var(--crema);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  opacity: 0;
  transition: opacity var(--transicion);
}
.galeria__item:hover figcaption,
.galeria__item:focus-visible figcaption { opacity: 1; }

.galeria__item.is-hidden { display: none; }

/* Lightbox propio */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 9, 4, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox[hidden] { display: none; }

.lightbox__figura { max-width: 90vw; max-height: 85vh; text-align: center; }
.lightbox__figura img {
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: var(--radio);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.lightbox__figura figcaption { color: var(--crema); margin-top: 0.8rem; font-size: 0.95rem; }

.lightbox__cerrar,
.lightbox__nav {
  position: absolute;
  background: rgba(200, 145, 58, 0.15);
  color: var(--crema);
  border: 1px solid rgba(200, 145, 58, 0.4);
  border-radius: 50%;
  width: 46px; height: 46px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transicion);
}
.lightbox__cerrar:hover,
.lightbox__nav:hover { background: var(--dorado); color: var(--madera-oscura); }

.lightbox__cerrar { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 0.6rem; top: 50%; transform: translateY(-50%); }

/* --------------------------------------------------------------------------
   10. CALCULADORA DE MATERIALES
   -------------------------------------------------------------------------- */
.calculadora {
  background: rgba(26, 16, 8, 0.55);
  border: 1px solid rgba(200, 145, 58, 0.25);
  border-radius: var(--radio);
  padding: 1.8rem;
}

.calculadora__campos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

/* Campos genéricos (calculadora y formulario) */
.campo { display: flex; flex-direction: column; gap: 0.35rem; }
.campo label { font-size: 0.85rem; font-weight: 600; }
.section--dark .campo label { color: rgba(247, 241, 232, 0.85); }

.campo input,
.campo select,
.campo textarea {
  font-family: var(--fuente-cuerpo);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid rgba(107, 93, 79, 0.3);
  border-radius: var(--radio);
  background: var(--blanco);
  color: var(--tinta);
  transition: border-color var(--transicion);
  width: 100%;
}
.campo input:focus,
.campo select:focus,
.campo textarea:focus { border-color: var(--dorado); outline: none; }

.campo__nota { font-size: 0.78rem; color: var(--tinta-suave); }

/* Resultados de la calculadora */
.calculadora__resultado {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(200, 145, 58, 0.25);
}

.calc-res {
  text-align: center;
  padding: 1rem 0.5rem;
  border-radius: var(--radio);
  background: rgba(200, 145, 58, 0.08);
}
.calc-res--destacado { background: rgba(200, 145, 58, 0.2); }

.calc-res__num {
  display: block;
  font-family: var(--fuente-titulos);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dorado-claro);
}
.calc-res__label { font-size: 0.78rem; color: rgba(247, 241, 232, 0.7); }

.calculadora__nota {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: rgba(247, 241, 232, 0.55);
}

/* --------------------------------------------------------------------------
   11. BLOG
   -------------------------------------------------------------------------- */
.blog__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
}

.blog-card {
  background: var(--blanco);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(26, 16, 8, 0.08);
  transition: transform var(--transicion), box-shadow var(--transicion);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--sombra); }

.blog-card__img { position: relative; overflow: hidden; aspect-ratio: 16 / 10; }
.blog-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card__img img { transform: scale(1.06); }

.blog-card__categoria {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  background: var(--dorado);
  color: var(--madera-oscura);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

.blog-card__cuerpo { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.blog-card__cuerpo h3 { font-family: var(--fuente-titulos); font-size: 1.2rem; line-height: 1.3; }
.blog-card__cuerpo p { font-size: 0.92rem; color: var(--tinta-suave); flex: 1; }

.blog-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dorado);
  text-decoration: none;
}
.blog-card__link:hover { color: var(--madera-oscura); }

/* --------------------------------------------------------------------------
   12. FORMULARIO DE CONTACTO
   -------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 1.3rem; }

.form__fila { display: grid; grid-template-columns: 1fr; gap: 1.3rem; }

/* Previsualización de la foto adjuntada */
.form__preview { position: relative; max-width: 220px; margin-top: 0.6rem; }
.form__preview img { border-radius: var(--radio); box-shadow: var(--sombra); }
.form__preview-quitar {
  position: absolute;
  top: -10px; right: -10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--madera-oscura);
  color: var(--crema);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.form__preview-quitar:hover { background: var(--dorado); color: var(--madera-oscura); }

/* --------------------------------------------------------------------------
   13. TESTIMONIOS
   -------------------------------------------------------------------------- */
.testimonios__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.testimonio {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 1.8rem 1.6rem;
  box-shadow: 0 4px 16px rgba(26, 16, 8, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Estrellas: aparecen una a una cuando la card recibe .visible (IO) */
.testimonio__estrellas span {
  color: var(--dorado);
  font-size: 1.25rem;
  display: inline-block;
  opacity: 0;
  transform: scale(0.3);
}
.testimonio.visible .testimonio__estrellas span {
  animation: estrella-pop 0.4s ease forwards;
}
.testimonio.visible .testimonio__estrellas span:nth-child(1) { animation-delay: 0.10s; }
.testimonio.visible .testimonio__estrellas span:nth-child(2) { animation-delay: 0.22s; }
.testimonio.visible .testimonio__estrellas span:nth-child(3) { animation-delay: 0.34s; }
.testimonio.visible .testimonio__estrellas span:nth-child(4) { animation-delay: 0.46s; }
.testimonio.visible .testimonio__estrellas span:nth-child(5) { animation-delay: 0.58s; }

@keyframes estrella-pop {
  60% { opacity: 1; transform: scale(1.25); }
  100% { opacity: 1; transform: scale(1); }
}

.testimonio blockquote { font-size: 0.97rem; font-style: italic; color: var(--tinta); flex: 1; }
.testimonio footer strong { display: block; font-size: 0.95rem; }
.testimonio footer span { font-size: 0.82rem; color: var(--tinta-suave); }

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--madera-oscura);
  background-color: var(--madera-oscura);
  color: rgba(247, 241, 232, 0.75);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.2rem;
  padding: 3.5rem 1.25rem 2.5rem;
}

.footer__brand p { font-size: 0.9rem; margin-top: 0.8rem; }

.footer__col h4 {
  font-family: var(--fuente-titulos);
  color: var(--crema);
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}
.footer__h4-espacio { margin-top: 1.6rem; }

.footer__col a {
  display: block;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  transition: color var(--transicion);
}
.footer__col a:hover { color: var(--dorado-claro); }

.footer__redes { display: flex; gap: 0.8rem; }
.footer__redes a {
  width: 42px; height: 42px;
  border: 1px solid rgba(200, 145, 58, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background var(--transicion), color var(--transicion);
}
.footer__redes a:hover { background: var(--dorado); color: var(--madera-oscura); }
.footer__redes svg { width: 20px; height: 20px; }

.footer address { font-style: normal; font-size: 0.9rem; line-height: 1.7; }

.footer__copy {
  border-top: 1px solid rgba(200, 145, 58, 0.2);
  text-align: center;
  padding: 1.3rem;
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   15. BOTÓN FLOTANTE DE WHATSAPP
   -------------------------------------------------------------------------- */
.whatsapp-flotante {
  position: fixed;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--verde-wa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.whatsapp-flotante:hover { transform: scale(1.1); box-shadow: 0 8px 26px rgba(37, 211, 102, 0.6); }
.whatsapp-flotante svg { width: 30px; height: 30px; }

/* --------------------------------------------------------------------------
   16. ANIMACIONES DE ENTRADA (Intersection Observer en js/main.js)
   .reveal: estado inicial → .visible: estado final
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Respeta la preferencia de movimiento reducido (accesibilidad) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .testimonio__estrellas span { opacity: 1; transform: none; animation: none !important; }
}

/* ==========================================================================
   BREAKPOINTS (mobile-first)
   ========================================================================== */

/* ---------- ≥ 480px ---------- */
@media (min-width: 480px) {
  .option-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .galeria__grid { columns: 2; }
  .calculadora__campos { grid-template-columns: repeat(2, 1fr); }
  .form__fila { grid-template-columns: 1fr 1fr; }
}

/* ---------- ≥ 768px ---------- */
@media (min-width: 768px) {
  .logo-text { display: inline; }

  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .blog__grid { grid-template-columns: repeat(2, 1fr); }
  .testimonios__grid { grid-template-columns: repeat(3, 1fr); }
  .calculadora__campos { grid-template-columns: repeat(4, 1fr); }
  .calculadora__resultado { grid-template-columns: repeat(4, 1fr); }
  .footer__inner { grid-template-columns: 1.2fr 1fr 1.2fr; }

  .cotizador { grid-template-columns: 1.15fr 1fr; padding: 2.4rem; gap: 2.4rem; }
}

/* ---------- ≥ 1024px ---------- */
@media (min-width: 1024px) {
  .section { padding: 6rem 0; }

  /* Navbar: menú horizontal, sin hamburguesa */
  .navbar__toggle { display: none; }
  .navbar__nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.6rem;
    background: none;
    padding: 0;
  }

  .services__grid { grid-template-columns: repeat(4, 1fr); }
  .blog__grid { grid-template-columns: repeat(3, 1fr); }
  .galeria__grid { columns: 3; }
}
