/* ===========================================================
   HOME (index) — page-specific styles
   Hero, hero form, intro, offer, steps, why-us, faq, reviews, offices.
   =========================================================== */

/* === HERO === */
.hero {
  position: relative;
  background: var(--brand-primary); /* fallback si la imagen tarda en cargar */
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
/* Imagen de fondo a pantalla completa del hero.
   La URL y el filtro se inyectan vía variables CSS desde index.php
   para poder cambiarlos por ciudad (ver site-config.php → 'hero'). */
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--hero-bg-url, url('../imagenes/fondo-home.png'));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: var(--hero-bg-filter, none);
  z-index: -2;
}
/* Overlay oscuro encima de la imagen para que el texto blanco sea legible */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(110deg, rgba(15,25,45,.85) 0%, rgba(15,25,45,.65) 50%, rgba(15,25,45,.40) 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 24px, transparent 24px 48px);
  z-index: -1;
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
  padding: 80px 0 90px;
}
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 22px; }
.hero .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-accent-2); }
.hero h1 { color: #fff; font-size: clamp(38px, 4.6vw, 60px); line-height: 1.08; }
.hero h1 em { font-style: italic; color: var(--brand-accent-2); font-weight: 500; }
.hero .lead { font-size: 18px; margin-top: 22px; color: rgba(255,255,255,.82); max-width: 540px; }
.hero .meta { display: flex; gap: 28px; margin-top: 30px; flex-wrap: wrap; }
.hero .meta .item { display: flex; gap: 12px; align-items: flex-start; }
.hero .meta .item .icn { color: var(--brand-accent-2); flex: 0 0 auto; margin-top: 2px; }
.hero .meta .item .lbl { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.6); display: block; }
.hero .meta .item .val { font-weight: 600; color: #fff; font-size: 15px; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero .cta-row .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.hero .cta-row .btn-ghost:hover { background: #fff; color: var(--brand-primary); }

/* Hero form card */
.hero-form {
  background: #fffffff0; color: var(--text);
  padding: 32px 30px 30px; border-radius: 6px; box-shadow: var(--shadow);
  border-top: 4px solid var(--brand-accent);
  position: relative;
  backdrop-filter: blur(2px);
}
.hero-form .kicker { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--brand-accent); font-weight: 700; }
.hero-form h3 { color: var(--brand-primary); margin: 6px 0 6px; font-size: 24px; font-family: 'Spectral',serif; }
.hero-form .sub { font-size: 14px; color: var(--text-soft); margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-mute); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 14.5px; background: #fdfbf7; color: var(--text);
  transition: border-color .15s, background .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand-accent); background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Radio group — pills horizontales en desktop */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radio-group label {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  cursor: pointer;
  background: #fdfbf7;
  transition: background .15s, color .15s, border-color .15s;
  color: var(--text-soft);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
  user-select: none;
}
.radio-group label:hover {
  border-color: var(--brand-accent);
  color: var(--brand-primary);
}
.radio-group label.checked {
  background: var(--brand-accent);
  color: #fff;
  border-color: var(--brand-accent);
}
.radio-group label.checked:hover {
  background: var(--brand-accent);
  color: #fff;
}
/* Ocultamos el radio nativo pero lo mantenemos focusable por teclado */
.radio-group input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text-mute); margin: 6px 0 14px; line-height: 1.5; }
.consent input { margin-top: 3px; accent-color: var(--brand-accent); }
.consent a { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 3px; }

/* Feedback del formulario (éxito / error) */
.form-alert { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; margin: 0 0 14px; border: 1px solid transparent; line-height: 1.45; }
.form-alert--success { background: #ecf6ee; color: #1f6b34; border-color: #c8e6cf; }
.form-alert--error   { background: #fdecec; color: #8a1f1f; border-color: #f3c2c2; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* === Intro === */
.intro { background: var(--bg); }
.intro-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 70px; align-items: center; }
.intro-image {
  aspect-ratio: 4/5;
  background: var(--bg-soft);
  border-radius: 4px;
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Placeholder pattern (sólo si no hay <img>) */
.intro-image:not(:has(img)) {
  background-image: repeating-linear-gradient(45deg, transparent 0 18px, rgba(176,122,58,.08) 18px 36px);
  display: flex; align-items: center; justify-content: center;
}
.intro-image:not(:has(img))::before { content: ""; position: absolute; inset: 18px; border: 1px solid var(--line); }
.intro-image .ph-label { font-family: ui-monospace, "SFMono-Regular", monospace; font-size: 11px; color: var(--text-mute); letter-spacing: .18em; text-transform: uppercase; background: var(--bg); padding: 8px 14px; border: 1px solid var(--line); border-radius: 2px;}
.intro-text .kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--brand-accent); font-weight: 700; margin-bottom: 14px; }
.intro-text h2 { margin-bottom: 22px; }
.intro-text p { font-size: 16.5px; }
.intro-text .signature { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; gap: 24px; align-items: center; }
.intro-text .signature .name { font-family: 'Spectral', serif; font-size: 22px; color: var(--brand-primary); }
.intro-text .signature .role { font-size: 13px; color: var(--text-mute); letter-spacing: .08em; text-transform: uppercase; }
.intro-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin-top: 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.intro-stats .s { padding: 22px 16px 22px 0; border-right: 1px solid var(--line); }
.intro-stats .s:last-child { border-right: none; padding-left: 22px; padding-right: 0; }
.intro-stats .s:nth-child(2) { padding-left: 22px; }
.intro-stats .num { font-family: 'Spectral',serif; font-size: 38px; color: var(--brand-accent); line-height: 1; }
.intro-stats .lbl { font-size: 12px; color: var(--text-mute); letter-spacing: .12em; text-transform: uppercase; margin-top: 8px; }

/* === Offer (services) === */
.offer { background: var(--white); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.offer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line);}
.offer-item { padding: 38px 36px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); position: relative; transition: background .2s; }
.offer-item:hover { background: var(--bg); }
.offer-item .num { font-family: 'Spectral',serif; font-style: italic; font-size: 14px; color: var(--brand-accent); margin-bottom: 14px; display: block; letter-spacing: .1em; }
.offer-item h3 { font-size: 22px; margin-bottom: 14px; }
.offer-item p { font-size: 15px; margin: 0; color: var(--text-soft); }
.offer-item .icn { width: 44px; height: 44px; background: var(--bg-soft); color: var(--brand-primary); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; margin-bottom: 18px; }

/* === Steps === */
.steps { background: var(--brand-primary); color: #fff; position: relative; overflow: hidden; }
.steps::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 50%, rgba(176,122,58,.12), transparent 70%); pointer-events: none; }
.steps h2 { color: #fff; }
.steps .section-head .kicker { color: var(--brand-accent-2); }
.steps .section-head .kicker::before, .steps .section-head .kicker::after { background: var(--brand-accent-2); }
.steps .section-head p { color: rgba(255,255,255,.75); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.step-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); padding: 30px 28px; border-radius: 4px; transition: background .2s; backdrop-filter: blur(2px); }
.step-card:hover { background: rgba(255,255,255,.07); border-color: rgba(176,122,58,.4); }
.step-card .n { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-accent); color: #fff; font-family: 'Spectral',serif; font-size: 20px; font-weight: 600; margin-bottom: 18px; }
.step-card h3 { color: #fff; font-size: 19px; margin-bottom: 10px; font-family: 'Spectral',serif; }
.step-card p { color: rgba(255,255,255,.7); font-size: 14.5px; margin: 0; }

/* === Why us === */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.why-card { padding: 36px 32px; background: var(--white); border: 1px solid var(--line); border-radius: 4px; transition: all .2s; position: relative; }
.why-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-accent); }
.why-card .icn-wrap { width: 64px; height: 64px; background: var(--bg-soft); color: var(--brand-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.why-card h3 { font-size: 22px; margin-bottom: 12px; }
.why-card p { font-size: 15px; }

/* === FAQ === */
.faq { background: var(--bg); }
.faq-wrap { max-width: 900px; margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 12px; overflow: hidden; transition: border-color .2s; }
.faq-item:hover { border-color: var(--brand-accent); }
.faq-item.open { border-color: var(--brand-accent); }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; cursor: pointer; font-family: 'Spectral',serif; font-weight: 500; color: var(--brand-primary); font-size: 18px; user-select: none; }
.faq-q .toggle { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-soft); color: var(--brand-accent); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: transform .2s; font-size: 18px; line-height: 1; }
.faq-item.open .faq-q .toggle { transform: rotate(45deg); background: var(--brand-accent); color: #fff; }
.faq-a { padding: 0 26px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .25s; }
.faq-item.open .faq-a { padding: 0 26px 22px; max-height: 600px; }
.faq-a p { font-size: 15px; }

/* === Reviews === */
.reviews { background: var(--bg); }
.review-summary { text-align: center; margin-bottom: 50px; }
.review-summary .score { font-family: 'Spectral',serif; font-size: 56px; color: var(--brand-accent); line-height: 1; }
.review-summary .stars { color: var(--brand-accent); font-size: 22px; margin: 8px 0; letter-spacing: 3px; }
.review-summary .meta { color: var(--text-mute); font-size: 14px; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card { background: var(--white); border: 1px solid var(--line); padding: 28px; border-radius: 4px; display: flex; flex-direction: column; }
.review-card .stars { color: var(--brand-accent); margin-bottom: 14px; letter-spacing: 2px; }
.review-card .quote { font-size: 15px; color: var(--text-soft); flex: 1; font-style: italic; }
.review-card .quote::before { content: "\201C"; font-family: 'Spectral', serif; font-size: 52px; color: var(--brand-accent); line-height: 0; vertical-align: -22px; margin-right: 4px; opacity: .35; }
.review-card .who { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.review-card .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-soft); color: var(--brand-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: 'Spectral',serif; }
.review-card .name { font-weight: 700; color: var(--brand-primary); font-size: 14px; }
.review-card .date { font-size: 12px; color: var(--text-mute); }

/* === Offices === */
.offices { background: var(--white); }
.offices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
/* Cuando solo hay una oficina (landings de ciudad única), centrada y con ancho controlado */
.offices-grid--1 { grid-template-columns: minmax(0, 520px); justify-content: center; }
.office-card { padding: 32px; border: 1px solid var(--line); border-radius: 4px; transition: all .2s; background: var(--bg); }
.office-card:hover { background: var(--white); border-color: var(--brand-accent); }
.office-card .city { font-family: 'Spectral',serif; font-size: 26px; color: var(--brand-primary); margin-bottom: 14px; }
.office-card .row { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text-soft); margin-bottom: 10px; }
.office-card .row .icn { color: var(--brand-accent); flex: 0 0 auto; margin-top: 3px; }

/* === Responsive === */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 56px; }
  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .offer-grid { grid-template-columns: 1fr; }
  .steps-grid, .why-grid, .reviews-grid, .offices-grid { grid-template-columns: 1fr; }
  .offer-item[style*="span 2"] { grid-column: auto !important; }
}
@media (max-width: 640px) {
  .hero-inner { padding: 36px 0 48px; gap: 28px; }
  .hero .lead { font-size: 16px; margin-top: 16px; }
  .hero .meta { gap: 16px; margin-top: 22px; flex-direction: column; }
  .hero .cta-row { margin-top: 24px; }
  .hero .cta-row .btn { flex: 1; justify-content: center; }
  .hero-form { padding: 26px 22px 24px; }
  .hero-form h3 { font-size: 22px; }
  .offer-item { padding: 30px 24px; }
  .step-card { padding: 26px 22px; }
  .why-card { padding: 28px 24px; }
  .faq-q { padding: 18px 20px; font-size: 16px; }
  .faq-item.open .faq-a { padding: 0 20px 18px; }
  .review-summary .score { font-size: 44px; }
  .field-row { grid-template-columns: 1fr; }

  /* Pills compactas en móvil */
  .radio-group { gap: 6px; }
  .radio-group label { padding: 8px 14px; font-size: 12.5px; }
  .intro-stats { grid-template-columns: 1fr; }
  .intro-stats .s { border-right: none; border-bottom: 1px solid var(--line); padding: 18px 0 !important; }
  .intro-stats .s:last-child { border-bottom: none; }
  .offer-grid { border-left: none; }
  .offer-item { border-left: 1px solid var(--line); }
}
