/* ============================================================
   ALUMFER — Páginas internas (productos, zonas, guías, gracias)
   Se carga después de site.css. Estila el contenido de esas
   páginas (clases section, feature, faq-item, etc.) con el
   mismo lenguaje de la home.
   ============================================================ */

/* Variables que todavía usan algunos estilos en línea */
:root {
  --text-on-dark:   #fff;
  --text-on-dark-2: rgba(255,255,255,0.72);
  --text-on-dark-3: var(--muted);
}

/* ─── Hero de página interna ─────────────────────────────── */
.phero {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  border-bottom: 1px solid var(--rule);
}
.phero__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 2.5rem 4rem; align-items: center; }
.phero__text { display: grid; gap: 1.4rem; justify-items: start; }
.phero__text .hero__kicker { margin-bottom: -0.4rem; }
.phero__title { font-size: clamp(2.6rem, 6vw, 5.2rem); }
.phero__title strong { color: var(--accent); font-weight: inherit; }
.phero__text .lead { max-width: 52ch; }
.phero__text .hero__stats { width: 100%; max-width: 560px; }
.phero__photo { transform: rotate(1.2deg); box-shadow: 0 30px 50px -30px rgba(15,40,71,0.55); }
.phero__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.phero--compact .phero__title { font-size: clamp(2.3rem, 5vw, 4.2rem); }
.phero--compact .phero__photo img { aspect-ratio: 4 / 3; }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.45rem; color: var(--muted); font-size: 0.66rem; }
.crumbs a { color: var(--accent); }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-2); }

/* ─── Secciones ──────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.inner .section { padding-block: clamp(3.75rem, 8vw, 6.5rem); }
.section--mid { background: var(--paper); }
.section--mid:not(.obras-strip):not(#faq) + .section--mid:not(.obras-strip):not(#faq) { background: var(--paper-2); }
.section--mid + .section--mid { border-top: 1px solid var(--rule); }
.section--dark { background: var(--steel); color: var(--on-steel); }
.process-section { background: var(--blue); color: #fff; }

.section-header { display: grid; gap: 1rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.eyebrow {
  display: flex; align-items: center; gap: 0.6rem;
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--blue); flex-shrink: 0; }
.section-header .eyebrow { position: relative; border-bottom-color: transparent; }
.section-header .eyebrow::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--rule) 30%);
  transform: scaleX(0); transform-origin: left; transition: transform 1100ms var(--ease) 150ms;
}
.section-header.is-in .eyebrow::after { transform: scaleX(1); }
.no-js .section-header .eyebrow::after { transform: none; }
.section-header h2, .section h2 {
  font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 700; font-stretch: 108%;
  letter-spacing: -0.03em; line-height: 1.02; max-width: 22ch;
}
.section--dark .eyebrow, .process-section .eyebrow { border-color: var(--rule-steel); color: var(--on-steel-3); }
.section--dark .eyebrow::before { background: var(--blue-light); }
.process-section .eyebrow { border-color: rgba(255,255,255,0.28); color: rgba(255,255,255,0.8); margin-bottom: 2rem; }
.process-section .eyebrow::before { background: #fff; }

.section-intro { font-size: 1.08rem; line-height: 1.65; color: var(--ink-2); max-width: 66ch; }
.section-intro + .section-intro { margin-top: 1rem; }
.section--dark .section-intro { color: var(--on-steel-2); }
.section a:not(.btn):not(.nearby-link):not(.feature a) { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.section--dark a:not(.btn) { color: var(--blue-light); }
.section strong { font-weight: 600; color: var(--ink); }
.section--dark strong { color: #fff; }

/* ─── Fichas (features) numeradas ────────────────────────── */
.features-grid {
  counter-reset: ficha;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px;
}
.feature {
  counter-increment: ficha;
  position: relative; display: flex; flex-direction: column; gap: 0.55rem;
  padding: 1.4rem 1.4rem 1.5rem; background: var(--sheet);
  border: 1px solid var(--rule-soft); border-top: 3px solid var(--blue);
}
.feature::before { content: counter(ficha, decimal-leading-zero); font-family: var(--mono); font-size: 0.7rem; color: var(--accent); margin-bottom: 0.35rem; }
.feature__title { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.feature__desc { color: var(--ink-2); font-size: 0.94rem; line-height: 1.55; }
.section--dark .feature { background: var(--steel-2); border-color: transparent; border-top-color: var(--blue-light); }
.section--dark .feature::before { color: var(--blue-light); }
.section--dark .feature__desc { color: var(--on-steel-2); }
/* Fichas que son links (servicios): toda la ficha es clickeable */
.feature:has(> a) { padding: 0; }
.feature > a { display: flex; flex-direction: column; gap: 0.55rem; height: 100%; padding: 1.4rem 1.4rem 1.5rem; color: inherit; text-decoration: none !important; }
.feature:has(> a)::before { position: absolute; top: 1.4rem; right: 1.4rem; }
.feature::before { position: absolute; top: 1.4rem; right: 1.4rem; margin: 0; }
.feature > a .feature__title { display: flex; justify-content: space-between; gap: 1rem; }
.feature > a .feature__title::after { content: '→'; color: var(--accent); transition: transform 200ms var(--ease); }
.feature:has(> a) { transition: transform 220ms var(--ease), box-shadow 220ms var(--ease); }
.feature:has(> a):hover { transform: translateY(-3px); box-shadow: 0 18px 30px -24px rgba(15,40,71,0.6); }
.feature:has(> a):hover .feature__title::after { transform: translateX(4px); }

/* ─── Proceso (banda azul con línea de tiempo) ───────────── */
.process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.process-step { position: relative; padding: 0 1.5rem 0 0; }
.process-step::before { content: ''; position: absolute; left: 0; right: 0; top: 1.15rem; height: 1px; background: rgba(255,255,255,0.4); transform: scaleX(0); transform-origin: left; transition: transform 900ms var(--ease) 250ms; }
.process-step.is-in::before { transform: scaleX(1); }
.process-step.is-in .process-step__num { animation: tl-pop 520ms var(--ease) both; animation-delay: inherit; }
@keyframes tl-pop { from { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.12); } to { transform: none; opacity: 1; } }
.process-grid::after {
  content: ''; position: absolute; top: calc(1.15rem - 4px); left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 5px rgba(255,255,255,0.22), 0 0 18px 4px rgba(255,255,255,0.45);
  opacity: 0; pointer-events: none;
}
.process-grid:has(.process-step:last-child.is-in)::after { opacity: 1; animation: tl-travel 7s ease-in-out 1.2s infinite; }
@keyframes tl-travel { 0% { left: 0; } 45%, 55% { left: calc(100% - 8px); } 100% { left: 0; } }
.process-step__num {
  position: relative; z-index: 1;
  width: 2.3rem; height: 2.3rem; display: grid; place-items: center;
  background: #fff; color: #1B6CC8; border-radius: 50%;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
}
.process-step__title { margin-top: 1.25rem; font-size: 1.15rem; font-weight: 600; }
.process-step__desc { margin-top: 0.5rem; color: rgba(255,255,255,0.85); font-size: 0.94rem; line-height: 1.55; }

/* ─── Líneas en páginas de producto ──────────────────────── */
.product-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.product-row { display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule-soft); }
.product-row__media {
  display: grid; place-items: center; padding: 1.5rem; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--rule-soft);
  background-color: var(--sheet);
  background-image: linear-gradient(var(--rule-soft) 1px, transparent 1px), linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
  background-size: 22px 22px;
}
.product-row__media img { max-height: 210px; width: auto; mix-blend-mode: multiply; }
.product-row__info { padding: 1.25rem 1.4rem 1.5rem; display: grid; gap: 0.5rem; }
.product-row__name { font-size: 1.35rem; font-weight: 700; font-stretch: 108%; letter-spacing: -0.02em; }
.product-row__desc { color: var(--ink-2); font-size: 0.94rem; }

/* ─── Obras (franja de fotos) ────────────────────────────── */
.obras-strip__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.obras-strip__item { margin: 0; background: var(--sheet); padding: 8px 8px 0; border: 1px solid var(--rule-soft); }
.obras-strip__item img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.obras-strip__item figcaption { padding: 0.6rem 0.15rem 0.7rem; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); line-height: 1.4; }
.obras-strip__note { margin-top: 1.25rem; font-size: 0.88rem; color: var(--muted); }

/* ─── Botones heredados ──────────────────────────────────── */
.section-cta-wrap { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn--lg { padding: 1rem 1.5rem; }
.btn--whatsapp { background: var(--wa); color: #fff; }
.btn--whatsapp:hover { background: var(--wa-hover); }
.btn--outline { border: 1px solid var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.section--dark .btn--outline { border-color: rgba(255,255,255,0.35); color: #fff; }
.section--dark .btn--outline:hover { background: #fff; color: var(--steel); }

/* ─── Reseñas ────────────────────────────────────────────── */
.reviews-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.review-card { background: var(--steel-2); padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; border-top: 2px solid var(--blue-light); }
.review-card__stars { color: #E9A23B; letter-spacing: 2px; }
.review-card__text { font-size: 1.05rem; line-height: 1.5; }
.review-card__footer { margin-top: auto; display: flex; align-items: center; gap: 0.75rem; }
.review-card__avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); font-family: var(--mono); font-size: 0.7rem; }
.review-card__author { font-weight: 600; font-size: 0.92rem; }
.review-card__location { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--on-steel-3); }
.google-badge { display: inline-flex; align-items: center; gap: 0.5rem; justify-self: start; padding: 0.5rem 0.8rem; border: 1px solid var(--rule-steel); border-radius: var(--r); font-size: 0.88rem; color: var(--on-steel-2); text-decoration: none !important; }
.google-badge__g { font-weight: 700; color: #fff; }
.google-badge__stars { color: #E9A23B; letter-spacing: 1px; }
.google-badge__score { color: #fff; }

/* ─── Preguntas frecuentes ───────────────────────────────── */
.faq-list { counter-reset: faq; max-width: 860px; }
.faq-item { counter-increment: faq; border-top: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item__q { list-style: none; cursor: pointer; display: grid; grid-template-columns: 2.6rem 1fr 1.5rem; align-items: baseline; gap: 0.5rem; padding: 1.25rem 0; font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q::before { content: counter(faq, decimal-leading-zero); font-family: var(--mono); font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.faq-item__q::after { content: '+'; font-family: var(--mono); font-size: 1.3rem; font-weight: 400; color: var(--accent); justify-self: end; transition: transform 220ms var(--ease); }
.faq-item[open] .faq-item__q::after { transform: rotate(45deg); }
.faq-item__a { padding: 0 1.5rem 1.35rem 3.1rem; color: var(--ink-2); max-width: 66ch; }

/* ─── Zonas cercanas ─────────────────────────────────────── */
.nearby-section { padding-block: 2.5rem; background: var(--blue-tint); border-top: 1px solid rgba(27,108,200,0.15); }
.nearby-section__eyebrow { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-deep); margin-bottom: 0.9rem; }
.nearby-links { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.nearby-link { padding: 0.5rem 0.8rem; background: #fff; border: 1px solid rgba(27,108,200,0.25); border-radius: var(--r); font-size: 0.92rem; color: var(--blue-deep); }
a.nearby-link:hover { background: var(--blue); color: #fff; border-color: var(--accent); }
.nearby-link--plain { background: transparent; color: var(--ink-2); border-style: dashed; }

/* ─── Contacto / formulario ──────────────────────────────── */
.section:has(.contact-grid) { background: var(--steel); color: var(--on-steel); }
.section:has(.contact-grid) .eyebrow { border-color: var(--rule-steel); color: var(--on-steel-3); }
.section:has(.contact-grid) .eyebrow::before { background: var(--blue-light); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem 5rem; align-items: start; }
.contact-grid h2 { font-size: clamp(2.3rem, 5vw, 4rem); }
.ruled { border-left: 3px solid var(--blue-light); padding-left: 1.1rem; }
.contact-desc__text { color: var(--on-steel-2); font-size: 1.05rem; }
.contact-form { background: var(--paper); color: var(--ink); padding: clamp(1.4rem, 3vw, 2.25rem); border-radius: var(--r); display: grid; gap: 1rem; }
.contact-form p[style] { color: var(--muted) !important; margin: 0 !important; }
.contact-form p[style] a { color: var(--blue) !important; font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label { display: block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.form-input, .form-textarea { width: 100%; padding: 0.8rem 0.9rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease); }
.form-textarea { resize: vertical; min-height: 7.5rem; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--blue-soft); }
.contact-submit { justify-content: center; width: 100%; }

/* ─── Revelado (clases heredadas) ────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 650ms var(--ease), transform 650ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal--stagger-2.is-in, .reveal-delay-2.is-in { transition-delay: 70ms; }
.reveal--stagger-3.is-in, .reveal-delay-3.is-in { transition-delay: 140ms; }
.reveal--stagger-4.is-in { transition-delay: 210ms; }
.reveal--stagger-5.is-in { transition-delay: 280ms; }
.reveal--stagger-6.is-in { transition-delay: 350ms; }
.no-js .reveal { opacity: 1; transform: none; }

/* ─── Gracias ────────────────────────────────────────────── */
.thanks { padding-block: clamp(3rem, 8vw, 7rem); min-height: 60vh; }
.thanks__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 2.5rem 5rem; align-items: center; }
.thanks__grid > div { display: grid; gap: 1.5rem; justify-items: start; }
.thanks__title { font-size: clamp(2.5rem, 6vw, 5rem); }
.thanks__steps { display: grid; gap: 10px; counter-reset: none; }
.thanks__steps li { background: var(--sheet); border-left: 3px solid var(--blue); padding: 1rem 1.2rem; display: grid; gap: 0.25rem; }
.thanks__steps .mono { color: var(--accent); font-size: 0.66rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .phero__grid, .contact-grid, .thanks__grid { grid-template-columns: 1fr; }
  .phero__photo { max-width: 460px; }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .reviews-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* Hero: título grande, foto a sangre debajo con la ficha encima */
  .phero { padding-block: 1.25rem 0; background-size: 32px 32px; border-bottom: 0; }
  .phero__grid { gap: 1.75rem; }
  .phero__text { gap: 1.1rem; }
  .phero__title { font-size: clamp(2.4rem, 12.5vw, 3.6rem); line-height: 0.95; }
  .phero__text .hero__actions { width: 100%; }
  .phero__photo { transform: none; max-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 0; border: 0; box-shadow: none; position: relative; }
  .phero__photo img { aspect-ratio: 4 / 3.4; }
  .phero__photo figcaption { position: absolute; left: var(--gutter); bottom: var(--gutter); background: var(--sheet); padding: 0.45rem 0.6rem; gap: 0.75rem; }
  .phero--compact .phero__photo img { aspect-ratio: 16 / 10; }

  .inner .section { padding-block: 3.5rem; }
  .section-header h2, .section h2 { font-size: clamp(1.85rem, 9vw, 2.4rem); }
  .section-intro { font-size: 1rem; }

  /* Fichas: carrusel deslizable con imán */
  .features-grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 10px;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); padding-bottom: 6px;
  }
  .features-grid::-webkit-scrollbar { display: none; }
  .feature { flex: 0 0 80%; scroll-snap-align: start; }
  .features-grid .reveal { opacity: 1; transform: none; }

  /* Proceso: línea de tiempo vertical */
  .process-grid { grid-template-columns: 1fr; row-gap: 0; }
  .process-step { padding: 0 0 1.75rem 3.4rem; }
  .process-step::before { left: 1.15rem; right: auto; top: 2.3rem; bottom: 0; width: 1px; height: auto; transform: scaleY(0); transform-origin: top; }
  .process-step.is-in::before { transform: scaleY(1); }
  .process-grid::after { top: 0; left: calc(1.15rem - 4px); }
  .process-grid:has(.process-step:last-child.is-in)::after { animation-name: tl-travel-v; }
  @keyframes tl-travel-v { 0% { top: 0; } 45%, 55% { top: calc(100% - 8px); } 100% { top: 0; } }
  .process-step:last-child::before { display: none; }
  .process-step__num { position: absolute; left: 0; top: 0; }
  .process-step__title { margin-top: 0.3rem; }

  .product-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 10px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .product-list::-webkit-scrollbar { display: none; }
  .product-row { flex: 0 0 82%; scroll-snap-align: start; }
  .product-row__media img { max-height: 160px; }

  .obras-strip__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .obras-strip__item { padding: 4px 4px 0; }
  .obras-strip__item figcaption { font-size: 0.56rem; padding: 0.45rem 0.1rem 0.55rem; }

  .reviews-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 10px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .reviews-grid::-webkit-scrollbar { display: none; }
  .review-card { flex: 0 0 84%; scroll-snap-align: start; }
  .reviews-grid .reveal { opacity: 1; transform: none; }

  .faq-item__q { font-size: 1rem; grid-template-columns: 2rem 1fr 1.2rem; padding: 1.05rem 0; }
  .faq-item__a { padding: 0 0 1.2rem 2.5rem; font-size: 0.95rem; }

  .section-cta-wrap { display: grid; grid-template-columns: 1fr; }
  .section-cta-wrap .btn { justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .contact-grid h2 { font-size: clamp(2.2rem, 11vw, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .process-step::before, .section-header .eyebrow::after { transform: none !important; }
  .process-grid::after { display: none; }
  .phero__photo { transform: none; }
}

/* Formulario: elegir WhatsApp o email */
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 0.5rem; }
.contact-actions .btn { width: 100%; justify-content: center; }
@media (max-width: 560px) { .contact-actions { grid-template-columns: 1fr; } }
