/*
 * Periódico El Puerto: public site styles on top of bootstrap.min.css (recolored to navy).
 * Adapted from the "Newsers" template by HTML Codex (https://htmlcodex.com, CC BY 4.0). Mobile first.
 */
:root {
  --azul-noche: #1e3a5f;
  --azul: #2b6cb0;
  --oro: #d69e2e;
  --oro-claro: #f6e3b4;
  --fondo-oscuro: #14273f;
  --texto: #2d3748;
  --tenue: #5f6b7d; /* 4.5:1 on white and on --bs-light */
  --bs-primary: #1e3a5f;
}
body { font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--texto); overflow-x: clip; }
/* Sticky footer: on short pages (404, empty sections) the footer still sits at the bottom of the window. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > .pie { margin-top: auto; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: "Raleway", system-ui, sans-serif; font-weight: 800; color: var(--azul-noche); }
a { color: var(--azul); }
a:hover { color: var(--azul-noche); }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.text-primary { color: var(--azul-noche) !important; }
.btn-primary { background: var(--azul-noche); border-color: var(--azul-noche); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--azul); border-color: var(--azul); color: #fff; }
.saltar { position: absolute; left: -9999px; top: 0; background: var(--oro); color: #000; padding: .5rem 1rem; z-index: 1100; }
.saltar:focus { left: 1rem; }
.btn-sm-square { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.link-hover { transition: color .3s; }
.link-hover:hover { color: var(--azul) !important; }
.img-zoomin { transition: transform .5s; }
a:hover .img-zoomin { transform: scale(1.06); }

/* Top bar */
.barra-superior { background: var(--fondo-oscuro); color: #e2e8f0; font-size: .9rem; }
.barra-superior .container { min-width: 0; }
.ultimo { min-width: 0; }
.ultimo a { color: #fff; text-decoration: none; min-width: 0; }
.ultimo-icono { background: var(--oro); color: var(--fondo-oscuro); }
.ultimo-etiqueta { font-weight: 600; white-space: nowrap; border-right: 1px solid rgba(255,255,255,.4); }
.fecha-hoy { white-space: nowrap; color: #cbd5e0; }
.redes { gap: .75rem; }
.redes a { color: #cbd5e0; }
.redes a:hover { color: var(--oro) !important; }

/* Navbar */
.barra-menu { border-bottom: 3px solid var(--oro); box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.navbar-brand img { height: 44px; width: auto; }
.navbar .nav-link { font-family: "Raleway", sans-serif; font-weight: 600; color: var(--azul-noche) !important; padding: .6rem .75rem !important; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--azul) !important; box-shadow: inset 0 -3px 0 var(--oro); }
.navbar .dropdown-item.active, .navbar .dropdown-item:active { background: var(--azul-noche); }
.navbar-toggler { border-color: var(--azul-noche); }
.navbar-collapse { max-height: calc(100vh - 70px); overflow-y: auto; }
@media (min-width: 1200px) {
  .navbar-brand img { height: 50px; }
  .navbar-collapse { max-height: none; overflow: visible; }
}

/* Section titles (template "news-2" rule) */
.titulo-bloque { position: relative; display: flex; align-items: center; gap: 1rem; font-size: 1.5rem; margin-bottom: 1.25rem; }
.titulo-bloque::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--oro), rgba(214,158,46,0)); }

/* Image frames and placeholder */
.marco { position: relative; overflow: hidden; background: var(--azul-noche); width: 100%; }
.marco img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.foto-vacia { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--azul-noche) 0%, #2a4d78 100%); border-bottom: 4px solid var(--oro); }
.foto-vacia span { color: var(--oro); font: 800 clamp(.8rem, 3vw, 1.2rem) "Raleway", sans-serif; text-transform: uppercase;
  letter-spacing: .12em; text-align: center; padding: 0 .5rem; }
.tarjeta-normal .marco { border-radius: 0 !important; }

/* Cards */
.tarjeta-titulo a, .hero-titulo a { color: var(--azul-noche); text-decoration: none; }
.etiqueta-seccion { display: inline-block; margin-bottom: .35rem; color: var(--azul); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; text-decoration: none; }
.antetitulo { color: var(--oro); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.subtitulo { color: var(--texto); }
.meta { color: var(--tenue); font-size: .82rem; }
.hero-titulo { font-size: clamp(1.6rem, 4.5vw, 2.6rem); line-height: 1.2; margin: .25rem 0 .6rem; }
.hero .subtitulo { font-size: 1.05rem; }
.tarjeta-lista + .tarjeta-lista { margin-top: 1rem; }
.lista-lateral { background: var(--bs-light); }

/* Category tabs (template "What's New") */
.pestanas { gap: .5rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
.pestanas .nav-link { white-space: nowrap; background: var(--bs-light); color: var(--azul-noche); border-radius: 999px; padding: .4rem 1rem; font-weight: 600; }
.pestanas .nav-link.active, .pestanas .nav-link:hover { background: var(--azul-noche); color: #fff; }

/* Latest news: horizontal row with scroll snap (replaces the template's Owl carousel) */
.fila-desplazable { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 1rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: .75rem; overscroll-behavior-x: contain; scrollbar-width: thin; }
.fila-desplazable > * { scroll-snap-align: start; min-width: 0; }
@media (min-width: 576px) { .fila-desplazable { grid-auto-columns: 46%; } }
@media (min-width: 992px) { .fila-desplazable { grid-auto-columns: calc((100% - 3rem) / 4); } }

/* Trending tags */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.chips li { background: var(--bs-light); color: var(--azul-noche); border: 1px solid #dfe5ec; border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; }
.chips a { color: inherit; text-decoration: none; }
.chips a:hover, .chips a:focus { color: var(--bs-primary); text-decoration: underline; }
.autor a { color: inherit; }
.descripcion-seccion { color: var(--tenue); max-width: 44rem; }

/* Ads: space reserved to avoid layout shift */
.anuncio { margin: 1.25rem 0; min-height: 280px; text-align: center; }
.anuncio-cabecera { min-height: 100px; margin: 0; }
.anuncio-lateral { min-height: 600px; }
.anuncio-etiqueta { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tenue); }
@media (min-width: 992px) { .lateral-fija { position: sticky; top: 90px; } }

/* Inner pages */
.breadcrumb { font-size: .85rem; margin-bottom: .75rem; }
.breadcrumb a { text-decoration: none; }
.paginacion { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.paginacion span { color: var(--tenue); }

/* Article */
.articulo h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.2; }
.articulo-subtitulo { font-size: 1.15rem; color: var(--texto); }
.articulo-meta { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; color: var(--tenue); font-size: .9rem;
  border-top: 1px solid #dfe5ec; border-bottom: 1px solid #dfe5ec; padding: .6rem 0; }
.autor { font-weight: 600; color: var(--texto); }
.articulo-figura figcaption { font-size: .85rem; color: var(--tenue); padding-top: .5rem; }
.credito { display: block; font-style: italic; }
.articulo-cuerpo { font-size: 1.08rem; line-height: 1.8; max-width: 44rem; overflow-wrap: anywhere; }
.articulo-cuerpo p { margin: 0 0 1.1rem; }
.articulo-subtitulo { font-family: 'Raleway', sans-serif; font-weight: 800; font-size: 1.45rem; line-height: 1.3; color: #1e3a5f; margin: 2rem 0 .8rem; padding-left: .75rem; border-left: 4px solid #d69e2e; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fuentes { border-top: 1px solid #dfe5ec; }
.fuentes ul { padding-left: 1.2rem; overflow-wrap: anywhere; }
.actualizada { color: var(--tenue); font-size: .85rem; }

/* Static pages */
.pagina-simple { max-width: 52rem; }
.pagina-simple h2 { font-size: 1.3rem; margin-top: 1.75rem; }
.correo-destacado { font-size: 1.25rem; font-weight: 700; overflow-wrap: anywhere; }
.nota-legal { color: var(--tenue); font-size: .9rem; }

/* Footer */
.pie { background: var(--fondo-oscuro); color: #cbd5e0; border-top: 4px solid var(--oro); }
.pie a { color: #e2e8f0; text-decoration: none; overflow-wrap: anywhere; }
.pie a:hover { color: var(--oro); text-decoration: underline; }
.pie li { padding: .2rem 0; }
.pie-titulo { font: 700 .85rem "Raleway", sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--oro); margin-bottom: 1rem; }
.pie-secciones { columns: 2; }
.copyright { border-top: 1px solid rgba(255,255,255,.1); color: #a0aec0; }
.credito-plantilla a { color: #e2e8f0; border-bottom: 1px solid currentColor; }

/* Cookie notice (created by cookies.js) */
.aviso-cookies { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: .75rem 1rem; padding: .85rem 16px; background: #1a202c; color: #f7fafc;
  box-shadow: 0 -4px 12px rgba(0,0,0,.2); font-size: .9rem; }
.aviso-cookies p { margin: 0; max-width: 46rem; }
.aviso-cookies a { color: #90cdf4; }
.boton { display: inline-block; background: var(--oro); color: #1a202c; border: 0; border-radius: 999px; padding: .45rem 1.2rem;
  font-weight: 600; cursor: pointer; }
.boton:hover { background: #ecc94b; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.fila-desplazable .tarjeta-normal { background: #fff !important; }
