/* ===========================================================================
   D'Viajeros Cuba — hoja de estilos "gaceta"
   Registro institucional: azul marino oficial, papel marfil, un acento rojo
   fino como en las publicaciones oficiales. Filetes y reglas en lugar de
   sombras, epígrafes en versalitas, secciones numeradas (§) y una ficha
   técnica a modo de documento. Deliberadamente sobrio y estructurado, distinto
   del sitio hermano (cálido, tipo cartel).
   =========================================================================== */

:root {
  --marino: #0B2E59;        /* azul marino oficial */
  --marino-hondo: #06213F;
  --marino-vivo: #16447B;
  --rojo: #C8102E;          /* acento fino, filetes */
  --rojo-hondo: #A50D26;
  --oro: #9C7A2E;           /* sello, muy contenido */

  --papel: #FBFAF6;
  --papel-2: #F1EEE4;
  --blanco: #ffffff;
  --linea: #ded9cb;
  --linea-fuerte: #c3bca9;

  --tinta: #1c2733;
  --tinta-suave: #566372;

  --r: 3px;                 /* radio mínimo: aspecto de documento, no de app */

  --hueco: clamp(1rem, 3vw, 2rem);
  --franja: clamp(3rem, 6.5vw, 5rem);

  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
html, body { max-width: 100%; overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, .97rem + .16vw, 1.06rem);
  line-height: 1.66;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.18; font-weight: 600; letter-spacing: -.012em; text-wrap: balance; color: var(--marino-hondo); font-family: var(--serif); }
h1 { font-size: clamp(1.95rem, 1.35rem + 2.5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2rem); }
h3 { font-size: clamp(1.12rem, 1rem + .55vw, 1.35rem); }

p { margin: 0 0 1.1em; }
a { color: var(--marino-vivo); text-underline-offset: 2px; }
a:hover { color: var(--marino-hondo); }
img, svg { max-width: 100%; height: auto; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--linea); margin: 2.5rem 0; }
::selection { background: rgb(11 46 89 / 15%); }

:focus-visible { outline: 3px solid var(--rojo); outline-offset: 2px; }

.saltar { position: absolute; left: -9999px; top: .5rem; z-index: 90; background: var(--marino-hondo); color: #fff; padding: .6rem 1rem; }
.saltar:focus { left: .5rem; color: #fff; }

/* --- rejas (contenedores) ------------------------------------------------ */

.reja { width: min(100% - 2.5rem, 1180px); margin-inline: auto; }
.reja--lectura { width: min(100% - 2.5rem, 760px); }

/* --- epígrafes y rúbricas ------------------------------------------------ */

.epigrafe {
  margin: 0 0 .9rem;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--marino-vivo);
}

/* Rúbrica de sección con numeral § y filete rojo bajo el número. */
.rubro { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1.7rem; padding-bottom: .7rem; border-bottom: 2px solid var(--linea); }
.rubro--claro { color: #fff; border-bottom-color: rgb(255 255 255 / 22%); }
.rubro--claro { color: #fff; }
.rubro__n {
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 700;
  color: var(--rojo);
  padding-bottom: .15em;
  border-bottom: 2px solid var(--rojo);
  flex: none;
}

/* --- botones ------------------------------------------------------------- */

.boton {
  --bg: var(--marino);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .74rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: var(--r);
  background: var(--bg);
  color: var(--fg);
  font-weight: 650;
  font-size: .95rem;
  text-decoration: none;
  transition: background-color .14s ease;
}
.boton:hover { color: var(--fg); }
.boton--accion { --bg: var(--rojo); }
.boton--accion:hover { --bg: var(--rojo-hondo); }
.boton--perfil { --bg: transparent; --fg: var(--marino-hondo); border-color: var(--linea-fuerte); }
.boton--perfil:hover { --bg: var(--papel-2); border-color: var(--marino); }
.boton--sm { padding: .46rem 1.05rem; font-size: .87rem; }
.boton--lg { padding: .88rem 1.7rem; font-size: 1rem; }

/* --- barra de gobierno --------------------------------------------------- */

.gobbar { background: var(--marino-hondo); color: rgb(255 255 255 / 78%); font-size: .78rem; }
.gobbar__fila { display: flex; align-items: center; gap: .8rem; min-height: 36px; padding-block: .3rem; }
.gobbar__banda { width: 26px; height: 14px; flex: none; border-radius: 1px;
  background: linear-gradient(180deg, var(--marino-vivo) 0 33%, #fff 33% 66%, var(--rojo) 66% 100%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 25%); }
.gobbar__texto { flex: 1; min-width: 0; }
.gobbar .idiomas { margin-left: auto; }

.idiomas { display: inline-flex; border: 1px solid rgb(255 255 255 / 30%); border-radius: var(--r); overflow: hidden; }
.idiomas__op { padding: .12rem .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: rgb(255 255 255 / 78%); text-decoration: none; }
.idiomas__op + .idiomas__op { border-left: 1px solid rgb(255 255 255 / 30%); }
.idiomas__op:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.idiomas__op.on { background: #fff; color: var(--marino-hondo); }
@media (max-width: 620px) { .gobbar__texto { font-size: .72rem; } }

/* --- testera (masthead) -------------------------------------------------- */

.testera { background: var(--papel); border-bottom: 3px solid var(--marino); }
.testera__fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; padding-block: .6rem; }

.marca { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; min-width: 0; }
.marca__sello { flex: none; }
.marca__texto { display: grid; min-width: 0; }
.marca__nombre { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; line-height: 1.1; color: var(--marino-hondo); }
.marca__sub { font-size: .72rem; letter-spacing: .02em; color: var(--tinta-suave); line-height: 1.3; }

.menu { display: flex; align-items: center; gap: .4rem 1.2rem; flex-wrap: wrap; justify-content: flex-end; }
.menu__enlace { color: var(--tinta); text-decoration: none; font-weight: 620; font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; padding: .3rem 0; border-bottom: 2px solid transparent; }
.menu__enlace:hover { color: var(--marino); border-bottom-color: var(--rojo); }

@media (max-width: 800px) { .marca__sub { display: none; } .menu__enlace { display: none; } }
@media (max-width: 470px) {
  .testera__fila { flex-wrap: wrap; }
  .marca { flex: 1 1 100%; }
  .menu { flex: 1 1 100%; justify-content: space-between; padding-bottom: .2rem; }
}

/* --- hero "nota informativa" --------------------------------------------- */

.aviso-hero { padding-block: var(--franja); background: linear-gradient(180deg, var(--papel) 0%, var(--papel-2) 100%); }
.aviso-hero__reja { display: grid; gap: clamp(1.6rem, 3vw, 3rem); align-items: start; }
@media (min-width: 960px) { .aviso-hero__reja { grid-template-columns: 1.35fr .65fr; } }

.nota {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-top: 4px solid var(--marino);
  padding: clamp(1.6rem, 3.5vw, 2.8rem);
}
.nota__cinta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; padding-bottom: .8rem; border-bottom: 1px dashed var(--linea-fuerte); }
.nota__epi { font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rojo); }
.nota__ref { font-family: var(--mono); font-size: .74rem; color: var(--tinta-suave); }
.nota__entrada { font-size: clamp(1.02rem, .96rem + .35vw, 1.16rem); color: var(--tinta-suave); }
.nota__acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ficha técnica */
.ficha { background: var(--marino-hondo); color: rgb(255 255 255 / 88%); padding: clamp(1.4rem, 3vw, 1.9rem); }
.ficha__titulo { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--rojo); }
.ficha__tabla { margin: 0; display: grid; }
.ficha__fila { display: grid; grid-template-columns: 1fr; gap: .1rem; padding: .7rem 0; border-bottom: 1px solid rgb(255 255 255 / 14%); }
.ficha__fila dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #9fb6d4; }
.ficha__fila dd { margin: 0; font-size: .92rem; color: #fff; }
.ficha__sello {
  margin: 1.1rem 0 0; padding-top: 1rem;
  font-family: var(--serif); font-style: italic; font-size: .9rem; color: #cdd9e8;
  text-align: center;
}

/* --- plancha de identidad (banda con foto) ------------------------------- */

.plancha { position: relative; height: clamp(160px, 24vw, 300px); background: var(--marino-hondo); overflow: hidden; border-top: 3px solid var(--rojo); }
.plancha__foto { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; filter: brightness(0.82) saturate(1.02); }
.plancha__pie {
  position: absolute; left: 0; bottom: 0;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: var(--marino-hondo); padding: .4rem .9rem;
}

/* --- trámite (pasos) ----------------------------------------------------- */

.tramite { padding-block: var(--franja); }
.tramite__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--linea); }
.tramite__paso { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.4rem; padding: 1.6rem 0; border-bottom: 1px solid var(--linea); align-items: start; }
.tramite__n {
  grid-row: span 2;
  display: grid; place-items: center;
  width: 2.6rem; height: 2.6rem;
  border: 2px solid var(--marino); color: var(--marino-hondo);
  font-family: var(--serif); font-weight: 600; font-size: 1.2rem;
}
.tramite__paso h3 { margin: 0 0 .2rem; }
.tramite__paso p { margin: 0; color: var(--tinta-suave); font-size: .95rem; }
@media (min-width: 880px) {
  .tramite__lista { grid-template-columns: repeat(3, 1fr); gap: 0 2.5rem; border-bottom: 1px solid var(--linea); }
  .tramite__paso { border-bottom: 0; grid-template-columns: 1fr; }
  .tramite__n { grid-row: auto; margin-bottom: .3rem; }
}

/* --- casos (rejilla de accesos) ------------------------------------------ */

.casos { padding-block: var(--franja); background: var(--marino); color: #fff; }
.casos__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: rgb(255 255 255 / 16%); border: 1px solid rgb(255 255 255 / 16%); }
@media (min-width: 720px) { .casos__lista { grid-template-columns: 1fr 1fr; } }
.caso { background: var(--marino); }
.caso a { display: grid; gap: .4rem; padding: 1.5rem 1.6rem; text-decoration: none; color: #fff; height: 100%; position: relative; }
.caso a:hover { background: var(--marino-hondo); }
.caso__rot { font-family: var(--serif); font-size: 1.2rem; color: #fff; }
.caso__desc { font-size: .92rem; color: rgb(255 255 255 / 78%); }
.caso__mas { position: absolute; top: 1.5rem; right: 1.6rem; color: var(--rojo); font-size: 1.2rem; }
.caso a:hover .caso__mas { color: #ff7b8e; }

/* --- ensayo / prosa ------------------------------------------------------ */

.ensayo { padding-block: var(--franja); }

.prosa { font-size: 1.04rem; }
.prosa > *:first-child { margin-top: 0; }
.prosa h2 { margin-top: 2.5rem; scroll-margin-top: 5.5rem; }
.prosa h3 { margin-top: 2rem; scroll-margin-top: 5.5rem; }
.prosa li { margin-bottom: .45em; }
.prosa li::marker { color: var(--rojo); }

.prosa blockquote {
  margin: 1.9rem 0;
  padding: 1.05rem 1.35rem;
  background: var(--papel-2);
  border-left: 3px solid var(--marino);
}
.prosa blockquote p:last-child { margin-bottom: 0; }

.prosa figure { margin: 2.1rem 0; }
.prosa figure img { width: 100%; border: 1px solid var(--linea); background: var(--blanco); }
.prosa figcaption { margin-top: .5rem; font-size: .84rem; color: var(--tinta-suave); text-align: center; font-style: italic; }

.prosa table { width: 100%; border-collapse: collapse; margin: 1.9rem 0; font-size: .92rem; background: var(--blanco); border: 1px solid var(--linea); }
.prosa :is(th, td) { padding: .66rem .85rem; border: 1px solid var(--linea); text-align: left; vertical-align: top; }
.prosa thead th { background: var(--marino); color: #fff; border-color: var(--marino); font-weight: 600; font-family: var(--serif); }
.prosa tbody tr:nth-child(even) { background: var(--papel); }

.prosa code { font-family: var(--mono); font-size: .88em; background: var(--papel-2); padding: .12em .4em; }

/* gaceta.js envuelve las tablas anchas para desplazarlas; media query de respaldo */
.rueda { overflow-x: auto; margin: 1.9rem 0; -webkit-overflow-scrolling: touch; }
.rueda table { margin: 0; min-width: 34rem; }
@media (max-width: 640px) { .prosa > table { display: block; overflow-x: auto; } }

/* --- notas / callouts ---------------------------------------------------- */

.nota-callout, .prosa .nota, .idx__pie .nota, .faq .nota { }
.prosa .nota, .nota--tip, .nota--cta { }
.nota--tip {
  margin: 2.1rem 0; padding: 1.15rem 1.35rem;
  background: #fbf6ea; border: 1px solid var(--linea); border-left: 5px solid var(--oro);
}
.nota--tip > *:last-child { margin-bottom: 0; }
.nota--tip strong { display: block; margin-bottom: .35rem; color: var(--marino-hondo); font-family: var(--serif); }
.nota--cta {
  margin: 2.1rem 0; padding: 2rem 1.6rem; text-align: center; color: #fff;
  background: var(--marino); border-top: 4px solid var(--rojo);
}
.nota--cta strong { display: block; margin-bottom: .35rem; font-size: 1.15rem; color: #fff; font-family: var(--serif); }
.nota--cta p { color: rgb(255 255 255 / 85%); }
.nota--cta a:not(.boton) { color: #fff; }
.nota--cta .boton { margin-top: .6rem; }

/* --- registro (listado de documentos) ----------------------------------- */

.recientes { padding-block: var(--franja); background: var(--papel-2); }
.recientes__cabeza { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.recientes__cabeza .rubro { flex: 1 1 auto; }
.masenlace { font-weight: 650; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.masenlace:hover { text-decoration: underline; }

.registro { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--marino); }
.registro__fila { border-bottom: 1px solid var(--linea); }
.registro__fila a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: .3rem 1.4rem;
  padding: 1.3rem 0;
  text-decoration: none; color: inherit;
}
.registro__fila a:hover { background: var(--blanco); }
.registro__n { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: var(--rojo); grid-row: span 2; }
.registro__epi { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-suave); margin-bottom: .2rem; }
.registro__titulo { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--marino-hondo); line-height: 1.25; }
.registro__desc { display: block; font-size: .92rem; color: var(--tinta-suave); margin-top: .3rem; }
.registro__fecha { font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--tinta-suave); white-space: nowrap; grid-row: span 2; text-align: right; }
.registro__mas { display: none; }

@media (max-width: 700px) {
  .registro__fila a { grid-template-columns: auto 1fr; }
  .registro__fecha { grid-column: 2; grid-row: auto; text-align: left; margin-top: .3rem; }
}

/* --- índice -------------------------------------------------------------- */

.idx__testera { padding-block: var(--franja) 0; }
.idx__intro { font-size: 1.08rem; color: var(--tinta-suave); }
.idx__cuerpo { padding-block: var(--franja); }
.idx__pie { padding-bottom: var(--franja); }
.registro--indice .registro__fila a { padding: 1.6rem 0; }

/* --- página de documento ------------------------------------------------- */

.doc { padding-block: clamp(1.4rem, 4vw, 2.4rem) var(--franja); }
.migas { font-size: .82rem; color: var(--tinta-suave); margin-bottom: 1.3rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.migas a { color: var(--tinta-suave); text-decoration: none; }
.migas a:hover { color: var(--marino); text-decoration: underline; }

.doc__testera { padding-bottom: 1.7rem; border-bottom: 2px solid var(--marino); margin-bottom: 2.2rem; }
.doc__sumario { font-size: 1.12rem; color: var(--tinta-suave); }
.doc__meta { font-family: var(--mono); font-size: .8rem; color: var(--tinta-suave); display: flex; gap: .5rem; flex-wrap: wrap; margin: 0; }

.doc__pie { margin-top: 2.9rem; padding-top: 1.7rem; border-top: 2px solid var(--linea); display: flex; gap: .8rem; flex-wrap: wrap; }

/* --- faq ----------------------------------------------------------------- */

.faq { padding-block: var(--franja); }
.es-portada .faq { background: var(--papel-2); }
.faq__lista { display: grid; gap: 0; border-top: 1px solid var(--linea); }
.faq__item { border-bottom: 1px solid var(--linea); background: var(--blanco); }
.faq__p { cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.15rem; font-weight: 650; position: relative; color: var(--marino-hondo); font-family: var(--serif); }
.faq__p::-webkit-details-marker { display: none; }
.faq__p::after { content: "+"; position: absolute; right: 1.15rem; top: 50%; transform: translateY(-50%); font-size: 1.35rem; font-weight: 400; color: var(--rojo); }
.faq__item[open] .faq__p::after { content: "\2212"; }
.faq__p:hover { background: var(--papel); }
.faq__r { padding: 0 1.15rem 1.05rem; color: var(--tinta-suave); }
.faq__r p:last-child { margin-bottom: 0; }

/* --- páginas con formulario ---------------------------------------------- */

.formtestera { padding-block: var(--franja) 1.4rem; text-align: center; }
.formtestera p { color: var(--tinta-suave); }
.formcuerpo { padding-block: 1.5rem var(--franja); }
.formcuerpo .reja { max-width: 900px; }

/* --- pie ----------------------------------------------------------------- */

.pie { background: var(--marino-hondo); color: rgb(255 255 255 / 78%); padding-block: var(--franja) 2rem; font-size: .92rem; border-top: 4px solid var(--rojo); }
.pie a { color: rgb(255 255 255 / 84%); text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; }
.pie__rejilla { display: grid; gap: 2.2rem; }
@media (min-width: 760px) { .pie__rejilla { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .pie__rejilla { grid-template-columns: 1.7fr .75fr .75fr 1.4fr; } }

.marca--pie .marca__nombre { color: #fff; }
.marca--pie .marca__sub { color: rgb(255 255 255 / 58%); display: block; }

.pie__seguro { margin: 1.25rem 0; font-size: .84rem; color: rgb(255 255 255 / 66%); }
.pago__etiqueta { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: rgb(255 255 255 / 48%); margin-bottom: .5rem; }
.pago { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.pago img { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgb(255 255 255 / 12%); }

.pie__col h2 { font-family: var(--serif); font-size: 1rem; color: #fff; margin-bottom: .85rem; }
.pie__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .48rem; }
.pie__ayuda p { font-size: .86rem; }
.pie__aviso { font-size: .78rem; color: rgb(255 255 255 / 60%); line-height: 1.6; }
.pie__aviso a { text-decoration: underline; }

.pie__base { margin: 2.3rem 0 0; padding-top: 1.35rem; border-top: 1px solid rgb(255 255 255 / 14%); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pie__base small { font-size: .74rem; color: rgb(255 255 255 / 50%); }

/* --- impresión ----------------------------------------------------------- */

@media print {
  .gobbar, .testera, .pie, .doc__pie, .nota--cta, .saltar { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prosa a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
