/* ===== Fuente Inter guardada en el propio sitio (más rápido que Google Fonts) ===== */
@font-face {
  font-family: 'Inter';
  src: url(../fonts/inter.woff2) format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ===== Colores y medidas (cámbialos aquí para todo el sitio) ===== */
:root {
  --navy: #0b2545;
  --blue: #13315c;
  /* Naranja de marca accesible: texto blanco sobre --accent = 4.6:1 (WCAG AA) */
  --accent: #b85c0a;
  --accent-dark: #9a4d08;
  --accent-text: #a8540a;   /* naranja para texto sobre fondo claro (5.3:1) */
  --accent-light: #f59e42;  /* naranja para texto sobre azul marino (7.2:1) */
  --header-h: 84px;
  --text: #1f2933;
  --muted: #5b6770;
  --bg-alt: #f3f6fa;
  --white: #ffffff;
  --radius: 10px;
  --max: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}

a { color: inherit; }

.container { width: 90%; max-width: var(--max); margin: 0 auto; }
.narrow { max-width: 760px; }
.hidden { display: none; }

h1, h2, h3 { line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--white); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: .75rem; }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }

/* ===== Botones ===== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: .85rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--accent);
  cursor: pointer;
  font-size: 1rem;
  transition: background .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-small { padding: .5rem 1rem; }

/* ===== Menú ===== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(11,37,69,.12);
}
.site-header { top: 0; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.logo { display: flex; align-items: center; }
.logo img { height: 64px; width: auto; display: block; }
.logo span { font-weight: 400; font-size: .95rem; opacity: .85; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--navy); text-decoration: none; font-weight: 600; }
.nav-links a.btn { color: var(--white); }
.nav-links a:not(.btn):hover { color: var(--accent); }
.menu-toggle { display: none; background: none; border: none; color: var(--navy); font-size: 1.8rem; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: var(--white);
  padding: 6rem 0 5rem;
}

.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--accent); font-weight: 600; margin-bottom: 1rem; }
.hero-text { font-size: 1.15rem; opacity: .9; margin: 1.25rem 0 2rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== Secciones ===== */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--muted); margin-bottom: 2.5rem; max-width: 640px; }

/* Tarjetas de servicios */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--white);
  border: 1px solid #e3e8ef;
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(11,37,69,.1); }
.card p { color: var(--muted); }

/* Pasos */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.steps li { counter-increment: step; background: var(--white); padding: 1.5rem; border-radius: var(--radius); }
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--navy); color: var(--white); font-weight: 700;
  margin-bottom: .75rem;
}
.steps strong { display: block; color: var(--navy); margin-bottom: .25rem; }
.steps span { color: var(--muted); }

/* Nosotros */
.about { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: center; }
.about p { margin-bottom: 1rem; color: var(--muted); }
.highlights { list-style: none; background: var(--navy); color: var(--white); padding: 2rem; border-radius: var(--radius); }
.highlights li { padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.highlights li:last-child { border-bottom: none; }
.highlights li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* Preguntas frecuentes */
details { background: var(--white); border: 1px solid #e3e8ef; border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 1rem; }
summary { font-weight: 600; cursor: pointer; color: var(--navy); }
details p { margin-top: .75rem; color: var(--muted); }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info { list-style: none; margin-top: 1.5rem; }
.contact-info li { margin-bottom: .75rem; }
.contact-info a { text-decoration: none; font-weight: 500; }
.form { display: grid; gap: 1rem; background: var(--bg-alt); padding: 2rem; border-radius: var(--radius); }
.form label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
.form input, .form select, .form textarea {
  padding: .75rem; border: 1px solid #cfd8e3; border-radius: 8px; font: inherit; background: var(--white);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }

.form-status { font-size: .95rem; min-height: 1.2em; }
.form-status.ok { color: #1e7b3c; font-weight: 600; }
.form-status.error { color: #b42318; font-weight: 600; }
.form button[disabled] { opacity: .7; cursor: wait; }

/* Pie de página */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 2rem 0; text-align: center; font-size: .9rem; }

/* ===== Barra superior ===== */
.topbar { background: #071a33; color: rgba(255,255,255,.85); font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; gap: 1rem; flex-wrap: wrap; }
.topbar a { text-decoration: none; margin-right: 1.25rem; }
.topbar a:hover { color: var(--accent); }
.social { display: flex; align-items: center; gap: .9rem; }
.social a { margin: 0; display: inline-flex; color: inherit; transition: color .2s, transform .2s; }
.social a:hover { color: var(--accent); transform: translateY(-2px); }
.social-lg { margin-top: 1.5rem; }
.social-lg a { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); justify-content: center; align-items: center; }
.social-lg svg { width: 22px; height: 22px; }
.social-lg span { opacity: .8; font-size: .95rem; }
.social-footer { margin-top: 1rem; }
.social-footer a { display: inline-flex; margin: 0; }

/* Hero con fotos */
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; }
.hero-images { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hero-images img { width: 100%; height: 340px; object-fit: cover; border-radius: var(--radius); background: #24456f; }
.hero-images img:last-child { margin-top: 2.5rem; }

/* Dos columnas */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.two-col p:not(.eyebrow) { color: var(--muted); }

/* Cobertura */
.coverage { background: var(--accent); color: var(--white); padding: 3rem 0; }
.coverage h2 { color: var(--white); text-align: center; margin-bottom: 1.5rem; }
.ports { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; text-align: center; }
.ports strong { display: block; font-size: 1.6rem; }
.ports span { font-size: .85rem; opacity: .9; }

/* Tarjetas con imagen */
.card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; height: 170px; object-fit: cover; background: #dbe3ec; display: block; }
.card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-body p { flex: 1; }
.more { margin-top: 1rem; color: var(--accent); font-weight: 600; text-decoration: none; }

/* Ventajas */
.center { text-align: center; }
.advantages { background: linear-gradient(135deg, var(--navy), var(--blue)); }
.advantages h2 { color: var(--white); }
.advantages p { color: rgba(255,255,255,.85); font-size: 1.1rem; }

/* Por qué elegirnos */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.feature { background: var(--white); padding: 1.75rem; border-radius: var(--radius); border-left: 4px solid var(--accent); }
.feature p { color: var(--muted); }

/* Contacto oscuro */
.section-dark { background: var(--navy); color: var(--white); }
.section-dark h2 { color: var(--white); }
.section-dark .form { background: var(--white); color: var(--text); }

/* Pie de página */
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr; gap: 2rem; text-align: left; padding-bottom: 2rem; }
.footer-grid h4, .footer-grid .footer-h { color: var(--white); margin-bottom: .75rem; font-size: 1rem; }
.aside-box .aside-h { font-size: 1.17em; margin: 0 0 .5rem; color: var(--white); }
.footer-grid a { display: block; width: fit-content; text-decoration: none; margin-bottom: .4rem; } /* (solo el ancho del texto: el aura pasa sobre la palabra) */
.footer-grid a:hover { color: var(--accent); }
.footer-logo { height: 80px; width: auto; margin-bottom: 1rem; display: block; }
.footer-logo span { font-weight: 400; font-size: .9rem; }
.copyright { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; }
.copyright a { text-decoration: none; }

/* ===== Fondos con foto =====
   Cada sección usa una clase (bg-trucks, bg-port...). En el celular se carga
   la versión de 800px y en computadora la de 1600px. --ov es la capa azul. */
.bg-photo { --ov: rgba(11,37,69,.82); background-color: var(--navy); background-size: cover; background-position: center; background-repeat: no-repeat; }
.bg-trucks    { background-image: linear-gradient(var(--ov), var(--ov)), url(../images/bg-trucks-800.webp); }
.bg-port      { background-image: linear-gradient(var(--ov), var(--ov)), url(../images/bg-port-800.webp); }
.bg-plane     { background-image: linear-gradient(var(--ov), var(--ov)), url(../images/bg-cargo-plane-800.webp); }
.bg-warehouse { background-image: linear-gradient(var(--ov), var(--ov)), url(../images/bg-warehouse-800.webp); }
@media (min-width: 801px) {
  .bg-trucks    { background-image: linear-gradient(var(--ov), var(--ov)), url(../images/bg-trucks.webp); }
  .bg-port      { background-image: linear-gradient(var(--ov), var(--ov)), url(../images/bg-port.webp); }
  .bg-plane     { background-image: linear-gradient(var(--ov), var(--ov)), url(../images/bg-cargo-plane.webp); }
  .bg-warehouse { background-image: linear-gradient(var(--ov), var(--ov)), url(../images/bg-warehouse.webp); }
}
/* Fotos de más abajo: no se descargan hasta que te acercas a ellas (site.js quita esta clase) */
.bg-photo.lazy-bg { background-image: none; }
.hero.bg-photo { --ov: rgba(11,37,69,.72); padding: 8rem 0 7rem; }
.hero-inner > * { max-width: 720px; }
.coverage.bg-photo { --ov: rgba(11,37,69,.78); padding: 4.5rem 0; }
.coverage strong { color: var(--accent); }
.advantages.bg-photo { --ov: rgba(11,37,69,.7); padding: 7rem 0; }
.section-dark.bg-photo { --ov: rgba(11,37,69,.88); }
.service-hero.bg-photo { --ov: rgba(11,37,69,.78); padding: 5.5rem 0 5rem; }
.cta-band.bg-photo { --ov: rgba(11,37,69,.75); }

/* ===== Animaciones (ligeras: solo opacity y transform) ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
/* Los dibujos de servicios "aparecen" con un pequeño zoom */
.card.reveal img { transform: scale(.9); opacity: .4; transition: transform .7s cubic-bezier(.2,.8,.2,1) .15s, opacity .7s ease .15s; }
.card.reveal.in img { transform: none; opacity: 1; }
/* Números de puertos y escudos rebotan un poquito */
.ports li.reveal { transform: translateY(20px) scale(.85); }
.ports li.reveal.in { transform: none; }

/* Entrada del título principal al cargar */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-inner > * { animation: fadeUp .8s ease both; }
.hero-inner > *:nth-child(2) { animation-delay: .12s; }
.hero-inner > *:nth-child(3) { animation-delay: .24s; }
.hero-inner > *:nth-child(4) { animation-delay: .36s; }

/* Respeta a quien desactiva animaciones en su teléfono/computadora */
@media (prefers-reduced-motion: reduce) {
  .reveal, .card.reveal img, .ports li.reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-inner > * { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== Celular ===== */
@media (max-width: 800px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 84px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--white); padding: 1rem 0; box-shadow: 0 8px 16px rgba(11,37,69,.12);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .75rem 0; }
  .about, .contact, .hero-grid, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .ports { grid-template-columns: repeat(3, 1fr); }
  .hero-images img { height: 200px; }
  .topbar-inner { justify-content: center; text-align: center; }
  .hero { padding: 4rem 0 3.5rem; }
  .section { padding: 3.5rem 0; }
}

/* ===== Páginas de servicio ===== */
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.breadcrumb { font-size: .9rem; color: rgba(255,255,255,.8); margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--white); font-weight: 600; }
.service-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 3rem; align-items: start; }
.service-content h2 { margin-top: 2.25rem; }
.service-content h2:first-child { margin-top: 0; }
.service-content p { color: var(--muted); font-size: 1.05rem; }
.check-list { list-style: none; margin-top: .75rem; display: grid; gap: .6rem; }
.check-list li { position: relative; padding-left: 1.9rem; color: var(--text); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: .2rem; }
.steps-compact { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
.steps-compact li { background: var(--bg-alt); }
.service-aside { position: sticky; top: 110px; display: grid; gap: 1.25rem; }
.service-aside img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.aside-box { background: var(--navy); color: var(--white); padding: 1.75rem; border-radius: var(--radius); }
.aside-box h3 { color: var(--white); }
.aside-box p { color: rgba(255,255,255,.8); margin-bottom: 1rem; }
.aside-box .btn { width: 100%; text-align: center; }
.aside-phone { margin: 1rem 0 0 !important; text-align: center; }
.aside-phone a { color: var(--white); text-decoration: none; font-weight: 600; }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.related-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid #e3e8ef; border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(11,37,69,.1); }
.related-card img { width: 100%; height: 110px; object-fit: cover; background: #dbe3ec; }
.related-card span { padding: .9rem 1rem; font-weight: 600; color: var(--navy); }
.cta-band .center-buttons { justify-content: center; margin-top: 1.5rem; }
@media (max-width: 800px) {
  .service-layout { grid-template-columns: 1fr; }
  .service-aside { position: static; }
  .service-aside img { max-height: 220px; object-fit: cover; }
  .steps-compact { grid-template-columns: 1fr; }
}


/* ===== Blog / News ===== */
.blog-hero.bg-photo { --ov: rgba(11,37,69,.78); padding: 5.5rem 0 5rem; }
.blog-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.blog-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid #e3e8ef;
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(11,37,69,.1); }
.blog-card time {
  display: block; color: var(--accent); font-weight: 600;
  font-size: .85rem; text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: .6rem;
}
.blog-card h2 { font-size: 1.2rem; margin-bottom: .6rem; }
.blog-card h2 a { color: inherit; text-decoration: none; }
.blog-card h2 a:hover { color: var(--accent); }
.blog-card p { color: var(--muted); }
.blog-card .more { margin-top: 1rem; }
.blog-card .excerpt-wrap {
  position: relative;
  flex: 1;
  margin-bottom: .15rem;
}
.blog-card .excerpt {
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  max-height: 4.8em;
}
.blog-card .excerpt-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.55em;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--white));
  pointer-events: none;
}
.blog-card .btn { align-self: flex-start; margin-top: 1.1rem; }
.news-preview.blog-cards { margin-top: .25rem; }
.article-wrap { max-width: 760px; }
.article-meta { color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }
.article h2 { margin-top: 2.25rem; }
.article h2:first-of-type { margin-top: 0; }
.article p, .article li { color: var(--muted); font-size: 1.05rem; }
.article p { margin-bottom: 1rem; }
.article ul, .article ol { margin: 0 0 1.15rem 1.25rem; display: grid; gap: .45rem; }
.article a { color: var(--accent); font-weight: 600; }
.article a:hover { color: var(--accent-dark); }
.article-disclaimer {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0 1.5rem;
}
.article-disclaimer p { margin: 0; font-size: .95rem; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.sources a { word-break: break-word; }
.article-cta { margin-top: 2rem; }
.related-posts { margin-top: 3rem; }
.related-posts h2 { margin-bottom: 1rem; }


/* ===== Feed oficial Latest CBP Updates ===== */
.blog-layout { display: grid; grid-template-columns: 1.55fr .95fr; gap: 2.5rem; align-items: start; }
.blog-layout .blog-cards { grid-template-columns: 1fr; }
.cbp-feed-box {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
}
.cbp-feed-box h2 { margin-bottom: .4rem; }
.cbp-feed-box .section-intro { margin-bottom: 1.15rem; }
.cbp-feed { list-style: none; display: grid; gap: .75rem; margin: 0; padding: 0; }
.cbp-feed li {
  background: var(--white);
  border: 1px solid #e3e8ef;
  border-radius: var(--radius);
  padding: .9rem 1rem;
}
.cbp-feed a { color: var(--navy); text-decoration: none; font-weight: 600; }
.cbp-feed a:hover { color: var(--accent); }
.cbp-feed-meta { display: block; color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.cbp-feed-fallback { color: var(--muted); margin: 0; }
.cbp-feed-note { font-size: .85rem; color: var(--muted); margin: 1rem 0 0; }
.cbp-feed-home .cbp-feed { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 800px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-layout .cbp-feed-box { order: -1; }
}

/* Enlace al mapa de límites del puerto (páginas CFS y Bonded Warehouse) */
.pl-callout { margin-top: 1.5rem; background: var(--bg-alt); border-left: 4px solid var(--accent); padding: .9rem 1.1rem; border-radius: 8px; }
.pl-callout a { font-weight: 600; color: var(--navy); }

/* Vista previa del mapa de límites del puerto (páginas de CFS y Bonded Warehouse) */
.pl-preview { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.pl-preview-map { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid #e3e8ef; background: #cfe2f3; box-shadow: 0 10px 30px rgba(11,37,69,.08); transition: transform .2s; }
.pl-preview-map:hover { transform: translateY(-3px); }
.pl-preview-map img { display: block; width: 100%; height: auto; }
.pl-preview p:not(.eyebrow) { color: var(--muted); }
.pl-preview-keys { list-style: none; margin: 1rem 0 1.5rem; padding: 0; display: grid; gap: .45rem; font-size: .9rem; color: var(--muted); }
.plk { display: inline-block; width: 22px; height: 12px; vertical-align: -1px; margin-right: .4rem; border-radius: 3px; }
.plk-zone { background: rgba(31,98,176,.17); border: 2px dashed var(--navy); }
.plk-ftz { background: rgba(31,138,91,.07); border: 2px dotted #1f8a5b; }
.pl-preview-note { font-size: .85rem; margin-top: 1rem; }
@media (max-width: 860px) { .pl-preview { grid-template-columns: 1fr; gap: 1.75rem; } }


/* =====================================================================
   v6 — Accesibilidad, menú, animaciones, noticias, quiz, barra móvil
   ===================================================================== */

/* Colores de texto naranja con buen contraste */
.eyebrow, .more, .blog-card time, .article a { color: var(--accent-text); }
.hero .eyebrow, .section-dark .eyebrow, .advantages .eyebrow, .coverage strong { color: var(--accent-light); }
.site-footer a:hover, .footer-grid a:hover, .breadcrumb a:hover, .topbar a:hover { color: var(--accent-light); }
.card h3 a:hover, .blog-card h2 a:hover, .blog-card h3 a:hover, .cbp-feed a:hover { color: var(--accent-text); }

button.btn { font-family: inherit; }

/* Saltar al contenido + foco visible */
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 2000; background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 8px; font-weight: 600; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; border-radius: 4px; }
.site-header :focus-visible, .section:not(.section-dark) :focus-visible, .form :focus-visible { outline-color: var(--accent); }
main:focus { outline: none; }

/* Botones: se levantan al pasar el mouse y se hunden al hacer clic */
.btn { transition: background .2s, border-color .2s, color .2s, transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(11,37,69,.22); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: none; transition-duration: .08s; }
.btn-ghost { background: transparent; color: var(--navy); border-color: #cfd8e3; }
.btn-ghost:hover { background: var(--bg-alt); color: var(--navy); border-color: var(--navy); }

/* Header: se hace más bajo con sombra al bajar */
/* (la barra ya no cambia de alto al bajar: eso hacía recalcular toda la página en cada cuadro;
   se achica solo el logo y sale la sombra, que no cuestan) */
.logo img { transition: transform .25s ease; transform-origin: left center; }
.site-header { transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 22px rgba(11,37,69,.18); }
.site-header.is-scrolled .logo img { transform: scale(.84); }

/* Menú: subrayado animado desde el centro; la página actual queda subrayada */
.nav-links { gap: 1.35rem; }
.nav-links > a:not(.btn), .nav-dd-toggle { position: relative; }
.nav-links > a:not(.btn)::after, .nav-dd-toggle::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: center; transition: transform .25s ease;
}
.nav-links > a:not(.btn):hover::after, .nav-links > a[aria-current="page"]::after,
.nav-dd-toggle:hover::after, .nav-dd-toggle.is-current::after { transform: scaleX(1); }
.nav-links a:not(.btn):hover { color: var(--navy); }
.lang-switch { font-size: .85rem; border: 1px solid #cfd8e3; border-radius: 999px; padding: .2rem .6rem; }
.nav-links > a.lang-switch::after { display: none; }
.lang-switch:hover { border-color: var(--accent); }

/* Desplegable de servicios */
.nav-dd { position: relative; }
.nav-dd-toggle { background: none; border: 0; font: inherit; font-weight: 600; color: var(--navy); cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: .3rem; }
.dd-caret { font-size: .75rem; transition: transform .2s; }
.nav-dd.open .dd-caret { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 14px); left: 50%; min-width: 290px; z-index: 30;
  background: #fff; border: 1px solid #e3e8ef; border-radius: var(--radius); box-shadow: 0 14px 34px rgba(11,37,69,.16);
  padding: .5rem; display: grid; gap: 2px;
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; } /* puente para el hover */
.nav-dd-menu a { display: block; padding: .55rem .75rem; border-radius: 8px; font-weight: 500; color: var(--navy); text-decoration: none; }
.nav-dd-menu a:hover, .nav-dd-menu a:focus-visible, .nav-dd-menu a[aria-current="page"] { background: var(--bg-alt); color: var(--accent-text); }
.nav-dd-menu .dd-all { font-weight: 700; border-bottom: 1px solid #e3e8ef; border-radius: 8px 8px 0 0; margin-bottom: 2px; }
.nav-dd.open .nav-dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 801px) {
  .nav-dd:hover .nav-dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}
.menu-toggle { width: 44px; height: 44px; border-radius: 8px; line-height: 1; }
.mt-icon { display: inline-block; transition: transform .2s; }
.menu-toggle[aria-expanded="true"] .mt-icon { transform: rotate(90deg); }

@media (max-width: 1040px) and (min-width: 801px) {
  .nav-links { gap: 1rem; font-size: .95rem; }
}
@media (max-width: 800px) {
  .nav-links { max-height: calc(100vh - 84px); overflow-y: auto; padding: .5rem 5% 1rem; align-items: stretch; }
  .nav-links > a, .nav-dd-toggle { padding: .8rem 0; border-bottom: 1px solid #eef2f6; width: 100%; text-align: left; justify-content: space-between; }
  .nav-links > a::after, .nav-dd-toggle::after { display: none; }
  .nav-links > a[aria-current="page"] { color: var(--accent-text); }
  .nav-links > a.btn { margin-top: .75rem; text-align: center; border-bottom: 0; }
  .lang-switch { border: 0; border-bottom: 1px solid #eef2f6; border-radius: 0; padding: .8rem 0; font-size: 1rem; }
  .nav-dd-menu { position: static; transform: none; min-width: 0; box-shadow: none; border: 0; padding: 0 0 .5rem .75rem; display: none; opacity: 1; visibility: visible; }
  .nav-dd-menu::before { display: none; }
  .nav-dd.open .nav-dd-menu { display: grid; transform: none; }
  .site-header.is-scrolled .logo img { transform: none; }
  /* Barra superior compacta: solo el teléfono (correo y redes están en el pie) */
  .topbar-email, .topbar-social { display: none !important; }
  .topbar-inner { padding: .35rem 0; }
}

/* Tarjetas: zoom suave de la imagen y la flecha se mueve */
.card img { transition: transform .45s ease; }
.card:hover img { transform: scale(1.05); }
.more .arr { display: inline-block; transition: transform .2s ease; }
.card:hover .more .arr, .more:hover .arr { transform: translateX(4px); }
.related-card img { transition: transform .45s ease; }
.related-card { overflow: hidden; }
.related-card:hover img { transform: scale(1.05); }

/* Cobertura: nota */
.coverage-note { text-align: center; max-width: 760px; margin: -0.5rem auto 1.75rem; color: rgba(255,255,255,.9); }

/* Franja de números de confianza (oculta hasta tener cifras reales) */
.trust-strip { background: var(--navy); color: #fff; padding: 2.25rem 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.trust-item strong { display: block; font-size: 2rem; color: var(--accent-light); font-variant-numeric: tabular-nums; }
.trust-item span { color: rgba(255,255,255,.85); font-size: .95rem; }
@media (max-width: 800px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }

/* Reseñas (ocultas hasta tener reseñas reales) */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.review { background: #fff; border: 1px solid #e3e8ef; border-radius: var(--radius); padding: 1.5rem; }
.review .stars { color: #b8860b; letter-spacing: .1em; margin-bottom: .5rem; }
.review blockquote { color: var(--text); }
.review figcaption { margin-top: .75rem; color: var(--muted); font-weight: 600; }
.reviews-cta { margin-top: 1.5rem; }

/* ¿Qué permiso necesito? */
.quiz-section { background: linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%); }
.quiz { margin-top: 1rem; }
.quiz-card { background: #fff; border: 1px solid #e3e8ef; border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 1.75rem; box-shadow: 0 10px 30px rgba(11,37,69,.07); animation: quizIn .3s ease both; }
@keyframes quizIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.quiz-step { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--accent-text); margin-bottom: .4rem; }
.quiz-q { font-size: 1.3rem; margin-bottom: 1.1rem; }
.quiz-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.quiz-opt { text-align: left; font: inherit; font-weight: 600; color: var(--navy); background: var(--bg-alt); border: 2px solid transparent; border-radius: var(--radius); padding: .9rem 1rem; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.quiz-opt:hover { border-color: var(--accent); background: #fff; transform: translateY(-2px); }
.quiz-back { margin-top: 1rem; background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }
.quiz-why { color: var(--muted); margin-bottom: 1.25rem; }

/* CBP: 3 recuadros destacados */
.featured-board { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1rem; }
.fcard { background: #fff; border: 1px solid #e3e8ef; border-radius: var(--radius); padding: 1.35rem 1.4rem; display: flex; flex-direction: column; min-width: 0; transition: transform .2s, box-shadow .2s; }
.fcard:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(11,37,69,.1); }
.fcard-month { grid-column: 1 / -1; background: linear-gradient(160deg, var(--navy), var(--blue)); color: #fff; border: 0; padding: 1.9rem; }
.fbadge { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--bg-alt); color: var(--navy); border-radius: 999px; padding: .3rem .75rem; margin-bottom: .8rem; }
.fcard-month .fbadge { background: var(--accent); color: #fff; }
.fmeta { font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.fcard-month .fmeta { color: rgba(255,255,255,.75); }
.ftitle { font-size: 1.05rem; line-height: 1.35; margin-bottom: .5rem; overflow-wrap: anywhere; }
.fcard-month .ftitle { font-size: 1.4rem; color: #fff; }
.ftitle a { color: inherit; text-decoration: none; }
.ftitle a:hover { text-decoration: underline; }
.fsummary { color: var(--muted); font-size: .95rem; flex: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.fcard-month .fsummary { color: rgba(255,255,255,.88); font-size: 1.05rem; max-width: 900px; -webkit-line-clamp: 5; line-clamp: 5; }
.fmore { margin-top: .9rem; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.fmore:hover { text-decoration: underline; }
.fcard-month .fmore { color: var(--accent-light); }
.fcard.is-loading { min-height: 150px; }
.fcard-month.is-loading { min-height: 220px; }
.sk { height: .85rem; border-radius: 6px; margin-top: .6rem; background: #e8edf3; animation: skel 1.1s ease-in-out infinite alternate; will-change: opacity; } /* solo transparencia: no se redibuja en cada cuadro */
.fcard-month .sk { background: rgba(255,255,255,.18); }
.sk-t { height: 1.3rem; width: 85%; }
.sk-s { width: 60%; }
@keyframes skel { from { opacity: 1; } to { opacity: .45; } }
@media (max-width: 800px) {
  .featured-board { grid-template-columns: 1fr; }
  .fcard-month { grid-column: auto; padding: 1.5rem; }
  .fcard-month .ftitle { font-size: 1.2rem; }
}
.guides-head { margin-top: 3rem; }
.guides-title { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-bottom: .5rem; }
.feed-title { margin-top: 3rem; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.cbp-feed-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 1rem; }
.cbp-feed-sum { display: block; color: var(--muted); font-size: .88rem; margin-top: .35rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.blog-card h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.blog-card h3 a { color: inherit; text-decoration: none; }

/* Formulario: casilla de privacidad */
.form .consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--muted); }
.form .consent input { width: 18px; height: 18px; margin-top: .2rem; flex: none; accent-color: var(--accent); }
.form .consent a { color: var(--navy); font-weight: 600; }

/* Documentos que necesitas */
.doc-list li::before { content: "📄"; background: none; font-size: .95rem; }

/* Páginas de servicio en el celular: un solo botón arriba (la barra fija ya trae "Call") */
@media (max-width: 767px) {
  .service-hero .hero-buttons .btn-outline { display: none; }
  .service-aside img { display: none; }
}

/* Barra fija para llamar en el celular (no tapa la burbuja del chat) */
.callbar { display: none; }
@media (max-width: 767px) {
  body { padding-bottom: 76px; }
  .callbar {
    display: flex; gap: .5rem; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    height: 68px; padding: 10px 84px 10px 12px; /* a la derecha queda la burbuja del chat */
    background: rgba(255,255,255,.97); border-top: 1px solid #e3e8ef; box-shadow: 0 -6px 18px rgba(11,37,69,.1);
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); height: calc(68px + env(safe-area-inset-bottom, 0px));
  }
  .callbar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: .35rem; height: 48px; border-radius: var(--radius); font-weight: 700; text-decoration: none; font-size: .98rem; }
  .callbar-call { background: var(--navy); color: #fff; }
  .callbar-wa { background: #1f7a4d; color: #fff; }
  .callbar-quote { background: var(--accent); color: #fff; }
  .callbar a[hidden] { display: none; }
  html body .mc-launch { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); right: 14px; width: 52px; height: 52px; }
  html body .mc-box { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* Página de estadísticas y páginas simples */
.page-title { color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: .75rem; }
.stats-auth { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; background: var(--bg-alt); padding: 1.25rem; border-radius: var(--radius); }
.stats-auth label { display: grid; gap: .35rem; font-weight: 500; font-size: .9rem; }
.stats-auth input { padding: .6rem; border: 1px solid #cfd8e3; border-radius: 8px; font: inherit; }
.stats-range { display: flex; gap: .5rem; }
.stats-status { margin: 1rem 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat { background: #fff; border: 1px solid #e3e8ef; border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.2rem; }
.stat strong { display: block; font-size: 1.8rem; color: var(--navy); }
.stat span { color: var(--muted); font-size: .9rem; }
.stats-h2 { margin-top: 2.5rem; font-size: 1.3rem; }
.stats-table { width: 100%; border-collapse: collapse; margin-top: .75rem; font-size: .95rem; }
.stats-table th, .stats-table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid #e3e8ef; }
.stats-table th { color: var(--navy); background: var(--bg-alt); }

/* Movimiento reducido: sin animaciones extra */
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active, .card img, .card:hover img, .related-card img, .more .arr, .fcard, .quiz-card, .quiz-opt, .nav, .logo img, .nav-dd-menu, .nav-links > a::after, .nav-dd-toggle::after { transition: none !important; animation: none !important; }
  .btn:hover, .card:hover img, .related-card:hover img, .fcard:hover, .quiz-opt:hover { transform: none !important; }
  .sk { animation: none; }
}
.service-content p + p { margin-top: 1rem; }

/* Avisos recientes (tarjetas pequeñas automáticas) */
.recent-title { margin-top: 2.75rem; margin-bottom: 1rem; }
.news-card .fmeta { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .5rem; }
.news-card h3 { font-size: 1.05rem; line-height: 1.35; }
.news-card h3 a { color: inherit; text-decoration: none; }
.news-card.is-loading { min-height: 200px; }
.latest-fallback { margin-top: .5rem; }
.section-quiet .guides-title { color: var(--navy); }
.news-card .fmeta time { display: inline; margin: 0; color: inherit; font: inherit; text-transform: none; letter-spacing: 0; }

/* Texto solo para lectores de pantalla */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Íconos SVG (antes eran emojis 📞 ✉️ 📍 🕘). Toman el color del texto. */
.ico { width: 1em; height: 1em; vertical-align: -0.14em; margin-right: .4em; flex-shrink: 0; }
.callbar .ico { width: 1.1em; height: 1.1em; }

/* Barra superior más compacta en celular: solo el teléfono, letra y espacio más chicos */
@media (max-width: 600px) {
  .topbar { font-size: .78rem; line-height: 1.2; }
  .topbar-inner { padding: .2rem 0; }
  .topbar a { margin-right: 0; }
}

/* ===== Aura naranja al pasar el mouse (como la burbuja del chat) =====
   Menú de arriba y todo lo que se puede tocar en la parte azul de abajo. */
.nav-links > a:not(.btn), .nav-dd-toggle, .nav-dd-menu a, .site-footer a { transition: color .2s, text-shadow .2s; }
/* Menú: las letras se hacen naranjas, con aura, y una luz pasa SOLO por dentro de las letras cada 2 s
   (background-clip:text: el brillo no se sale de las letras ni recorre todo el renglón) */
.nav-links > a:not(.btn):hover, .nav-links > a:not(.btn):focus-visible,
.nav-dd-toggle:hover, .nav-dd-toggle:focus-visible,
.nav-dd-menu a:hover .dd-t, .nav-dd-menu a:focus-visible .dd-t { /* (en la lista: solo el texto, no todo el renglón) */
  color: transparent;
  background: linear-gradient(105deg, var(--accent-text) 42%, #ffc07a 50%, var(--accent-text) 58%) no-repeat;
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 4px rgba(255,140,40,.7)) drop-shadow(0 0 10px rgba(255,140,40,.4));
  animation: letters-sweep 2s ease-in-out infinite;
}
.nav-dd-toggle:hover .dd-caret, .nav-dd-toggle:focus-visible .dd-caret { color: var(--accent-text); }
@keyframes letters-sweep { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }
.nav-links a.btn:hover, .nav-links a.btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(255,140,40,.35), 0 0 16px 4px rgba(255,140,40,.65);
}
.site-footer a:not(.social a):hover, .site-footer a:not(.social a):focus-visible {
  color: #fff; text-shadow: 0 0 6px rgba(255,140,40,1), 0 0 16px rgba(255,140,40,.75);
}
.site-footer .social a { transition: color .2s, transform .2s, filter .2s; }
.site-footer .social a:hover, .site-footer .social a:focus-visible {
  color: #fff; filter: drop-shadow(0 0 5px rgba(255,140,40,1)) drop-shadow(0 0 12px rgba(255,140,40,.7));
}
/* Línea de luz invisible que pasa cada 2 s: el aura parece desplazarse.
   Solo existe mientras el mouse está encima (no gasta nada el resto del tiempo). */
.nav-links a.btn, .site-footer a { position: relative; isolation: isolate; }
.nav-links a.btn:hover::before, .nav-links a.btn:focus-visible::before,
.site-footer a:hover::before, .site-footer a:focus-visible::before {
  content: ""; position: absolute; inset: -6px -12px; z-index: -1; pointer-events: none; border-radius: 999px;
  background: linear-gradient(105deg, transparent 38%, rgba(255,140,40,.6) 50%, transparent 62%) no-repeat;
  background-size: 300% 100%; filter: blur(5px);
  animation: aura-sweep 2s ease-in-out infinite;
}
.nav-links a.btn:hover::before, .nav-links a.btn:focus-visible::before { inset: -8px; border-radius: 14px; background-image: linear-gradient(105deg, transparent 38%, rgba(255,160,70,.85) 50%, transparent 62%); }
@keyframes aura-sweep { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .nav-links > a:not(.btn), .nav-dd-toggle, .nav-dd-menu a, .site-footer a { transition: none; }
  .nav-links a.btn::before, .site-footer a::before, .nav-links > a, .nav-dd-toggle, .nav-dd-menu .dd-t { animation: none !important; }
}
