/* ==========================================================================
   COMPONENTES — botones, header, hero, cards, formulario, footer, flotantes
   Paleta Mapfre Mediadores 2026. Reutilizables en cualquier landing.
   ========================================================================== */

/* ---------- BOTONES ---------- */
.btn {
  --btn-bg: var(--acento);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-cuerpo);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radio-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--trans), background var(--trans), box-shadow var(--trans);
  background: var(--btn-bg);
  color: var(--btn-fg);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sombra-m); }
.btn:active { transform: translateY(0); }

/* Rojo Mapfre = CTA principal */
.btn--cta { --btn-bg: var(--acento); --btn-fg: #fff; }
.btn--cta:hover { background: var(--acento-hover); }

/* Azul sólido */
.btn--azul { --btn-bg: var(--c-azul-profundo); --btn-fg: #fff; }
.btn--azul:hover { background: var(--c-azul-profundo-90); }

/* Contorno claro (sobre fondo oscuro) */
.btn--ghost-claro { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn--ghost-claro:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* Contorno azul (sobre fondo claro) */
.btn--ghost { background: transparent; color: var(--c-azul-profundo); border-color: var(--c-azul-claro); }
.btn--ghost:hover { background: var(--c-azul-profundo-05); border-color: var(--c-azul-profundo); }

.btn--full { width: 100%; }
.btn--lg { padding: 1.1rem 2rem; font-size: 1.08rem; }

/* ---------- HEADER ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 74px;
  background: rgba(255,255,255,0.98);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--linea);
}
.header .contenedor {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-5); height: 74px; min-height: 74px;
}
body { padding-top: 74px; }
html { scroll-padding-top: 90px; }
.marca { display: flex; align-items: baseline; gap: 0.4rem; }
.marca__nombre {
  font-family: var(--font-titulo); text-transform: uppercase;
  font-size: 1.55rem; color: var(--c-azul-profundo); line-height: 1; letter-spacing: 0.01em;
}
.marca__acento { color: var(--acento); }
.marca__sub {
  font-family: var(--font-soporte); font-size: 0.62rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--texto-suave); display: block;
}

.nav { display: flex; align-items: stretch; gap: var(--sp-5); flex: 1; justify-content: flex-end; min-width: 0; }
.nav__list {
  display: flex; gap: var(--sp-4); list-style: none; padding: 0;
  align-items: stretch; flex-wrap: nowrap; margin: 0; height: 74px;
}
.nav__list > li {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  align-self: stretch;
}
.nav__list > li > a,
.nav__parent {
  font-family: var(--font-cuerpo);
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  color: var(--c-azul-profundo);
  padding: 0 0.15rem; position: relative; white-space: nowrap;
  background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.28rem;
  height: 100%; box-sizing: border-box;
}
.nav__parent svg { width: 12px; height: 12px; flex: none; transition: transform 0.15s ease; }
.nav__list > li > a::after,
.nav__parent::after {
  content: ""; position: absolute; left: 0; bottom: 10px; height: 2px; width: 0;
  background: var(--acento); transition: width var(--trans);
}
.nav__list > li > a:hover::after,
.nav__list > li > a[aria-current="page"]::after,
.nav__item--drop[data-activo] .nav__parent::after,
.nav__item--drop:hover .nav__parent::after { width: 100%; }
.nav__item--drop { position: relative; }
.nav__parent { cursor: default; }
.nav__sub {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 230px; margin: 0; padding: 0.5rem 0; list-style: none;
  background: #fff; border: 1px solid var(--linea); border-radius: 0 0 12px 12px;
  box-shadow: var(--sombra-m); z-index: 70;
}
/* Puente invisible: el ratón no “cae” al bajar del título al listado */
.nav__sub::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%;
  height: 8px;
}
.nav__item--drop:hover .nav__sub,
.nav__item--drop:focus-within .nav__sub { display: block; }
.nav__sub a {
  display: block; padding: 0.55rem 1.1rem; font-weight: 600; font-size: 0.92rem;
  color: var(--c-azul-profundo); white-space: nowrap;
}
.nav__sub a:hover,
.nav__sub a[aria-current="page"] { background: var(--c-azul-profundo-05); }
.nav__acciones { display: flex; align-items: center; gap: var(--sp-3); }

.hamburguesa {
  display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem;
  color: var(--c-azul-profundo);
}
.hamburguesa svg { width: 28px; height: 28px; }

@media (max-width: 1180px) {
  .header .contenedor { gap: 0.5rem; }
  .marca { min-width: 0; flex: 1 1 auto; }
  .marca__nombre { font-size: clamp(0.92rem, 3.8vw, 1.28rem); }
  .nav { flex: 0 0 auto; min-width: 0; gap: 0.4rem; }
  .nav__acciones { flex: none; }
  .nav__acciones .btn {
    font-size: 0.78rem;
    padding: 0.46rem 0.75rem;
  }
  .hamburguesa { display: inline-flex; flex: none; padding: 0.28rem; }
  .hamburguesa svg { width: 24px; height: 24px; }
  .nav__list { display: none; }
  .nav.abierto .nav__list {
    display: flex; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; background: #fff; padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--linea); box-shadow: var(--sombra-m); gap: 0;
    height: auto; max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .nav__list > li {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex: none;
  }
  .nav__item--drop:hover .nav__sub { display: none; }
  .nav__item--drop.abierto .nav__sub { display: block; }
  .nav__sub {
    position: static; box-shadow: none; border: 0; border-radius: 0;
    width: 100%; min-width: 0; align-self: stretch;
    padding: 0 0 0.5rem 0.9rem; margin: 0;
  }
  .nav__sub a {
    white-space: normal;
    padding: 0.45rem 0;
  }
  .nav__parent {
    width: 100%; height: auto; justify-content: space-between; cursor: pointer; padding: 0.7rem 0;
  }
  .nav__item--drop.abierto .nav__parent svg { transform: rotate(180deg); }
  .nav__list > li > a { height: auto; padding: 0.7rem 0; }
  .nav__list > li > a::after,
  .nav__parent::after { display: none; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 0, 45, 0.22), transparent 60%),
    linear-gradient(160deg, var(--c-rojo-7) 0%, var(--c-rojo-5) 55%, var(--c-rojo-3) 130%);
  color: #fff; overflow: hidden;
}
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-8);
  align-items: center; padding-block: var(--sp-9);
}
.hero__eyebrow {
  font-family: var(--font-soporte); font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; font-size: 0.78rem; color: var(--c-naranja-suave);
  display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: var(--sp-4);
}
.hero h1 {
  font-size: var(--fs-display); color: #fff; margin-bottom: var(--sp-4);
}
.hero h1 em { color: var(--acento); font-style: normal; }
.hero__lead { font-size: var(--fs-lead); color: var(--c-azul-claro); max-width: 46ch; margin-bottom: var(--sp-6); }
.hero__acciones { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.hero__confianza { display: flex; gap: var(--sp-6); flex-wrap: wrap; font-family: var(--font-soporte); }
.hero__confianza div { display: flex; flex-direction: column; }
.hero__confianza strong { font-size: 1.5rem; color: #fff; font-family: var(--font-cuerpo); }
.hero__confianza span { font-size: 0.8rem; color: var(--c-azul-gris); }

/* Selector de producto dentro del hero (estilo Mapfre) */
.selector {
  background: #fff; color: var(--texto); border-radius: var(--radio-l);
  padding: var(--sp-6); box-shadow: var(--sombra-l);
}
.selector h2 { font-size: 1.25rem; color: var(--c-azul-profundo); margin-bottom: var(--sp-5); }
.selector__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.selector__grid--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) {
  .selector__grid--3 { grid-template-columns: 1fr; }
}
.selector__item {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4); border: 1.5px solid var(--linea); border-radius: var(--radio-m);
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
  background: #fff;
}
.selector__item:hover {
  border-color: var(--acento); transform: translateY(-3px); box-shadow: var(--sombra-m);
}
.selector__icono {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--c-azul-profundo-05); border-radius: var(--radio-s); color: var(--c-azul-profundo);
}
.selector__icono svg { width: 26px; height: 26px; }
.selector__item span { font-weight: 700; color: var(--c-azul-profundo); }
.selector__item small { font-family: var(--font-soporte); color: var(--texto-suave); }
.selector__item--promo { border-color: var(--acento); background: #FFF0F3; }
.selector__item--promo span { color: var(--acento); }

.seccion-descuento {
  background: #FFF0F3;
  border-block: 1px solid var(--c-rosa-2);
  text-align: center;
}
.seccion-descuento .cabecera-seccion { margin-bottom: 0; }
.seccion-descuento .btn { margin-top: var(--sp-5); }

@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-7); }
}
@media (max-width: 560px) {
  .hero__acciones { flex-direction: column; align-items: stretch; }
  .hero__acciones .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    font-size: 0.92rem;
    padding: 0.8rem 1rem;
  }
}
@media (max-width: 480px) {
  .selector__grid { grid-template-columns: 1fr; }
  .header .contenedor { gap: 0.35rem; padding-inline: 0.75rem; }
  .nav__acciones .btn {
    font-size: 0.7rem;
    padding: 0.4rem 0.58rem;
  }
}
@media (max-width: 380px) {
  .nav__acciones .btn { font-size: 0; padding: 0.4rem 0.5rem; line-height: 0; }
  .nav__acciones .btn::after {
    content: "Presupuesto";
    font-size: 0.68rem;
    line-height: 1.15;
  }
}

/* ---------- BARRA DE CONFIANZA ---------- */
.confianza-bar {
  background: var(--c-azul-profundo); color: #fff;
  border-top: 3px solid var(--acento);
}
.confianza-bar .contenedor {
  display: flex; justify-content: space-around; gap: var(--sp-5); flex-wrap: wrap;
  padding-block: var(--sp-5);
}
.confianza-bar__item { display: flex; align-items: center; gap: var(--sp-3); font-weight: 600; }
.confianza-bar__item svg { width: 26px; height: 26px; color: var(--c-naranja-suave); flex: none; }

/* ---------- TARJETAS DE PRODUCTO ---------- */
.card-producto {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--linea); border-radius: var(--radio-l);
  overflow: hidden; transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.card-producto:hover { transform: translateY(-5px); box-shadow: var(--sombra-l); border-color: transparent; }
.card-producto__top {
  padding: var(--sp-6) var(--sp-6) var(--sp-4);
  background: linear-gradient(160deg, var(--c-azul-profundo), var(--c-azul-medio));
  color: #fff; position: relative;
}
.card-producto__icono {
  width: 54px; height: 54px; display: grid; place-items: center; border-radius: var(--radio-m);
  background: rgba(255,255,255,0.12); margin-bottom: var(--sp-4);
}
.card-producto__icono svg { width: 30px; height: 30px; color: var(--c-naranja-suave); }
.card-producto__top h3 { color: #fff; overflow-wrap: break-word; hyphens: none; font-size: clamp(1.05rem, 1.6vw, 1.22rem); }
.card-producto__body { padding: var(--sp-5) var(--sp-6) var(--sp-6); display: flex; flex-direction: column; flex: 1; }
.card-producto__body p { color: var(--texto-suave); margin-bottom: var(--sp-4); }
.lista-check { list-style: none; padding: 0; margin: 0 0 var(--sp-5); display: grid; gap: var(--sp-2); }
.lista-check li { position: relative; padding-left: 1.6rem; font-size: 0.95rem; }
.lista-check li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 16px;
  background: var(--c-exito);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.lista-check a { color: var(--c-azul-profundo); font-weight: 700; text-decoration: underline; }
.lista-check__promo a { color: var(--acento); }

/* ---------- VENTAJAS (iconos) ---------- */
.ventaja { text-align: left; }
.ventaja__icono {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--radio-m);
  background: var(--c-azul-profundo-05); color: var(--c-azul-profundo); margin-bottom: var(--sp-4);
}
.ventaja__icono svg { width: 30px; height: 30px; }
.ventaja h3 { font-size: 1.15rem; margin-bottom: var(--sp-2); }
.ventaja p { color: var(--texto-suave); font-size: 0.96rem; }
.seccion--oscura .ventaja__icono { background: rgba(255,255,255,0.1); color: var(--c-naranja-suave); }
.seccion--oscura .ventaja p { color: var(--c-azul-claro); }

/* ---------- PASOS ---------- */
.paso { position: relative; padding-left: var(--sp-8); }
.paso__num {
  position: absolute; left: 0; top: 0; width: 52px; height: 52px; border-radius: var(--radio-full);
  display: grid; place-items: center; font-family: var(--font-titulo); font-size: 1.5rem;
  background: var(--acento); color: #fff;
}
.paso h3 { font-size: 1.1rem; margin-bottom: var(--sp-2); }
.paso p { color: var(--texto-suave); font-size: 0.95rem; }

/* ---------- CTA + FORMULARIO ---------- */
.cta-form {
  background:
    radial-gradient(900px 500px at 10% 110%, rgba(255, 0, 45, 0.18), transparent 60%),
    linear-gradient(160deg, var(--c-rojo-7), var(--c-rojo-5));
  color: #fff;
}
.cta-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); align-items: center; }
.cta-form h2 { color: #fff; }
.cta-form .lead { color: var(--c-azul-claro); }
.cta-form__lista { list-style: none; padding: 0; margin: var(--sp-5) 0 0; display: grid; gap: var(--sp-3); }
.cta-form__lista li { display: flex; gap: var(--sp-3); align-items: flex-start; color: var(--c-azul-claro); }
.cta-form__lista svg { width: 22px; height: 22px; color: var(--c-naranja-suave); flex: none; margin-top: 2px; }
.cta-form__canales { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-6); }

.formulario {
  background: #fff; color: var(--texto); border-radius: var(--radio-l);
  padding: var(--sp-6); box-shadow: var(--sombra-l);
}
.formulario h3 { margin-bottom: var(--sp-2); }
.campo { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: var(--sp-4); }
.campo label { font-weight: 600; font-size: 0.9rem; color: var(--c-azul-profundo); }
.campo input, .campo select, .campo textarea {
  font-family: var(--font-cuerpo); font-size: 1rem; padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--linea); border-radius: var(--radio-s); background: #fff; color: var(--texto);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.campo textarea { min-height: 7rem; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px rgba(255, 0, 45, 0.18);
}
.campo--check { flex-direction: row; align-items: flex-start; gap: 0.6rem; }
.campo--check input { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.campo--check label { font-weight: 400; font-size: 0.82rem; color: var(--texto-suave); font-family: var(--font-soporte); }
.form-nota { font-family: var(--font-soporte); font-size: 0.78rem; color: var(--texto-suave); text-align: center; margin-top: var(--sp-3); }
.form-ok {
  background: var(--c-exito-fondo); border: 1px solid var(--c-exito); color: var(--c-exito);
  padding: var(--sp-4); border-radius: var(--radio-s); margin-bottom: var(--sp-4); display: none;
}
.form-ok.visible { display: block; }

@media (max-width: 900px) { .cta-form__grid { grid-template-columns: 1fr; gap: var(--sp-6); } }

/* ---------- BLOQUE PROXIMIDAD ---------- */
.local__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); }
.chip {
  font-family: var(--font-soporte); font-size: 0.82rem; padding: 0.4rem 0.85rem;
  border: 1px solid var(--c-azul-claro); border-radius: var(--radio-full); color: var(--c-azul-medio);
}
/* Chips sobre fondo oscuro: legibles */
.seccion--oscura .chip {
  color: #fff; border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.06);
}
@media (max-width: 900px) { .local__grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--linea); border-radius: var(--radio-m); padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-3); background: #fff;
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--c-azul-profundo); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-titulo); font-size: 1.5rem; color: var(--acento); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: var(--sp-3); color: var(--texto-suave); }

/* ---------- FOOTER ---------- */
.footer { background: var(--c-rojo-7); color: var(--c-gris-1); font-size: 0.92rem; }
.footer a { color: #f3d6dc; }
.footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.1fr; gap: var(--sp-6); padding-block: var(--sp-8); }
.footer__marca .marca__nombre { color: #fff; }
.footer__marca p { color: var(--c-gris-1); margin-top: var(--sp-4); max-width: 34ch; }
.footer h4 {
  font-family: var(--font-soporte); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.78rem; color: #fff; margin-bottom: var(--sp-4);
}
.footer ul { list-style: none; padding: 0; display: grid; gap: var(--sp-2); }
.footer__contacto li { display: flex; gap: 0.5rem; align-items: flex-start; }
.footer__contacto svg { width: 18px; height: 18px; color: var(--c-naranja-suave); flex: none; margin-top: 2px; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-block: var(--sp-4);
  display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  font-family: var(--font-soporte); font-size: 0.8rem;
}
.footer__bottom a { text-decoration: underline; }
@media (max-width: 960px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__top { grid-template-columns: 1fr; } }

/* ---------- BOTÓN FLOTANTE (WhatsApp) ---------- */
.flotantes {
  position: fixed; left: 18px; bottom: 18px; z-index: 60;
  display: flex; flex-direction: column; gap: 12px;
}
.fab {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: var(--sombra-l); color: #fff; transition: transform var(--trans);
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 30px; height: 30px; }
.fab--wa { background: #25D366; }
.fab--tel, .nav__tel { display: none !important; }

/* ---------- BREADCRUMB (landings de producto) ---------- */
.breadcrumb { font-family: var(--font-soporte); font-size: 0.82rem; color: var(--texto-suave); padding-block: var(--sp-4); }
.breadcrumb a { color: var(--c-azul-medio); }
.breadcrumb span { color: var(--c-azul-profundo); font-weight: 600; }
