@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600&family=Oswald:wght@400;500;700&family=Raleway:wght@300;400;600&display=swap');

:root {
  --azul-principal: #155cae;
  --azul-oscuro: #064488;
  --texto: #333333;
  --borde-suave: #cccccc;
}

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

  main.main-content.wrap {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
  }
  .numero-detalle {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    box-sizing: border-box;
  }
  .lista-articulos {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 28px 0 0;
    box-sizing: border-box;
  }

body {
  font-family: 'Raleway', sans-serif;
  color: var(--texto);
  line-height: 1.6;
  background-color: #ffffff;
}

a {
  text-decoration: none;
  color: var(--azul-principal);
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2em;
}

/* Cabecera estilo Twenty Seventeen */
.site-header {
  position: relative;
  width: 100%;
  min-height: 75vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.45)), url('../img/cropped-cropped-15_M.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}

.header-branding {
  padding: 2.5rem 2em;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.custom-logo-link img {
  max-height: 80px;
  width: auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px;
  border-radius: 3px;
}

.site-title-group h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.site-description {
  font-size: 1.1rem;
  color: #f0f0f0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Barra de navegación */
.navigation-top {
  background-color: #ffffff;
  border-top: 1px solid #eeeeee;
  border-bottom: 1px solid #dddddd;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.main-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.main-menu > li {
  position: relative;
}

.main-menu a {
  display: block;
  padding: 1rem 1.1rem;
  font-family: 'Oswald', sans-serif;
  font-size: 1.04em;
  color: var(--azul-principal);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.main-menu a:hover,
.main-menu a.activo {
  color: var(--azul-oscuro);
  background-color: #f4f8fc;
}

/* Submenús desplegables */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 220px;
  list-style: none;
  border: 1px solid #dddddd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 200;
}

.main-menu > li:hover .sub-menu {
  display: block;
}

.sub-menu a {
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  text-transform: none;
  border-bottom: 1px solid #f0f0f0;
}

/* Sección principal de Números */
.main-content {
  padding: 3.5rem 0;
}

.page-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--azul-principal);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--azul-principal);
  padding-bottom: 0.5rem;
}

.numeros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.numero-card {
  border: 1px solid var(--azul-principal);
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.numero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(21, 92, 174, 0.15);
}

.numero-card img {
  width: 100%;
  height: auto;
  border: 1px solid var(--borde-suave);
  margin-bottom: 1rem;
  display: block;
}

.numero-card h4 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 1.05em;
  color: var(--azul-principal);
  text-align: right;
  line-height: 1.35;
}

/* Estilos para páginas interiores de cada número */
.numero-detalle {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.numero-portada img {
  width: 100%;
  height: auto;
  border: 1px solid var(--borde-suave);
}

.articulo-item {
  border-bottom: 1px solid #e5e5e5;
  padding: 1.2rem 0;
}

.articulo-titulo {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--texto);
  margin-bottom: 0.4rem;
}

.articulo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.autor {
  font-size: 0.95rem;
  font-weight: 600;
  color: #444444;
}

.paginas {
  font-size: 0.85rem;
  color: #666666;
}

a.descarga {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--azul-principal);
  border-bottom: 1px solid var(--azul-principal);
  padding-bottom: 2px;
}

/* Sellos y Pie de página */
.sellos-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eeeeee;
}

.sellos-bar img {
  height: 90px;
  width: auto;
}

.site-footer {
  background-color: var(--azul-oscuro);
  color: #ffffff;
  margin-top: 3rem;
  padding: 3rem 0;
  font-size: 0.9em;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

.social-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

.footer-legal {
  text-align: justify;
}

.footer-legal p {
  margin-bottom: 0.8rem;
}

.footer-credits {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #d0e1f5;
}

@media screen and (max-width: 768px) {
  .site-header {
    min-height: 50vh;
    background-attachment: scroll;
  }
  .header-branding {
    flex-direction: column;
    text-align: center;
  }
  .numero-detalle,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
