body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f7f7f7;
  color: #222;
  margin: 0;
  padding: 0;
}
header {
  background: #262a36;
  color: #fff;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
}
.logo {
  height: 48px;
  width: auto;
  border-radius: 6px;
}
header h1 {
  flex: 1;
  font-size: 1.5rem;
  margin: 0;
  min-width: 150px;
}
nav#menu-principal {
  display: flex;
  gap: 1rem;
}
nav#menu-principal a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  transition: background 0.2s;
}
nav#menu-principal a:hover {
  background: #0057b8;
}
main {
  background: #fff;
  margin: 2rem auto;
  padding: 2rem;
  max-width: 800px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-radius: 12px;
}
.articulo h2, h2 {
  margin-top: 0;
  font-size: 2rem;
}
time, .fecha {
  color: #7a7a7a;
  font-size: 0.95em;
  display: block;
  margin-bottom: 1rem;
}
.contenido-articulo img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 1em;
  margin-bottom: 1em;
}
#listado-articulos ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#listado-articulos li {
  margin-bottom: 1.3em;
  font-size: 1.18em;
  display: flex;
  align-items: center;
  gap: 1em;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.7em;
}
#listado-articulos li:last-child {
  border-bottom: none;
}
#listado-articulos a {
  color: #0057b8;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.06em;
  transition: color 0.2s;
}
#listado-articulos a:hover {
  color: #003b75;
  text-decoration: underline;
}
footer {
  background: #262a36;
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  font-size: 1rem;
  border-radius: 0 0 12px 12px;
  margin: 0;
}
/* Botón volver arriba */
#volver-arriba {
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 99;
  background: #0057b8;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.2s, transform 0.2s;
}
#volver-arriba:hover {
  background: #003b75;
  transform: scale(1.09);
}
/* Menú hamburguesa */
#menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 40px;
  width: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  z-index: 101;
}
#menu-toggle span {
  display: block;
  width: 26px;
  height: 4px;
  margin: 3px 0;
  background: #fff;
  border-radius: 3px;
  transition: 0.3s;
}
@media (max-width: 900px) {
  main {
    margin: 1.2rem;
    padding: 1.2rem;
  }
}
@media (max-width: 700px) {
  nav#menu-principal {
    display: none;
    flex-direction: column;
    gap: 0;
    background: #262a36;
    position: absolute;
    top: 70px;
    right: 14px;
    width: 180px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    padding: 0.7em 0;
    z-index: 100;
  }
  nav#menu-principal a {
    color: #fff;
    padding: 1em 1.2em;
    font-size: 1.05em;
    border-radius: 0;
    display: block;
    margin: 0;
  }
  #menu-toggle {
    display: flex;
  }
  header {
    position: relative;
    flex-wrap: wrap;
  }
}
nav#menu-principal.menu-abierto {
  display: flex !important;
}
#menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
#menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (max-width: 600px) {
  main {
    margin: 0.5rem;
    padding: 0.7rem;
    max-width: 100%;
    border-radius: 7px;
  }
  .articulo h2, h2 {
    font-size: 1.3rem;
  }
  footer {
    font-size: 0.92rem;
    border-radius: 0 0 7px 7px;
  }
  #volver-arriba {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
  }
  #listado-articulos li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4em;
  }
  .fecha {
    margin-left: 0;
  }
}
a:focus, button:focus {
  outline: 2px solid #0057b8;
  outline-offset: 2px;
}
