/*
 * Atención a asegurados · atencion-asegurados.php
 * Carga después de css/tokens/surexs-tokens.css y docs/designsystem_landings_surexs/shared/surexs-landings.css.
 * Prefijo de página: aa- (BEM). No redefine .sx-button, .sx-card ni .sx-heading-*.
 * Hero, eyebrow, ilustración y banner son copias aisladas de css/cambio-de-broker.css (prefijo cb-).
 */

/* ==========================================================
   PÁGINA Y TOKENS LOCALES (design.md 5.8)
========================================================== */

.atencion-asegurados-page {
  --aa-border: var(--celestesurexs, #a8d5ff);
  --aa-surface-soft: var(--azulsurexsl6, #f6fbff);
  --aa-shadow: var(--sombracard, 0 10px 35px rgba(0, 119, 188, .08));
  --aa-shadow-hover: var(--sombracardhover, 0 18px 45px rgba(0, 119, 188, .2));
  --aa-ease: var(--easesurexs, cubic-bezier(.22, 1, .36, 1));
  margin: 0;
  color: var(--sx-color-text);
  background: var(--sx-color-white);
  font-family: var(--sx-font-body);
}

.atencion-asegurados-page main {
  overflow: clip;
}

html {
  scroll-behavior: smooth;
}

/* ==========================================================
   ELEMENTOS COMPARTIDOS
========================================================== */

/* Eyebrow canónico (design.md 6.1) con icono por máscara */
.aa-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.15rem;
  padding: .48rem 1.3rem;
  border: 1px solid var(--sx-color-blue-200);
  border-radius: var(--sx-radius-pill);
  background: var(--sx-color-blue-100);
  color: var(--sx-color-blue-700);
  font-family: var(--sx-font-heading);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .06rem;
  text-transform: uppercase;
}

.aa-eyebrow::before {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  background: currentColor;
  content: "";
  -webkit-mask: var(--icon-url, url("../img/iconos/sistema/negro/target-05.svg")) center / contain no-repeat;
  mask: var(--icon-url, url("../img/iconos/sistema/negro/target-05.svg")) center / contain no-repeat;
}

.aa-eyebrow--inverse {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .1);
  color: color-mix(in srgb, var(--sx-color-white) 86%, var(--sx-color-blue-100));
  backdrop-filter: blur(.45rem);
}

/* Título de sección (design.md 6.2) */
.aa-title {
  margin: 0 0 1.2rem;
  color: var(--sx-color-blue-700);
  font-family: var(--sx-font-heading);
  font-size: var(--sx-type-section);
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}

.aa-title strong {
  color: var(--sx-color-blue-600);
  font-weight: 700;
}

.aa-title--inverse,
.aa-title--inverse strong {
  color: var(--sx-color-white);
}

/* Descripción de sección (design.md 6.3) */
.aa-description {
  max-width: 49rem;
  margin: 0 auto;
  color: var(--sx-color-blue-800);
  font-size: clamp(1rem, 1.4vw, 1.05rem);
  line-height: 1.68;
}

/* Encabezado de sección centrado (design.md 7.2) */
.aa-section-header {
  max-width: 55rem;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.aa-section-header .aa-title {
  max-width: 28ch;
  margin-inline: auto;
}

.aa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.aa-actions--center {
  justify-content: center;
  margin-top: 3rem;
}

/* Icono claro por máscara (design.md 9.1) */
.aa-icon {
  display: inline-flex;
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: .7rem;
  background: linear-gradient(145deg, #e7f4ff, #cfe8ff);
  color: var(--sx-color-blue-600);
  transition: transform .3s ease;
}

.aa-icon::before {
  width: 1.55rem;
  height: 1.55rem;
  background: currentColor;
  content: "";
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

/* Card canónica clara (design.md 8.1) */
.aa-card {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem;
  border: 2px solid var(--aa-border);
  border-radius: 28px;
  background: var(--sx-color-white);
  box-shadow: var(--aa-shadow);
  transition: transform .35s var(--aa-ease), border-color .35s var(--aa-ease), box-shadow .35s var(--aa-ease);
}

.aa-card:hover {
  border-color: var(--sx-color-blue-600);
  box-shadow: var(--aa-shadow-hover);
  transform: translateY(-.35rem);
}

.aa-card:hover .aa-icon {
  transform: scale(1.06);
}

.aa-card__title {
  margin: 1.25rem 0 .5rem;
  color: var(--sx-color-blue-700);
  font-family: var(--sx-font-heading);
  font-size: clamp(1.2rem, 1.6vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
}

.aa-card__text {
  margin: 0;
  color: var(--sx-color-blue-800);
  font-size: .9rem;
  line-height: 1.6;
}

/* Link de texto (design.md 10) */
.aa-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .65rem;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--sx-color-blue-600);
  font-family: var(--sx-font-heading);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .3s ease;
}

.aa-link img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  transition: transform .3s ease;
}

.aa-link:hover {
  color: var(--sx-color-blue-900);
}

.aa-card:hover .aa-link img,
.aa-link:hover img {
  transform: translateX(5px);
}

.aa-link:focus-visible {
  outline: 3px solid rgba(0, 119, 188, .35);
  outline-offset: 3px;
}

/* Ilustración con fondo transparente: hover con destello recortado a la silueta (11.17) */
.aa-art {
  position: relative;
  filter: drop-shadow(0 1.5rem 2.5rem rgba(20, 33, 53, .22));
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}

.aa-art__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.aa-art__shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask: var(--aa-art) center / contain no-repeat;
  mask: var(--aa-art) center / contain no-repeat;
}

.aa-art__shine::after {
  position: absolute;
  inset: -35% auto -35% -55%;
  width: 36%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  content: "";
  opacity: 0;
  transform: skewX(-18deg) translateX(0);
}

.aa-art:hover {
  transform: translateY(-.35rem) scale(1.035);
  filter: drop-shadow(0 2.25rem 3rem rgba(0, 49, 94, .32)) saturate(1.04) contrast(1.02);
}

.aa-art:hover .aa-art__shine::after {
  animation: aa-shine .9s ease-out both;
}

@keyframes aa-shine {
  0% { opacity: 0; transform: skewX(-18deg) translateX(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: skewX(-18deg) translateX(480%); }
}

/* ==========================================================
   1. HERO (design.md 11.17)
========================================================== */

.aa-hero {
  position: relative;
  isolation: isolate;
  padding: 7rem 0;
  overflow: hidden;
  color: var(--sx-color-white);
  background:
    radial-gradient(circle at 42% 24%, color-mix(in srgb, var(--sx-color-blue-400) 24%, transparent), transparent 12rem),
    linear-gradient(135deg, var(--sx-color-blue-600), var(--sx-color-blue-700));
}

.aa-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .14;
  background: radial-gradient(circle, color-mix(in srgb, var(--sx-color-aqua-200) 12%, transparent) 0 1px, transparent 1px);
  background-size: 4.8rem 4.8rem;
  content: "";
  pointer-events: none;
}

.aa-hero__bg {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aa-hero__aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(5rem);
  will-change: transform;
}

.aa-hero__aurora--aqua {
  bottom: -14rem;
  left: 8%;
  width: 46rem;
  height: 30rem;
  background: rgba(0, 194, 206, .3);
  animation: aa-aurora-a 24s ease-in-out infinite alternate;
}

.aa-hero__aurora--sky {
  top: -8rem;
  right: 4%;
  width: 42rem;
  height: 32rem;
  background: rgba(83, 160, 213, .42);
  animation: aa-aurora-b 28s ease-in-out infinite alternate;
}

.aa-hero__aurora--deep {
  top: 30%;
  left: -12rem;
  width: 36rem;
  height: 36rem;
  background: rgba(20, 33, 53, .32);
  animation: aa-aurora-c 32s ease-in-out infinite alternate;
}

.aa-hero__spotlight {
  --aa-spot-size: 48rem;
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(170, 236, 240, .7) 0 1.4px, transparent 1.6px);
  background-size: 2.4rem 2.4rem;
  -webkit-mask: radial-gradient(circle, #000 0, rgba(0, 0, 0, .55) 30%, transparent 62%) no-repeat;
  mask: radial-gradient(circle, #000 0, rgba(0, 0, 0, .55) 30%, transparent 62%) no-repeat;
  -webkit-mask-size: var(--aa-spot-size) var(--aa-spot-size);
  mask-size: var(--aa-spot-size) var(--aa-spot-size);
  animation: aa-spotlight 26s ease-in-out infinite;
}

.aa-hero.is-spot-interactive .aa-hero__spotlight {
  -webkit-mask-position: calc(var(--aa-spot-x, 50%) - var(--aa-spot-size) / 2) calc(var(--aa-spot-y, 50%) - var(--aa-spot-size) / 2);
  mask-position: calc(var(--aa-spot-x, 50%) - var(--aa-spot-size) / 2) calc(var(--aa-spot-y, 50%) - var(--aa-spot-size) / 2);
  animation: none;
}

.aa-hero__circle {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  animation: aa-breathe 12s ease-in-out infinite;
}

.aa-hero__circle--ring {
  top: -10rem;
  right: -8rem;
  width: 26rem;
  height: 26rem;
  border: 1px solid rgba(255, 255, 255, .16);
}

.aa-hero__circle--fill {
  bottom: -7rem;
  left: -6rem;
  width: 18rem;
  height: 18rem;
  background: rgba(118, 221, 227, .1);
  animation-delay: -6s;
}

.aa-hero__grid {
  display: grid;
  max-width: 71.25rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(3rem, 6vw, 4.5rem);
}

.aa-hero__grid > * {
  min-width: 0;
}

.aa-hero__eyebrow {
  margin-bottom: 1.25rem;
  font-size: .87rem;
  font-weight: 400;
}

.aa-hero__title {
  max-width: 40rem;
  margin: 0 0 1.25rem;
  color: var(--sx-color-aqua-200);
  font-family: var(--sx-font-heading);
  font-size: var(--sx-type-hero);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .075rem;
  text-wrap: balance;
}

.aa-hero__title span {
  color: var(--sx-color-white);
  font-weight: 600;
}

.aa-hero__highlight {
  display: flex;
  max-width: 38rem;
  align-items: flex-start;
  gap: .65rem;
  margin: 0 0 1rem;
}

.aa-hero__highlight img {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 1.35rem;
  margin-top: .05rem;
  object-fit: contain;
}

.aa-hero__highlight p {
  margin: 0;
  color: var(--sx-color-white);
  font-family: var(--sx-font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.42;
  text-wrap: pretty;
}

.aa-hero__description {
  max-width: 40rem;
  margin: 0;
  color: color-mix(in srgb, var(--sx-color-white) 88%, var(--sx-color-blue-100));
  font-size: .98rem;
  line-height: 1.55;
}

.aa-hero__description strong {
  color: var(--sx-color-white);
  font-weight: 600;
}

.aa-hero .sx-button {
  min-height: 2.85rem;
  gap: .5rem;
  padding: .375rem 1rem;
  border-width: 1.5px;
}

.aa-hero__visual {
  position: relative;
  width: min(100%, 28rem);
  margin: 0;
  padding-bottom: 2.5rem;
  justify-self: center;
}

/* Card de microcopy que flota sobre la esquina inferior izquierda (11.17) */
.aa-hero__note {
  position: absolute;
  bottom: 0;
  left: -1.75rem;
  display: flex;
  max-width: 22.5rem;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--sx-color-blue-100);
  border-radius: var(--sx-radius-md);
  background: var(--sx-color-white);
  box-shadow: 0 1.1rem 2.4rem rgba(20, 33, 53, .18);
}

.aa-hero__note-icon {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--amarillol3, #fffaf1);
  color: var(--amarillod1, #bc8d26);
}

.aa-hero__note-icon::before {
  width: 1.5rem;
  height: 1.5rem;
  background: currentColor;
  content: "";
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

.aa-hero__note p {
  margin: 0;
  color: var(--sx-color-blue-800);
  font-size: .875rem;
  line-height: 1.45;
}

.aa-hero__note strong {
  color: var(--sx-color-blue-700);
  font-weight: 700;
}

@keyframes aa-aurora-a {
  to { transform: translate(18rem, -6rem) scale(1.15); }
}

@keyframes aa-aurora-b {
  to { transform: translate(-16rem, 8rem) scale(.9); }
}

@keyframes aa-aurora-c {
  to { transform: translate(10rem, -10rem) scale(1.1); }
}

@keyframes aa-spotlight {
  0%, 100% { -webkit-mask-position: 8% 20%; mask-position: 8% 20%; }
  25% { -webkit-mask-position: 70% 8%; mask-position: 70% 8%; }
  50% { -webkit-mask-position: 95% 75%; mask-position: 95% 75%; }
  75% { -webkit-mask-position: 30% 95%; mask-position: 30% 95%; }
}

@keyframes aa-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ==========================================================
   2. LO QUE PUEDES RESOLVER POR WHATSAPP (design.md 11.1)
========================================================== */

.aa-tasks {
  background: var(--sx-color-white);
}

.aa-tasks__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-tasks__item {
  min-width: 0;
}

/* ==========================================================
   3. CANALES DE CONTACTO
========================================================== */

.aa-channels {
  background: var(--aa-surface-soft);
}

.aa-channels__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-channels__grid > li {
  min-width: 0;
}

/* ==========================================================
   4. CTA FINAL: DESCARGA AMMIA (banner, design.md 11.24)
========================================================== */

.aa-banner {
  padding: 0 0 var(--sx-space-section);
  background: linear-gradient(180deg, var(--aa-surface-soft) 50%, var(--sx-color-white) 50%);
  scroll-margin-top: 5rem;
}

.aa-channels {
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
}

.aa-banner__card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.75rem);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 32px;
  background:
    radial-gradient(circle at 85% 20%, rgba(118, 221, 227, .22), transparent 16rem),
    linear-gradient(135deg, var(--sx-color-blue-600), var(--sx-color-blue-700));
  box-shadow: 0 18px 45px rgba(0, 82, 144, .16);
  color: var(--sx-color-white);
}

/* Textura de puntos aqua al 14 % */
.aa-banner__card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .14;
  background: radial-gradient(circle, color-mix(in srgb, var(--sx-color-aqua-200) 12%, transparent) 0 1px, transparent 1px);
  background-size: 4.8rem 4.8rem;
  content: "";
  pointer-events: none;
}

.aa-banner__card > * {
  min-width: 0;
}

/* Círculos decorativos estáticos: grande delineado, mediano aqua y pequeño blanco */
.aa-banner__decor {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.aa-banner__decor--ring {
  top: -8rem;
  right: -7rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(255, 255, 255, .18);
}

.aa-banner__decor--aqua {
  right: 18%;
  bottom: -5rem;
  width: 13rem;
  height: 13rem;
  background: rgba(118, 221, 227, .11);
}

.aa-banner__decor--white {
  top: 1.5rem;
  left: 48%;
  width: 6rem;
  height: 6rem;
  background: rgba(255, 255, 255, .1);
}

.aa-banner__copy .aa-title {
  max-width: 32rem;
}

.aa-banner__description {
  max-width: 34rem;
  margin: 0;
  color: color-mix(in srgb, var(--sx-color-white) 88%, var(--sx-color-blue-100));
  font-size: 1rem;
  line-height: 1.7;
}

.aa-banner__description strong {
  color: var(--sx-color-white);
  font-weight: 600;
}

.aa-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

.aa-stores a {
  display: inline-flex;
  border-radius: .6rem;
  transition: transform .3s var(--aa-ease);
}

.aa-stores a:hover {
  transform: translateY(-2px);
}

.aa-stores a:focus-visible {
  outline: 3px solid var(--sx-color-focus);
  outline-offset: 4px;
}

.aa-stores img {
  display: block;
  width: auto;
  height: 2.75rem;
}

.aa-banner__media {
  width: min(100%, 22rem);
  justify-self: center;
}

/* ==========================================================
   APARICIÓN CON SCROLL (design.md 14.2)
========================================================== */

.is-reveal-ready .atencion-asegurados-page [data-reveal] {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity .6s var(--aa-ease) var(--reveal-delay, 0ms),
    transform .6s var(--aa-ease) var(--reveal-delay, 0ms);
}

.is-reveal-ready .atencion-asegurados-page [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   RESPONSIVE (design.md 15.1)
========================================================== */

@media (max-width: 1199.98px) {
  .aa-hero {
    padding: 5.5rem 0;
  }

  .aa-hero__note {
    left: -1rem;
  }
}

@media (max-width: 991.98px) {
  .aa-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3.5rem;
  }

  .aa-hero__content {
    max-width: 49rem;
  }

  .aa-hero__note {
    left: 1.5rem;
  }

  .aa-tasks__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aa-channels__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 40rem;
    margin-inline: auto;
  }

  .aa-banner__card {
    grid-template-columns: minmax(0, 1fr);
  }

  .aa-banner__media {
    width: min(100%, 18rem);
  }
}

@media (max-width: 767.98px) {
  .aa-hero {
    padding: 4.25rem 0;
  }

  .aa-hero__eyebrow {
    font-size: .76rem;
  }

  .aa-hero__highlight p,
  .aa-hero__description {
    font-size: .92rem;
  }

  .aa-actions {
    flex-direction: column;
  }

  .aa-actions .sx-button {
    width: 100%;
    padding: 12px 20px;
    border-radius: 1rem;
  }

  .aa-eyebrow {
    padding-inline: 1rem;
    line-height: 1.3;
  }

  .aa-hero__visual {
    padding-bottom: 0;
  }

  /* El microcopy deja de flotar y se monta sobre el borde inferior del visual */
  .aa-hero__note {
    position: relative;
    bottom: auto;
    left: auto;
    max-width: none;
    margin: -1.5rem .75rem 0;
  }

  .aa-tasks__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .aa-card {
    padding: 1.5rem;
    border-radius: 24px;
  }

  .aa-banner__card {
    border-radius: 24px;
  }

  .aa-banner__decor--ring {
    width: 15rem;
    height: 15rem;
  }

  .aa-banner__decor--aqua {
    width: 9rem;
    height: 9rem;
  }
}

/* ==========================================================
   MOVIMIENTO REDUCIDO (design.md 14.3)
========================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .aa-hero__aurora,
  .aa-hero__spotlight,
  .aa-hero__circle {
    animation: none;
  }

  .aa-card,
  .aa-icon,
  .aa-art,
  .aa-link img,
  .aa-stores a {
    transition: none;
  }

  .aa-card:hover,
  .aa-card:hover .aa-icon,
  .aa-art:hover,
  .aa-card:hover .aa-link img,
  .aa-link:hover img,
  .aa-stores a:hover {
    transform: none;
  }

  .aa-art:hover .aa-art__shine::after {
    animation: none;
  }

  .is-reveal-ready .atencion-asegurados-page [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media print {
  .aa-hero__bg {
    display: none;
  }
}
