/* =========================
   PÁGINA 404 — todo en rem
   (se adapta solo a la escala 125% / 150%)
========================= */

/* ---------- Banda separadora (como el hero de servicios) ---------- */
.banda-404 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1.5rem 1rem 2.4rem;
  color: #fff;
  background:
    radial-gradient(28rem 12rem at 92% 130%, rgba(253, 222, 17, .26), transparent 70%),
    linear-gradient(105deg, #061f3d 0%, #0b3c74 55%, #1456a6 100%);
}
.banda-404::before {                    /* cuadrícula sutil que se desvanece */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 65%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 65%);
}
.banda-404::after {                     /* línea amarilla inferior */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primario, rgb(253, 222, 17)) 0%, var(--color-primario, rgb(253, 222, 17)) 40%, transparent 100%);
}

.banda-404__in { max-width: 68rem; margin-inline: auto; }

.migas-404 ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: .35rem .9rem;
  list-style: none;
  font-size: .8rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(6px);
}
.migas-404 li { display: flex; align-items: center; gap: .5rem; color: rgba(255, 255, 255, .72); }
.migas-404 li + li::before { content: "/"; color: rgba(255, 255, 255, .3); }
.migas-404 li[aria-current="page"] { color: var(--color-primario, rgb(253, 222, 17)); font-weight: 600; }
.migas-404 a { color: #fff; text-decoration: none; transition: color .25s ease; }
.migas-404 a:hover { color: var(--color-primario, rgb(253, 222, 17)); }

.banda-404__num {                       /* "404" de marca de agua */
  position: absolute;
  right: max(1rem, calc((100% - 68rem) / 2));
  bottom: -1.6rem;
  z-index: -1;
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, .14);
  pointer-events: none;
  user-select: none;
}

/* ---------- Sección principal ---------- */
.section-404 {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 3.5rem 1rem 4.5rem;
  overflow-x: clip;
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
}

.pagina-404 {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 68rem;
  margin-inline: auto;
}

/* ---------- Texto ---------- */
.contenido-404 > * { animation: subir404 .7s cubic-bezier(.22, .61, .36, 1) both; }
.contenido-404 > :nth-child(2) { animation-delay: .08s; }
.contenido-404 > :nth-child(3) { animation-delay: .16s; }
.contenido-404 > :nth-child(4) { animation-delay: .24s; }
.contenido-404 > :nth-child(5) { animation-delay: .32s; }

.eyebrow-404 {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-secundario);
}
.eyebrow-404::before {
  content: "";
  width: 1.75rem;
  height: 3px;
  border-radius: 3px;
  background: var(--color-primario, rgb(253, 222, 17));
}

.section-404 h1 {
  margin: .85rem 0 .9rem;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--color-secundario);
  text-wrap: balance;
}

.text-404 {
  max-width: 30rem;
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #5f6b7a;
}

/* ---------- Botones ---------- */
.acciones-404 { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn-404 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3rem;
  padding: .7rem 1.75rem;
  border: 2px solid var(--color-secundario);
  border-radius: 999px;
  background: var(--color-secundario);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}
.btn-404:hover {
  color: #fff;
  transform: translateY(-3px);
  background: #5a5a5a;
  border-color: #5a5a5a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}
.btn-404 i { font-size: 1rem; transition: transform .3s ease; }
.btn-404:hover i { transform: scale(1.15) rotate(-8deg); }

.btn-404--contorno {
  background: transparent;
  color: var(--color-secundario);
  box-shadow: none;
}
.btn-404--contorno:hover {
  background: var(--color-primario, rgb(253, 222, 17));
  border-color: var(--color-primario, rgb(253, 222, 17));
  color: #1e293b;
  box-shadow: 0 10px 24px rgba(253, 222, 17, .35);
}

/* ---------- Divisor + accesos rápidos ---------- */
.enlaces-404 {
  margin-top: 1.9rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e3e9f1;
}
.enlaces-404__titulo {
  display: block;
  margin-bottom: .7rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8793a4;
}
.enlaces-404 ul { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.enlaces-404 a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .95rem;
  border: 1px solid #e3e9f1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.enlaces-404 a i { font-size: .85rem; color: var(--color-secundario); }
.enlaces-404 a:hover {
  transform: translateY(-2px);
  border-color: var(--color-primario, rgb(253, 222, 17));
  color: var(--color-secundario);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}

/* ---------- Imagen en tarjeta con marco amarillo ---------- */
.img-wrap-404 {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #e6ebf2;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #f7f9fc, #eef2f8);
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, .08);
  animation: subir404 .8s cubic-bezier(.22, .61, .36, 1) .12s both;
}
.img-wrap-404::before {                 /* marco amarillo desplazado */
  content: "";
  position: absolute;
  inset: .7rem -.7rem -.7rem .7rem;
  z-index: -1;
  border: 2px solid var(--color-primario, rgb(253, 222, 17));
  border-radius: 1.5rem;
}

.img-404 {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 20rem;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;             /* funde el fondo blanco del .jpg con la tarjeta */
  transition: transform .5s ease;
}
.img-wrap-404:hover .img-404 { transform: scale(1.03); }

@keyframes subir404 {
  from { opacity: 0; transform: translateY(1rem); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================
   TABLET
========================= */
@media (max-width: 992px) {
  .section-404 { min-height: 55vh; padding: 2.5rem 1rem 3.5rem; }
  .pagina-404 { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .img-wrap-404 { order: -1; width: min(100%, 26rem); margin-inline: auto; }
  .img-404 { max-height: 15rem; }
  .eyebrow-404 { justify-content: center; }
  .text-404 { margin-inline: auto; }
  .acciones-404, .enlaces-404 ul { justify-content: center; }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 480px) {
  .banda-404 { padding: 1.1rem 1.25rem 1.8rem; }
  .section-404 { padding: 2rem 1.25rem 3rem; }
  .img-404 { max-height: 11.5rem; }
  .img-wrap-404::before { inset: .5rem -.5rem -.5rem .5rem; }
  .acciones-404 { flex-direction: column; }
  .btn-404 { width: 100%; }
}

/* Sin animaciones para quien lo prefiera */
@media (prefers-reduced-motion: reduce) {
  .contenido-404 > *, .img-wrap-404 { animation: none; }
  .btn-404, .btn-404 i, .img-404, .enlaces-404 a { transition: none; }
}