/* ==========================================================================
   Atenciones Sanitarias (https://atencionessanitarias.com/)
   Clon Estático 1:1 Optimizado + Estándar UX Móvil Tier 1 (2026)
   ========================================================================== */

:root {
  --as-navy: #1a305b;
  --as-blue: #2c529d;
  --as-blue-active: #375baa;
  --as-cyan: #00aeef;
  --as-heading-gray: #505558;
  --as-body-gray: #4b5563;
  --as-table-text: #374151;
  --as-table-even: #e6e9ed;
  --as-table-odd: #dfe3e8;
  --as-border: #d1d5db;
  --as-white: #ffffff;
}

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

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

body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--as-body-gray);
  background-color: var(--as-white);
}

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

a {
  color: var(--as-cyan);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--as-blue);
}

/* ==========================================================================
   1. Cabecera Fija Unificada (Logo + Menú + CTA Email + Breadcrumb)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--as-white);
  box-shadow: 0 2px 12px rgba(26, 48, 91, 0.08);
}

.header-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  height: 76px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--as-navy);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 8px 4px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--as-cyan);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 10px;
}

.mobile-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background-color: var(--as-blue);
  color: var(--as-white) !important;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.mobile-menu-toggle {
  width: 48px;
  height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: var(--as-white);
  color: var(--as-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.mobile-menu-drawer {
  display: none;
  background: var(--as-white);
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 24px 18px;
}

.mobile-menu-drawer.open {
  display: block;
}

.mobile-menu-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-drawer li {
  border-bottom: 1px solid #f1f5f9;
}

.mobile-menu-drawer li:last-child {
  border-bottom: none;
}

.mobile-menu-drawer a {
  display: block;
  padding: 12px 4px;
  color: var(--as-navy);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Fila inferior de Breadcrumb truncada en 1 línea */
.breadcrumb-bar {
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.breadcrumb-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  color: #64748b;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
  width: 100%;
}

.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-list li.current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  color: var(--as-navy);
  font-weight: 500;
}

.breadcrumb-list a {
  color: var(--as-blue);
  font-weight: 500;
}

/* ==========================================================================
   2. Hero Banner ("UNIDAD DE TRÁFICOS - para que no te preocupes por nada.")
   ========================================================================== */

.hero-banner {
  position: relative;
  width: 100%;
  min-height: 440px;
  background-color: #0b1933;
  background-image: url('/assets/img/banner_as_v6.webp');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: flex-end;
}

.hero-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.hero-title {
  margin: 0;
  color: var(--as-cyan);
  font-size: 46px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-subtitle {
  margin: 6px 0 0;
  color: var(--as-white);
  font-size: 26px;
  line-height: 1.3;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   3. Secciones Generales y Tipografía
   ========================================================================== */

.section-block {
  padding: 72px 24px;
  scroll-margin-top: 132px;
}

.container-narrow {
  max-width: 960px;
  margin: 0 auto;
}

.container-wide {
  max-width: 1140px;
  margin: 0 auto;
}

.section-heading-h1,
.section-heading-h2 {
  margin: 0 0 32px;
  color: var(--as-blue);
  font-size: 34px;
  line-height: 1.28;
  font-weight: 600;
  text-align: center;
}

.section-heading-white {
  color: var(--as-white);
}

.intro-text {
  text-align: center;
  font-size: 16px;
  line-height: 1.75;
  color: var(--as-body-gray);
  margin: 0 auto 24px;
  max-width: 860px;
}

.email-highlight-link {
  color: var(--as-cyan);
  font-weight: 700;
  word-break: break-word;
}

.email-highlight-link:hover {
  color: var(--as-blue);
  text-decoration: underline;
}

/* ==========================================================================
   4. Sección Derechos del Lesionado (#derechos) y Ventajas
   ========================================================================== */

.section-derechos {
  background-color: var(--as-blue);
  background-image: url('/assets/img/bg_as2.webp');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--as-white);
  padding: 76px 24px 84px;
}

.section-ventajas {
  background-color: var(--as-navy);
  background-image: url('/assets/img/banner_inferior_as.webp');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--as-white);
  padding: 76px 24px 84px;
}

.styled-White-list {
  max-width: 880px;
  margin: 0 auto;
  padding-left: 22px;
  color: var(--as-white);
  font-size: 16px;
  line-height: 1.75;
}

.styled-White-list li {
  margin-bottom: 12px;
}

.styled-White-list strong,
.cyan-accent {
  color: var(--as-cyan);
  font-weight: 600;
}

/* ==========================================================================
   5. Unidad de Tráficos (#ofrecemos) - 2 Columnas
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  margin-top: 44px;
}

.service-card {
  display: flex;
  flex-direction: column;
}

.service-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.service-icon {
  width: 125px;
  height: 125px;
  object-fit: contain;
}

.service-title {
  margin: 0 0 22px;
  text-align: center;
  color: var(--as-blue);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.service-lead {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--as-body-gray);
}

.service-list {
  margin: 0;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--as-body-gray);
}

.service-list li {
  margin-bottom: 6px;
}

/* ==========================================================================
   6. ¿Para quién? - 4 Columnas (Conductor, Pasajero, Ciclista, Peatón)
   ========================================================================== */

.roles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.role-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.role-icon {
  width: 125px;
  height: 125px;
  object-fit: contain;
  margin-bottom: 22px;
}

.role-title {
  margin: 0;
  color: var(--as-blue);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 400;
  text-transform: uppercase;
}

/* ==========================================================================
   7. Nuestras Tarifas (#tarifas y /tarifas/)
   ========================================================================== */

.tarifas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.tarifa-column-title {
  margin: 0 0 18px;
  color: var(--as-blue);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 400;
  text-transform: uppercase;
}

.tarifa-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 4px;
}

.tarifa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.tarifa-table thead th {
  background-color: var(--as-blue);
  color: var(--as-white);
  font-weight: 500;
  padding: 12px 16px;
  text-align: center;
  border: 1px solid #244585;
}

.tarifa-table tbody td {
  padding: 10px 16px;
  text-align: center;
  color: var(--as-table-text);
  border: 1px solid #d5d9de;
  font-size: 15px;
  line-height: 1.45;
}

.tarifa-table tbody tr:nth-child(odd) td:first-child {
  background-color: var(--as-table-odd);
}

.tarifa-table tbody tr:nth-child(even) td:first-child {
  background-color: var(--as-table-even);
}

.tarifa-table tbody tr td:last-child {
  background-color: var(--as-white);
  font-weight: 500;
  white-space: nowrap;
  width: 130px;
}

.tarifa-footnote {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--as-body-gray);
}

/* ==========================================================================
   8. Mapa de España (+650 Clínicas) y Footer (#1a305b)
   ========================================================================== */

.spain-network-block {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.spain-map-icon {
  width: 125px;
  height: 125px;
  object-fit: contain;
  margin-bottom: 20px;
}

.spain-network-title {
  margin: 0;
  color: var(--as-blue);
  font-size: 23px;
  line-height: 1.35;
  font-weight: 400;
  text-transform: uppercase;
}

.site-footer {
  background-color: var(--as-navy);
  color: var(--as-white);
  padding: 48px 24px 36px;
  margin-top: 32px;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.footer-logo {
  width: 140px;
  height: auto;
  opacity: 0.95;
}

.footer-copy {
  margin: 0;
  font-size: 14px;
  color: var(--as-white);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  font-size: 14px;
}

.footer-legal-links a,
.footer-cookie-btn {
  color: #cbd5e1;
  font-size: 14px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.footer-legal-links a:hover,
.footer-cookie-btn:hover {
  color: var(--as-cyan);
  text-decoration: underline;
}

/* ==========================================================================
   9. Páginas Legales (/aviso-legal/, /politica-privacidad/, /politica-cookies/)
   ========================================================================== */

.legal-page-section {
  padding: 56px 24px 80px;
}

.legal-container {
  max-width: 880px;
  margin: 0 auto;
  background: var(--as-white);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 44px 40px;
  box-shadow: 0 4px 20px rgba(26, 48, 91, 0.05);
}

.legal-container h1 {
  color: var(--as-navy);
  font-size: 30px;
  line-height: 1.3;
  margin: 0 0 20px;
}

.legal-container h2 {
  color: var(--as-blue);
  font-size: 20px;
  line-height: 1.35;
  margin: 32px 0 12px;
}

.legal-container p,
.legal-container li {
  font-size: 16px;
  line-height: 1.75;
  color: var(--as-body-gray);
}

.legal-meta-box {
  background: #f8fafc;
  border-left: 4px solid var(--as-cyan);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0 28px;
}

.legal-meta-box p {
  margin: 4px 0;
  font-size: 15px;
}

/* ==========================================================================
   10. Banner de Cookies con Persistencia Asimétrica (CookieFirst Pro Style)
   ========================================================================== */

.as-cookie-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(3px);
  z-index: 9998;
  display: none;
}

.as-cookie-backdrop.visible {
  display: block;
}

.as-cookie-modal {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 680px;
  background: var(--as-white);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  border: 1px solid #e2e8f0;
  padding: 24px 28px;
  z-index: 9999;
  display: none;
}

.as-cookie-modal.visible {
  display: block;
}

.as-cookie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.as-cookie-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--as-navy);
}

.as-cookie-text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--as-body-gray);
}

.as-cookie-settings-panel {
  display: none;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.as-cookie-settings-panel.open {
  display: block;
}

.as-cookie-Category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.as-cookie-Category:last-child {
  border-bottom: none;
}

.as-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.as-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.as-btn-primary {
  background: var(--as-blue);
  color: var(--as-white);
}

.as-btn-primary:hover {
  background: var(--as-navy);
}

.as-btn-secondary {
  background: #f1f5f9;
  color: var(--as-navy);
  border-color: #cbd5e1;
}

.as-btn-secondary:hover {
  background: #e2e8f0;
}

.as-btn-outline {
  background: transparent;
  color: #475569;
  border-color: #cbd5e1;
}

.as-cookie-pill {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9990;
  background: var(--as-navy);
  color: var(--as-white);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(26, 48, 91, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 8px;
}

.as-cookie-pill.visible {
  display: inline-flex;
}

/* ==========================================================================
   11. Responsive Mobile Tier 1 (320px - 991px)
   ========================================================================== */

@media (max-width: 991px) {
  .main-nav {
    display: none;
  }

  .header-actions {
    display: inline-flex;
  }

  .header-main {
    height: 78px;
    padding: 0 16px;
  }

  .brand-logo {
    height: 58px;
  }

  .hero-banner {
    min-height: 280px;
  }

  .hero-container {
    padding: 32px 16px 28px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .section-block {
    padding: 48px 16px;
  }

  .section-heading-h1,
  .section-heading-h2 {
    font-size: 26px;
    margin-bottom: 24px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .roles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }

  .tarifas-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  /* Garantía de legibilidad móvil >= 14px en tablas (nunca 11px como en WP antiguo) */
  .tarifa-table thead th,
  .tarifa-table tbody td {
    font-size: 14px;
    padding: 10px 12px;
  }

  .tarifa-table tbody tr td:last-child {
    width: 105px;
  }

  .legal-container {
    padding: 28px 20px;
  }

  .as-cookie-modal {
    bottom: 12px;
    padding: 20px 18px;
  }

  .as-cookie-actions {
    flex-direction: column;
  }

  .as-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .roles-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
