/* ============================= */
/* RESET BÁSICO */
/* ============================= */

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

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background-color: #f4f7f9;
  color: #222;
}

/* ============================= */
/* CONTENEDOR PRINCIPAL */
/* ============================= */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 25px;
}

/* ============================= */
/* TIPOGRAFÍA */
/* ============================= */

h1 {
  text-align: center;
  margin: 30px 0 20px 0;
  font-size: 2rem;
  color: #0d3b66;
}

h2 {
  margin: 35px 0 15px 0;
  color: #145374;
  border-bottom: 2px solid #d6e4f0;
  padding-bottom: 6px;
}

p {
  margin-bottom: 18px;
  text-align: justify;
}

/* ============================= */
/* ENLACES */
/* ============================= */

a {
  color: #0d6efd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================= */
/* NAVBAR */
/* ============================= */

header {
  background-color: #0d3b66;
}

.nav_ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nav_li {
  margin: 0;
}

.nav_li a {
  display: block;
  padding: 15px 18px;
  color: white;
  text-align: center;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.nav_li a:hover {
  background-color: #145374;
}

.nav_active {
  background-color: #1b4965;
  font-weight: bold;
}

/* ============================= */
/* IMÁGENES PRINCIPALES */
/* ============================= */

.imagenes-principales {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 25px 0;
}

.imagenes-principales img {
  max-width: 480px;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ============================= */
/* SECCIÓN FINAL */
/* ============================= */

.seccion-final {
  text-align: center;
  margin-top: 40px;
}

.seccion-final img {
  max-width: 900px;
  width: 90%;
  height: auto;
  margin-top: 15px;
  border-radius: 6px;
}

/* ============================= */
/* FOOTER */
/* ============================= */

footer {
  background-color: #e9eef2;
  padding: 25px;
  margin-top: 40px;
  font-size: 0.9rem;
  color: #444;
}

footer p {
  margin-bottom: 12px;
  text-align: justify;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 768px) {

  .nav_ul {
    flex-direction: column;
  }

  .nav_li a {
    border-top: 1px solid rgba(255,255,255,0.2);
  }

  h1 {
    font-size: 1.6rem;
  }

  main {
    padding: 15px;
  }
}

/**/
.verde { color: #00ff00; }
.rojo  { color: #ff0000; }
.azul  { color: #0000ff; }

.ultima-actualizacion {
  color: #ee620e;
  font-weight: bold;
  margin-top: 15px;
}

.panel-animaciones {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.panel-item {
  text-align: center;
  max-width: 320px;
}

.panel-item img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-top: 10px;
}

.descarga-datos a {
  text-decoration: none;
  color: #0066cc;
  font-weight: bold;
}

.panel-localidades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-items: center;
  margin-top: 30px;
  text-align: center
}

.panel-localidades img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-top: 6px;
}

/* Videos responsivos */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 40px auto;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

/* PDF responsivo al ancho del contenedor */
.pdf-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 40px auto;
    padding-bottom: 75%; /* Ajusta altura relativa, aquí 4:3 aprox */
    height: 0;
}

.pdf-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border: none;
}