/* Base compartida, con los tokens del diseño de referencia (Stitch / AI Studio).
   Cada página carga además su propia hoja (css/<pagina>.css). */

:root {
  --color-primary: #003661;
  --color-primary-container: #1b4d7e;
  --color-primary-dark: #003661;
  --color-primary-soft: #d2e4ff;
  --color-action: #0051d5;
  --color-action-hover: #316bf3;
  --color-action-ring: #93c5fd;
  --color-emerald: #10b981;
  --color-emerald-soft: #ecfdf5;
  --color-text: #0b1c30;
  --color-text-body: #42474f;
  --color-text-muted: #727780;
  --color-surface: #f8f9ff;
  --color-surface-alt: #eff4ff;
  --color-surface-chip: #e5eeff;
  --color-white: #ffffff;
  --color-border: #e5eeff;
  --color-footer: #003661;

  --radius-control: 0.5rem;
  --radius-card: 1rem;
  --radius-panel: 1.5rem;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(27, 77, 126, 0.03);
  --shadow-card-hover: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 12px 24px -4px rgba(27, 77, 126, 0.08);

  --container: 1280px;
  --gutter: 1.5rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-action); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-action-ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-primary); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) { .container { padding: 0 1.5rem; } }

.section { padding: 4rem 0; }
@media (min-width: 1024px) { .section { padding: 6rem 0; } }
.section--alt { background: var(--color-surface-alt); }

/* Tipografía */
h1, h2, h3, h4 { color: var(--color-primary); line-height: 1.2; margin: 0 0 0.75rem; font-weight: 800; }
h1 { font-size: 2rem; letter-spacing: -0.03em; }
h2 { font-size: 1.875rem; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.125rem; color: var(--color-text-body); }
.eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-action); margin-bottom: 0.5rem;
}
@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
}

/* Barra superior de contacto */
.topbar { background: var(--color-primary); color: #d3e4fe; font-size: 0.8rem; }
.topbar__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.25rem; padding-top: 0.6rem; padding-bottom: 0.6rem;
}
.topbar a { color: #fff; text-decoration: none; font-weight: 500; }
.topbar a:hover { text-decoration: underline; }
.topbar__status {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.75rem;
  border-radius: 999px; background: rgba(0, 87, 58, 0.8); color: #6ffbbe; font-weight: 600;
}
.topbar__status::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: #6ffbbe;
}
.topbar__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

/* Encabezado */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-surface-chip);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.5rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 3rem; width: auto; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border: 1px solid #c2c7d0; border-radius: var(--radius-control);
  background: #fff; cursor: pointer; color: var(--color-primary);
}
.nav-toggle svg { width: 1.4rem; height: 1.4rem; }

.site-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--color-surface-chip);
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.12);
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0.5rem 1rem 1rem; }
.site-nav a {
  display: block; padding: 0.75rem 0; text-decoration: none; color: var(--color-text);
  font-weight: 600; border-bottom: 1px solid var(--color-surface-alt);
}
.site-nav a[aria-current="page"] { color: var(--color-action); }

@media (min-width: 1440px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block; position: static; box-shadow: none; border: 0; background: transparent;
  }
  .site-nav ul { display: flex; gap: 0.25rem; padding: 0; align-items: center; }
  .site-nav a {
    border: 0; padding: 0.5rem 0.75rem; border-radius: var(--radius-control);
    font-size: 0.875rem; white-space: nowrap; color: var(--color-text-body);
  }
  .site-nav a:hover { background: var(--color-surface-alt); color: var(--color-primary); }
  .site-nav a[aria-current="page"] { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 700; }
}

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-actions .header-cta { display: none; white-space: nowrap; }
.header-actions .header-call { display: none; white-space: nowrap; }
@media (min-width: 1200px) {
  .header-actions .header-cta { display: inline-flex; }
}
@media (min-width: 1600px) {
  .header-actions .header-call { display: inline-flex; }
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.75rem 1.5rem; border-radius: var(--radius-control);
  font: 700 0.8rem/1.2 'Plus Jakarta Sans', system-ui, sans-serif; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.btn--primary { background: var(--color-action); color: #fff; box-shadow: var(--shadow-xs); }
.btn--primary:hover { background: var(--color-action-hover); box-shadow: 0 4px 12px rgba(0, 81, 213, 0.25); }
.btn--secondary { border-color: #c2c7d0; color: var(--color-primary); background: #fff; }
.btn--secondary:hover { background: var(--color-surface-alt); }
.btn--block { width: 100%; }

/* Hero */
.hero { padding: 2.5rem 0 4rem; background: var(--color-surface-alt); }
.hero__grid { display: grid; gap: 2.5rem; align-items: start; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.trust-line { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 1.25rem 0 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--color-text-body); }
.trust-line li::before { content: "✓"; color: var(--color-emerald); font-weight: 700; margin-right: 0.35rem; }
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 7fr 5fr; gap: 3rem; }
  .hero { padding: 4rem 0 5rem; }
}

/* Migas de pan */
.breadcrumbs { font-size: 0.8rem; color: var(--color-text-muted); padding: 1.25rem 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.25rem; color: #c2c7d0; }
.breadcrumbs a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary); }

/* Tarjetas */
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-panel);
  padding: 1.75rem; box-shadow: var(--shadow-xs);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: 0 10px 24px -6px rgba(27, 77, 126, 0.12); }
.card--accent { border-top: 2px solid var(--color-primary-container); }
.card--accent-emerald { border-top: 2px solid var(--color-emerald); }
.card h3 a { color: inherit; text-decoration: none; }
.card p { color: var(--color-text-body); font-size: 0.95rem; }
.card__link { margin-top: auto; font-size: 0.8rem; font-weight: 700; color: var(--color-action); text-decoration: none; }
.card__link:hover { text-decoration: underline; }
.card__icon {
  width: 3rem; height: 3rem; border-radius: var(--radius-card); background: var(--color-surface-chip);
  display: inline-flex; align-items: center; justify-content: center; color: var(--color-primary); margin-bottom: 1.25rem;
  transition: background-color 150ms ease, color 150ms ease;
}
.card:hover .card__icon { background: var(--color-action); color: #fff; }
.card__icon svg { width: 1.4rem; height: 1.4rem; }

/* Listas de verificación */
.checklist { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.checklist li { position: relative; padding-left: 1.75rem; margin-bottom: 0.6rem; color: var(--color-text-body); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.3rem; width: 1rem; height: 1rem; border-radius: 999px;
  background: var(--color-emerald-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
  border: 1px solid #a7f3d0;
}

/* Imagen con texto */
.split { display: grid; gap: 2rem; align-items: center; }
.split img { border-radius: var(--radius-panel); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow-card-hover); }
@media (min-width: 1024px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split--reverse .split__media { order: 2; }
}

/* Preguntas frecuentes */
.faq details {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card);
  padding: 0.25rem 1.25rem; margin-bottom: 0.75rem; box-shadow: var(--shadow-xs);
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--color-primary); padding: 0.9rem 0;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--color-action); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1rem; color: var(--color-text-body); }

/* Llamada a la acción */
.cta-band {
  background: var(--color-primary); color: #fff; border-radius: var(--radius-panel);
  padding: 2.25rem 1.75rem; box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.08);
}
.cta-band h2, .cta-band h3 { color: #fff; }
.cta-band p { color: #d3e4fe; }
.cta-band .btn--primary { background: #fff; color: var(--color-primary); }
.cta-band .btn--primary:hover { background: #e8f1ff; box-shadow: none; }
.cta-band .btn--secondary { border-color: #fff; color: #fff; background: transparent; }
.cta-band .btn--secondary:hover { background: rgba(255, 255, 255, 0.1); }
@media (min-width: 768px) {
  .cta-band { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.75rem; }
}

/* Pie de página */
.site-footer { background: var(--color-footer); color: #d3e4fe; padding: 3.5rem 0 2rem; font-size: 0.9rem; }
.site-footer h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; margin-bottom: 1rem; }
.site-footer a { color: #93bef6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(147, 190, 246, 0.25);
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; justify-content: space-between; font-size: 0.8rem; color: #93bef6;
}
.footer-bottom a { color: #93bef6; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

/* Utilidades */
.text-center { text-align: center; }
.section__header { max-width: 760px; margin: 0 auto 2.5rem; }
.section__header.text-center { margin-left: auto; margin-right: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* En celulares la barra superior queda compacta: se oculta el correo. */
@media (max-width: 639px) {
  .topbar__links a:last-child { display: none; }
  .topbar__inner { padding-top: 0.5rem; padding-bottom: 0.5rem; }
}

/* Logo en el pie: fondo blanco para que el logo se lea sobre azul oscuro. */
.footer-logo { display: inline-block; background: #fff; padding: 0.5rem 0.75rem; border-radius: var(--radius-control); margin-bottom: 1rem; }
.footer-logo img { height: 2.25rem; width: auto; }

/* Menú móvil en pastillas: se muestra debajo del encabezado en pantallas menores de 1200 px. */
.nav-toggle { display: none; }
.mobile-strip {
  display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem var(--gutter-m, 1rem);
  padding: 0.4rem; background: #fff; border-radius: 999px; box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.18);
}
.mobile-strip__arrow {
  flex: 0 0 auto; width: 2.25rem; height: 2.25rem; border-radius: 999px; border: 0; background: transparent;
  color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-strip__arrow svg { width: 1.2rem; height: 1.2rem; }
.mobile-strip__arrow:hover { background: var(--color-surface-alt); }
.mobile-strip__list {
  list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0;
  display: flex; gap: 0.4rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
}
.mobile-strip__list::-webkit-scrollbar { display: none; }
.mobile-strip__list a {
  display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; scroll-snap-align: start;
  padding: 0.55rem 0.9rem; border-radius: 999px; text-decoration: none; color: var(--color-text-body);
  font-size: 0.85rem; font-weight: 600; background: transparent;
}
.mobile-strip__list a svg { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.mobile-strip__list a[aria-current="page"] { background: var(--color-action); color: #fff; }
@media (min-width: 1440px) { .mobile-strip { display: none; } }

/* Menú móvil dentro del pie de página (en celular). */
.site-footer .mobile-strip { margin: 0 0 1rem; }
.site-footer .mobile-strip__list { display: flex; flex-direction: row; gap: 0.4rem; margin: 0; }
.site-footer .mobile-strip__list a { color: var(--color-text-body); padding: 0.55rem 0.9rem; border: 0; }
.site-footer .mobile-strip__list a:hover { background: var(--color-surface-alt); color: var(--color-primary); text-decoration: none; }
.site-footer .mobile-strip__list a[aria-current="page"] { background: var(--color-action); color: #fff; }
.site-footer .mobile-strip__arrow { color: var(--color-primary); }

/* El logo no se encoge cuando el menú de escritorio ocupa el ancho del encabezado. */
.brand { flex: 0 0 auto; }
.brand img { flex: 0 0 auto; min-width: 9rem; }
.footer-call { margin: 0 0 2.5rem; width: 100%; }
@media (min-width: 1200px) { .footer-call { display: none; } }
.site-footer .footer-call { background: #fff; color: var(--color-primary); box-shadow: none; }
.site-footer .footer-call:hover { background: #e8f1ff; }

/* En celulares el menú queda fijo abajo de la pantalla en todo momento. */
@media (max-width: 1439px) {
  body { padding-bottom: 5.5rem; }
  .mobile-strip, .site-footer .mobile-strip {
    position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; top: auto;
    margin: 0; z-index: 60; box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.35);
  }
}

/* Entre 1440 y 1599 px el menú de escritorio ocupa menos espacio para que quepa el botón Cotizar. */
@media (min-width: 1440px) and (max-width: 1599px) {
  .site-nav a { padding: 0.5rem 0.5rem; font-size: 0.8rem; }
  .site-nav ul { gap: 0; }
}

/* Texto más pequeño en los menús. */
.mobile-strip__list a { font-size: 0.72rem; padding: 0.45rem 0.7rem; gap: 0.3rem; }
.mobile-strip__list a svg { width: 0.95rem; height: 0.95rem; }
.site-nav a { font-size: 0.78rem; }

/* El encabezado puede ser más ancho que el contenido: evita que el botón Cotizar se salga de la pantalla. */
.site-header__inner { max-width: 1480px; }
.site-header .site-nav ul { flex-wrap: nowrap; }
