/* ==========================================================================
   Componentes reutilizables
   ========================================================================== */

/* ---------- Textos ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent-strong);
  margin-bottom: var(--space-4);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section--dark .eyebrow { color: #7FD0DB; }
.lead { font-size: var(--fs-lg); line-height: 1.65; color: var(--text); max-width: 62ch; }
.section--dark .lead { color: #C9CFD2; }
.muted { color: var(--muted); }
.serif-quote { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.25; color: var(--heading); font-style: italic; }
.text-center { text-align: center; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 50px; padding: .8rem 1.5rem; border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--fs-sm); letter-spacing: .01em; text-decoration: none; line-height: 1.2;
  border: 1px solid transparent; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent-strong); color: #fff; }
.btn--primary:hover { background: #095E6A; color: #fff; box-shadow: 0 10px 24px -10px rgba(11, 111, 125, .55); }
.btn--outline { border-color: var(--color-gray-900); color: var(--heading); background: transparent; }
.btn--outline:hover { background: var(--color-gray-900); color: #fff; }
.btn--light { background: #fff; color: var(--heading); }
.btn--light:hover { background: var(--color-beige); color: var(--heading); }
.btn--outline-light { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--heading); }
.btn--whatsapp { background: var(--color-whatsapp); color: #fff; }
.btn--whatsapp:hover { background: #18754A; color: #fff; }
.btn--portal { background: var(--color-gray-900); color: #fff; letter-spacing: .06em; text-transform: uppercase; font-size: var(--fs-xs); }
.btn--portal:hover { background: var(--accent-strong); color: #fff; }
.btn--sm { min-height: 42px; padding: .55rem 1.1rem; }
.header-actions .btn { white-space: nowrap; }
.btn--lg { min-height: 56px; padding: 1rem 1.9rem; font-size: var(--fs-base); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: var(--fs-sm); text-decoration: none; color: var(--accent-strong); }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Iconos ---------- */
.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--color-turquoise-soft); color: var(--accent-strong); flex-shrink: 0; }
.section--dark .icon-badge { background: rgba(127, 208, 219, .12); color: #7FD0DB; }

/* ---------- Media ---------- */
.media-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-beige); aspect-ratio: 4 / 5; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-frame--square { aspect-ratio: 1; }
.media-frame--wide { aspect-ratio: 4 / 3; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-caption { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--space-3); }
.media-duo { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-4); align-items: end; }
.media-duo .media-frame:last-child { aspect-ratio: 3/4; margin-bottom: 15%; }

/* ---------- Tarjetas ---------- */
.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-3px); }
.card__media { aspect-ratio: 16 / 11; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--color-beige); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.card__title { font-size: var(--fs-h4); }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__text { font-size: var(--fs-sm); color: var(--text); }
.card__footer { margin-top: auto; padding-top: var(--space-3); }
.card--plain { border: 0; background: transparent; }
.card--plain:hover { box-shadow: none; transform: none; }
.card--soft { background: var(--bg-alt); border-color: transparent; }
.section--alt .card { border-color: transparent; }
.section--dark .card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); color: #D9DDDF; }
.section--dark .card__text { color: #C9CFD2; }

/* Tarjeta de servicio principal */
.service-card .card__body { gap: var(--space-4); }
.service-card .tag-list { margin-top: var(--space-2); }

/* ---------- Etiquetas ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.tag { display: inline-block; padding: .3rem .75rem; border-radius: var(--radius-pill); background: var(--bg-alt); font-size: var(--fs-xs); color: var(--color-gray-700); }
.section--alt .tag { background: #fff; }

/* ---------- Listas con check ---------- */
.check-list { list-style: none; padding: 0; display: grid; gap: .75rem; }
.check-list li { position: relative; padding-left: 2rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--color-turquoise-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B6F7D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.check-list--cols { gap: .75rem 2rem; }
@media (min-width: 640px) { .check-list--cols { grid-template-columns: 1fr 1fr; } }
.dot-list { padding-left: 1.2rem; display: grid; gap: .5rem; }
.dot-list li::marker { color: var(--accent); }

/* ---------- Metodología (etapas) ---------- */
.steps { display: grid; gap: var(--space-5); counter-reset: step; list-style: none; padding: 0; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 0; } }
.step { position: relative; padding: var(--space-6) var(--space-5); background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
@media (min-width: 1080px) {
  .step { border-radius: 0; border-width: 1px 0 1px 1px; }
  .step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
  .step:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-right-width: 1px; }
}
.step__num { font-family: var(--font-display); font-size: 3.25rem; line-height: 1; color: var(--accent); font-weight: 400; }
.step__label { display: block; margin-top: var(--space-4); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.step__title { font-size: var(--fs-h4); margin-top: .25rem; }
.step p { margin-top: var(--space-3); font-size: var(--fs-sm); }
.step .icon { position: absolute; top: var(--space-6); right: var(--space-5); color: var(--color-sand); width: 30px; height: 30px; }

/* ---------- Características (icono + texto) ---------- */
.feature { display: flex; gap: var(--space-4); align-items: flex-start; }
.feature h3, .feature h4 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; line-height: 1.35; }
.feature p { font-size: var(--fs-sm); margin-top: .3rem; }
.section--dark .feature p { color: #C9CFD2; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: 1.35rem 0; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--heading); font-size: 1.05rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232B3135' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform var(--dur) var(--ease), background-color var(--dur);
}
.faq__item[open] summary::after { transform: rotate(45deg); background-color: var(--color-turquoise-soft); }
.faq__item summary:hover { color: var(--accent-strong); }
.faq__answer { padding: 0 0 1.4rem; max-width: 70ch; }
.faq__answer > * + * { margin-top: .75rem; }

/* ---------- Testimonios ---------- */
.testimonial { display: flex; flex-direction: column; gap: var(--space-5); height: 100%; padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); background: #fff; border-radius: var(--radius); }
.testimonial blockquote { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.4; color: var(--heading); }
.testimonial blockquote::before { content: "“"; display: block; font-size: 3.5rem; line-height: .6; color: var(--accent); margin-bottom: .5rem; }
.testimonial figcaption { margin-top: auto; font-size: var(--fs-sm); font-weight: 600; color: var(--heading); }
.testimonial figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }

/* ---------- Bloques informativos ---------- */
.info-box { padding: clamp(1.25rem, 1rem + 1vw, 2rem); border-radius: var(--radius); background: var(--bg-alt); }
.info-box h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: .6rem; margin-bottom: var(--space-4); }
.info-box h3 .icon { color: var(--accent-strong); }
.info-box--warn { background: #FBF6EF; border: 1px solid var(--color-sand); }
.callout { display: flex; gap: var(--space-4); padding: var(--space-5); border-left: 3px solid var(--accent); background: var(--color-turquoise-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--fs-sm); }
.callout .icon { color: var(--accent-strong); flex-shrink: 0; }
.notice { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Banda CTA ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-gray-900); color: #D9DDDF; padding: clamp(2.5rem, 2rem + 4vw, 5rem) clamp(1.5rem, 1rem + 4vw, 5rem); }
.cta-band::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(127, 208, 219, .25); box-shadow: 0 0 0 60px rgba(127,208,219,.04), 0 0 0 120px rgba(127,208,219,.03); pointer-events: none; }
.cta-band h2 { color: #fff; max-width: 18ch; }
.cta-band p { max-width: 56ch; margin-top: var(--space-4); color: #C9CFD2; }
.cta-band .btn-row { position: relative; z-index: 1; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: var(--space-4); }
.form__row { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .4rem; }
.field label, .field legend { font-size: var(--fs-sm); font-weight: 600; color: var(--heading); }
.field .req { color: var(--accent-strong); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: .8rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid #C9CED1; background: #fff; font-size: 1rem;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(14, 154, 174, .18); }
.field [aria-invalid="true"] { border-color: var(--color-error); }
.field__error { font-size: var(--fs-xs); color: var(--color-error); min-height: 1em; }
.field__hint { font-size: var(--fs-xs); color: var(--muted); }
.check { display: flex; gap: .75rem; align-items: flex-start; font-size: var(--fs-sm); }
.check input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--accent-strong); flex-shrink: 0; }
.hp-field { position: absolute !important; left: -9999px !important; }
.form-status { display: none; padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.form-status.is-visible { display: block; }
.form-status.is-success { background: #E7F3EC; color: var(--color-success); border: 1px solid #BFDCCB; }
.form-status.is-error { background: #F8E9E7; color: var(--color-error); border: 1px solid #E6C3BE; }
.form-status.is-info { background: var(--bg-alt); color: var(--heading); border: 1px solid var(--color-sand); }
.form-status .btn { margin-top: var(--space-3); }
.form-card { background: #fff; border-radius: var(--radius-lg); padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); box-shadow: var(--shadow); }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* ---------- Contacto ---------- */
.contact-list { list-style: none; padding: 0; display: grid; gap: var(--space-5); }
.contact-list li { display: flex; gap: var(--space-4); align-items: flex-start; }
.contact-list strong { display: block; color: var(--heading); font-size: var(--fs-sm); }
.contact-list a { text-decoration: none; }
.map-embed { border-radius: var(--radius-lg); overflow: hidden; background: var(--color-beige); aspect-ratio: 4 / 3; position: relative; }
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.map-embed__placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); text-align: center; padding: var(--space-5); }

/* ---------- Productos ---------- */
.product-card .card__media { aspect-ratio: 1; background: var(--bg-alt); }
.product-card .card__media img { object-fit: contain; padding: 8%; }
.product-card__price { font-family: var(--font-display); font-size: 1.6rem; color: var(--heading); }
.product-card details { font-size: var(--fs-sm); }
.product-card details summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); }
.empty-state { text-align: center; padding: clamp(2rem, 1rem + 4vw, 4rem); border: 1px dashed var(--color-sand); border-radius: var(--radius-lg); background: #fff; }
.empty-state .icon-badge { margin: 0 auto var(--space-4); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90;
  display: inline-flex; align-items: center; gap: .55rem; height: 56px; padding: 0 1.1rem 0 1rem; border-radius: var(--radius-pill);
  background: var(--color-whatsapp); color: #fff; text-decoration: none; font-weight: 600; font-size: var(--fs-sm);
  box-shadow: 0 12px 30px -10px rgba(31, 143, 85, .6); transition: transform var(--dur) var(--ease);
}
.wa-float:hover { color: #fff; transform: translateY(-2px); }
.wa-float svg { width: 26px; height: 26px; fill: currentColor; }
@media (max-width: 520px) { .wa-float span { display: none; } .wa-float { width: 56px; padding: 0; justify-content: center; } }

/* ---------- Banner de cookies ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; max-width: 560px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: var(--space-5); font-size: var(--fs-sm); }
.cookie-banner[hidden] { display: none; }
.cookie-banner .btn-row { margin-top: var(--space-4); }

/* ---------- Migas de pan ---------- */
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; font-size: var(--fs-xs); color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: var(--color-sand); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-strong); }
.breadcrumb [aria-current] { color: var(--heading); }
