body {
  overflow-x: hidden;
}

:root {
  --bg: #0b1220;
  --bg2: #0f1b33;
  --text: #0b1220;
  --muted: #5b6576;
  --white: #fff;
  --card: rgba(255, 255, 255, .08);
  --stroke: rgba(255, 255, 255, .14);
  --stroke2: rgba(15, 23, 42, .10);
  --accent: #e11d2e;
  /* rojo marca */
  --shadow: 0 18px 55px rgba(0, 0, 0, .22);
  --radius: 18px;
  --container: 1120px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: #0b1220;
  background: #fff;
}

.container {
  width: 100%;
  max-width: 1400px;
  /* más ancho */
  margin: 0 auto;
  padding: 0 40px;
  /* aire lateral */
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;

  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text small {
  color: #6b7280;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #0b1220;
  margin: 7px 10px;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.nav-links a,
.dropdown-btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #0b1220;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .2px;
}

.nav-links a:hover,
.dropdown-btn:hover {
  background: rgba(0, 0, 0, .05);
}

.dropdown {
  position: relative;
}

.dropdown-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-menu {
  position: absolute;
  top: 52px;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  font-weight: 700;
  border-radius: 12px;
}

.dropdown-menu a:hover {
  background: rgba(0, 0, 0, .05);
}

/* BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(225, 29, 46, .25);
}

.btn-primary:hover {
  filter: brightness(.98);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, .10);
  color: #fff;
  border-color: rgba(255, 255, 255, .20);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .14);
}

.btn-outline {
  background: #fff;
  border-color: rgba(0, 0, 0, .10);
}

.btn-outline:hover {
  background: rgba(0, 0, 0, .04);
}

.btn,
.card,
.metric,
.media-card {
  transition: .2s ease;
}

/* =========================
   HERO + OVERLAP PRO
========================= */
.hero {
  position: relative;
  color: #fff;
  padding: 64px 0 170px;
  /* ✅ ya incluye el espacio para el overlap */
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 400px at 20% 20%, rgba(225, 29, 46, .38), transparent 60%),
    radial-gradient(900px 500px at 80% 40%, rgba(2, 132, 199, .20), transparent 60%),
    linear-gradient(120deg, #0b1220, #071021);
}

/* ✅ Fade suave hacia blanco sin tapar contenido */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, .9) 60%,
      rgba(255, 255, 255, 1) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-grid {
  position: relative;
  z-index: 2;
  /* ✅ arriba del fade */
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items: center;
  /* ✅ balance visual */
}

.pill {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .14);
  font-weight: 700;
  font-size: 13px;
  color: rgba(255, 255, 255, .92);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02;
  margin: 0 0 14px;
  letter-spacing: -1px;
}

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
  max-width: 55ch;
  margin: 0 0 22px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  padding: 14px 14px;
}

.metric strong {
  display: block;
  font-size: 16px;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .75);
  font-weight: 600;
  font-size: 13px;
}

.hero-card {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}

.hero-card h3 {
  margin: 0 0 8px;
}

.hero-card p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .80);
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, .82);
  font-weight: 600;
}

/* ===== HERO CENTRADO ===== */

.hero-center {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;
  /* centra horizontal */
  text-align: center;
  /* centra texto */

  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* título */
.hero-center h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -1.2px;
}

/* párrafo */
.hero-center .lead {
  margin: 0 0 26px;
  max-width: 680px;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .82);
}

/* botones centrados */
.hero-center .hero-cta {
  justify-content: center;
}

/* métricas centradas */
.hero-center .hero-metrics {
  margin-top: 28px;
  max-width: 820px;
}

/* =========================
   SECCIONES
========================= */
.section {
  padding: 80px 0;
  background: #fff;
}

.section-alt {
  background: #f6f7fb;
  border-top: 1px solid rgba(15, 23, 42, .06);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.section-head {
  text-align: center;
  margin-bottom: 34px;
}

.kicker {
  display: inline-block;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 36px;
  letter-spacing: -.6px;
}

.subtitle {
  margin: 0 auto;
  max-width: 72ch;
  color: #475569;
  font-weight: 600;
  line-height: 1.7;
}

/* =========================
   NOSOTROS (PANEL MONTADO)
========================= */
.about-dark {
  position: relative;
  z-index: 3;
  margin-top: -90px;
  background: #fff;
  border-top-left-radius: 42px;
  border-top-right-radius: 42px;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .12);
  padding-top: 70px;
  width: 100%;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: start;
}

.highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}

.highlight {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .04);
}

.highlight h4 {
  margin: 0 0 6px;
}

.highlight p {
  margin: 0;
  color: #475569;
  font-weight: 600;
  line-height: 1.6;
}

.media-card {
  background: linear-gradient(180deg, #ffffff, #f7f8ff);
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .06);
}

.media-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(225, 29, 46, .10);
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 12px;
}

.media-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.media-stats div {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.media-stats strong {
  display: block;
}

.media-stats span {
  display: block;
  color: #64748b;
  font-weight: 700;
  font-size: 13px;
  margin-top: 4px;
}

/* =========================
   CARDS 3
========================= */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.card {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, .10);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .05);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .10);
  border-color: rgba(15, 23, 42, .12);
}

.card-img {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
}

.card-body p {
  margin: 0 0 12px;
  color: #475569;
  font-weight: 600;
  line-height: 1.6;
}

.card-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 900;
}

.card-link:hover {
  text-decoration: underline;
}

/* POR QUÉ */
.reasons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.reason {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .04);
}

.icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(225, 29, 46, .12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.reason h3 {
  margin: 0 0 6px;
}

.reason p {
  margin: 0;
  color: #475569;
  font-weight: 600;
  line-height: 1.6;
}

/* WhatsApp flotante */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .18);
  z-index: 60;
}

.wa-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .container {
    padding: 0 18px;
  }

  /* ✅ mejor en móvil */

  .hero {
    padding: 54px 0 120px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .about-dark {
    margin-top: -40px;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding-top: 42px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

  .reasons {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    right: 16px;
    left: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .10);
    border-radius: 18px;
    padding: 12px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .dropdown-menu {
    position: relative;
    top: auto;
    left: auto;
    box-shadow: none;
  }
}

/* ===== Partículas (canvas) ===== */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* encima del bg */
  pointer-events: none;
  opacity: .55;
}

.hero .container,
.hero .hero-center,
.hero .hero-grid {
  position: relative;
  z-index: 2;
  /* contenido arriba del canvas */
}


/* CONTACTO */
.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 22px;
  align-items: start;
}

.contact-box {
  margin-top: 14px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .04);
}

.form {
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .05);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  margin-bottom: 12px;
}

label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, .12);
  outline: none;
  font-family: var(--font);
}

input:focus,
textarea:focus {
  border-color: rgba(225, 29, 46, .45);
  box-shadow: 0 0 0 4px rgba(225, 29, 46, .10);
}

.form-status {
  margin: 10px 0 0;
  font-weight: 800;
}

/* FOOTER */
.footer {
  border-top: 1px solid rgba(15, 23, 42, .08);
  padding: 26px 0;
  background: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-weight: 700;
}

.footer a {
  color: #0b1220;
  text-decoration: none;
  font-weight: 900;
}

.footer a:hover {
  text-decoration: underline;
}

/* ===== CONTACTO estilo HERO ===== */
.contact-hero {
  position: relative;
  color: #fff;
  padding: 90px 0;
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(850px 420px at 18% 30%, rgba(225, 29, 46, .30), transparent 60%),
    radial-gradient(900px 520px at 85% 55%, rgba(2, 132, 199, .18), transparent 60%),
    linear-gradient(120deg, #0b1220, #071021);
}

/* grano sutil (igual vibe que hero) */
.contact-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  opacity: .14;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.contact-wrap {
  position: relative;
  z-index: 2;
}

.contact-head {
  text-align: center;
  margin-bottom: 28px;
}

.contact-head h2 {
  color: rgba(255, 255, 255, .96);
}

.contact-head .subtitle {
  color: rgba(255, 255, 255, .78);
  max-width: 70ch;
}

/* grid */
.contact-grid-dark {
  align-items: stretch;
}

/* Panel glass */
.contact-panel,
.form-dark {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .22);
}

/* panel izq */
.contact-panel {
  padding: 22px;
}

.contact-panel-top h3 {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, .95);
}

.contact-panel-top p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, .75);
  line-height: 1.6;
}

/* items */
.contact-items {
  display: grid;
  gap: 12px;
}

.contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .10);
}

.contact-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .10);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item strong {
  display: block;
  color: rgba(255, 255, 255, .92);
}

.contact-item span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, .72);
  font-weight: 600;
  font-size: 13px;
}

/* nota */
.contact-note {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, .20);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .78);
  font-weight: 700;
}

/* form glass */
.form-dark {
  padding: 22px;
}

/* inputs en dark */
.form-dark label {
  color: rgba(255, 255, 255, .88);
}

.form-dark input,
.form-dark textarea {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .92);
}

.form-dark input::placeholder,
.form-dark textarea::placeholder {
  color: rgba(255, 255, 255, .55);
}

.form-dark input:focus,
.form-dark textarea:focus {
  border-color: rgba(225, 29, 46, .55);
  box-shadow: 0 0 0 4px rgba(225, 29, 46, .18);
}

/* responsive */
@media (max-width: 980px) {
  .contact-hero {
    padding: 70px 0;
  }
}

/* === Rotador PRO: mask reveal + blur === */
.hero-rotator {
  display: inline-block;
  position: relative;
  min-height: 1.2em;
  /* evita saltos */
}

.hero-phrase {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
}

.hero-phrase.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

/* PRO animation */
.hero-rotator--pro .hero-phrase {
  transform: translateY(18px) scale(.985);
  filter: blur(10px);
  clip-path: inset(0 0 100% 0 round 16px);
  transition:
    opacity .55s ease,
    transform .75s cubic-bezier(.2, .9, .2, 1),
    filter .75s cubic-bezier(.2, .9, .2, 1),
    clip-path .85s cubic-bezier(.2, .9, .2, 1);
}

.hero-rotator--pro .hero-phrase.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  clip-path: inset(0 0 0 0 round 16px);
}

.hero-rotator--pro .hero-phrase.is-leaving {
  opacity: 0;
  transform: translateY(-14px) scale(.99);
  filter: blur(8px);
  clip-path: inset(0 0 100% 0 round 16px);
}

/* accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .hero-rotator--pro .hero-phrase {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    position: relative !important;
  }
}

/* ===== Rotador PRO (lo que ya traías) ===== */
.hero-rotator {
  display: inline-block;
  position: relative;
  min-height: 1.2em;
}

.hero-phrase {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
}

.hero-phrase.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.hero-rotator--pro .hero-phrase {
  transform: translateY(18px) scale(.985);
  filter: blur(10px);
  clip-path: inset(0 0 100% 0 round 16px);
  transition:
    opacity .55s ease,
    transform .75s cubic-bezier(.2, .9, .2, 1),
    filter .75s cubic-bezier(.2, .9, .2, 1),
    clip-path .85s cubic-bezier(.2, .9, .2, 1);
}

.hero-rotator--pro .hero-phrase.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  clip-path: inset(0 0 0 0 round 16px);
}

.hero-rotator--pro .hero-phrase.is-leaving {
  opacity: 0;
  transform: translateY(-14px) scale(.99);
  filter: blur(8px);
  clip-path: inset(0 0 100% 0 round 16px);
}

/* ===== Timeline bar PRO ===== */
/* .hero-timeline{
  margin-top: 18px;
  height: 6px;
  width: min(520px, 90%);
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  overflow: hidden;
} */

/* La barrita que se llena */
/* .hero-timeline-bar{
  display:block;
  height:100%;
  width:0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.85), rgba(255,255,255,.35));
  transform-origin: left center;
} */

/* reduce motion */
/* @media (prefers-reduced-motion: reduce){
  .hero-timeline{ display:none; }
} */


/* ===== MODAL BASE ===== */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 18px;
  /* ✅ espacio en mobile */
}

.modal.show {
  display: flex;
}

/* Overlay */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(6px);
}

/* Contenido */
.modal-content {
  position: relative;
  width: min(900px, 100%);
  /* ✅ ya no se sale */
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .35);
  animation: modalIn .45s cubic-bezier(.2, .9, .2, 1);
  overflow: hidden;

  max-height: calc(100vh - 36px);
  /* ✅ clave */
  display: flex;
  /* ✅ */
  flex-direction: column;
  /* ✅ */
}

/* Animación */
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.modal-header {
  padding: 26px 28px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.modal-header h2 {
  margin: 0 0 6px;
}

.modal-header p {
  margin: 0;
  color: #64748b;
  font-weight: 600;
  line-height: 1.6;
}

/* Body */
.modal-body {
  padding: 26px 28px;
  overflow: auto;
  /* ✅ scroll interno */
  -webkit-overflow-scrolling: touch;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
  align-items: start;
}

.modal-body ul {
  margin: 10px 0 18px;
  padding-left: 18px;
  line-height: 1.7;
  color: #475569;
  font-weight: 600;
}

/* Imagen */
.modal-media {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .10);
  background: #f1f5f9;
}

.modal-media img {
  width: 100%;
  height: auto;
  /* ✅ */
  max-height: 380px;
  /* ✅ */
  object-fit: cover;
  display: block;
}

/* Footer */
.modal-footer {
  padding: 18px 28px 26px;
  border-top: 1px solid rgba(15, 23, 42, .08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Botón cerrar */
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: #0b1220;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.modal-close:hover {
  transform: scale(1.05);
}

/* ===== TABLA CUSTOM (si la usas en el modal) ===== */
.custom-table {
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  margin: 10px 0 18px;
}

.table-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  padding: 12px 14px;
  border-top: 1px solid rgba(15, 23, 42, .08);
}

.table-row:first-child {
  border-top: 0;
}

.table-row.header {
  background: #0b1220;
  color: #fff;
  font-weight: 900;
}

.table-row>div:first-child {
  font-weight: 900;
  color: #0b1220;
}

.table-row.header>div:first-child {
  color: #fff;
}

/* Responsive */
@media (max-width: 860px) {
  .modal-header {
    padding: 18px 18px;
  }

  .modal-body {
    padding: 18px 18px;
  }

  .modal-footer {
    padding: 14px 18px 18px;
  }

  .modal-grid {
    grid-template-columns: 1fr;
    /* ✅ */
  }

  .modal-media img {
    max-height: 260px;
    /* ✅ */
  }

  /* Tabla a una columna */
  .table-row {
    grid-template-columns: 1fr;
    /* ✅ */
    gap: 6px;
  }

  /* Ocultamos header (en móvil estorba) */
  .table-row.header {
    display: none;
  }

  /* Primera celda se vuelve “label” */
  .table-row>div:first-child {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
  }
}


/* ===== Tabla CUSTOM ===== */
.custom-table {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  margin: 12px 0 22px;
}

/* filas */
.custom-table .table-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  /* Modalidad | Aduanas/Puertos */
  gap: 14px;
  padding: 12px 14px;
  align-items: start;
}

/* separadores */
.custom-table .table-row+.table-row {
  border-top: 1px solid rgba(15, 23, 42, .08);
}

/* header */
.custom-table .table-row.header {
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* columna 1: Modalidad (en filas normales) */
.custom-table .table-row:not(.header)>div:first-child {
  font-weight: 900;
  color: #0b1220;
  background: #f3f4f6;
  border: 1px solid rgba(15, 23, 42, .08);
  padding: 8px 10px;
  border-radius: 999px;
  text-align: center;
  line-height: 1.2;
}

/* columna 2: lista de puertos */
.custom-table .table-row:not(.header)>div:last-child {
  color: #334155;
  font-weight: 650;
  line-height: 1.45;
}

/* Responsive: en móvil, que se apile y sea clarísimo */
@media (max-width: 700px) {
  .custom-table .table-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .custom-table .table-row.header {
    display: none;
    /* opcional: si prefieres ocultar header en móvil */
  }

  .custom-table .table-row:not(.header)>div:first-child {
    width: fit-content;
    text-align: left;
  }
}

body.modal-open{
  overflow: hidden;
  height: 100vh;
}

.modal-content{
  max-height: 90vh;
  overflow-y: auto;
}

/* MODAL HIGH VALUES */

/* ===== Layout columnas ===== */
.modal-columns{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:28px;
}

/* Bloques */
.modal-block{
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:20px;
}

/* Títulos */
.modal-block h4{
  margin:0 0 14px;
  font-size:18px;
  font-weight:900;
  color:#0b1220;
}

/* Lista visual */
.check-list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:10px;
}

/* Ítems */
.check-list li{
  position:relative;
  padding-left:26px;
  font-weight:600;
  color:#475569;
}

/* Check icon */
.check-list li::before{
  content:"✓";
  position:absolute;
  left:0;
  top:0;
  width:18px;
  height:18px;
  border-radius:6px;
  background:rgba(225,29,46,.12);
  color:#e11d2e;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:900;
}

.modal-tags{
  display:flex;
  gap:10px;
  margin-bottom:18px;
}

.modal-tags span{
  background:rgba(225,29,46,.10);
  color:#e11d2e;
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
}


/* ===== BARRA SEGURIDAD ===== */
.security-meter{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,.08);
}

.security-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 10px;
}

.security-label{
  font-weight:900;
  color:#0b1220;
  font-size: 13px;
  letter-spacing:.2px;
}

.security-badge{
  font-weight:900;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background:#f8fafc;
  color:#0b1220;
}

.security-badge.is-high{
  background: rgba(225,29,46,.10);
  color: var(--accent);
  border-color: rgba(225,29,46,.18);
}
.security-badge.is-max{
  background: rgba(225,29,46,.14);
  color: var(--accent);
  border-color: rgba(225,29,46,.22);
}

.security-bar{
  position:relative;
  height: 12px;
  border-radius:999px;
  background: #eef2f7;
  border: 1px solid rgba(15,23,42,.08);
  overflow:hidden;
}

.security-fill{
  position:absolute;
  inset:0;
  width: 0%;
  border-radius:999px;

  /* gradiente pro sin verse “neón” */
  background: linear-gradient(90deg,
    rgba(225,29,46,.55),
    rgba(225,29,46,.95)
  );

  /* animación al abrir */
  transform: translateZ(0);
  animation: securityFill 900ms cubic-bezier(.2,.9,.2,1) forwards;
  /* toma el porcentaje desde --level */
}

@keyframes securityFill{
  from{ width: 0%; }
  to{ width: var(--level); }
}

/* nodos/“milestones” */
.security-node{
  position:absolute;
  top:50%;
  width:10px;
  height:10px;
  border-radius:999px;
  background:#fff;
  border:2px solid rgba(15,23,42,.20);
  transform: translate(-50%,-50%);
  opacity:.95;
}
.security-node.n1{ left: 33%; }
.security-node.n2{ left: 66%; }
.security-node.n3{ left: 92%; border-color: rgba(225,29,46,.45); }

.security-scale{
  display:flex;
  justify-content:space-between;
  margin-top: 8px;
  font-size: 12px;
  color:#64748b;
  font-weight:700;
}

/* MODAL  */

.modal-content{
  max-height: min(90vh, 720px);
  overflow: hidden; /* header/footer fijos dentro */
  display:flex;
  flex-direction:column;
}

.modal-body{
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}

