html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #333;
}

header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  background: transparent;
}

header h1 {
  margin: 0.5rem 0;
  font-size: 2.5rem;
}

header nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

header nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.3s;
}

header nav ul li a:hover {
  background: rgba(255,255,255,0.2);
}

main {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Secciones con imagen */
.section-with-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 2rem;
  min-height: 450px;
}

.section-with-image .text {
  flex: 1 1 55%;
  max-width: 600px;
}

.section-with-image .image {
  flex: 1 1 40%;
  text-align: center;
}

.section-with-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Colores de fondo con degradados */
.bg-lightblue { background: linear-gradient(180deg, #e6f7ff, #d0f0ff); }
.bg-lightgreen { background: linear-gradient(180deg, #e6ffe6, #c8ffc8); }
.bg-lightyellow { background: linear-gradient(180deg, #fffbe6, #fff0b3); }
.bg-lightcoral { background: linear-gradient(180deg, #ffe6e6, #ffcccc); }
.bg-lightpurple { background: linear-gradient(180deg, #f3e6ff, #e0c8ff); }

h2 {
  color: #023e8a;
}

/* Resumen de datos recientes */
.resumen-card {
  background: #caf0f8;
  border: 2px solid #0077b6;
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 600px;
  margin: 2rem auto;
  font-size: 1.1rem;
}

.resumen-card p {
  margin: 0.5rem 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: #0077b6;
  color: white;
}

/* Banner */
#banner {
  background-image: url('Images/riosucio.jpg');
  background-size: cover;
  background-position: center;
  height: 400px;
  position: relative;
}

#banner .banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 1;
  padding: 1rem;
}

#banner .banner-content h1 {
  font-size: 3rem;
  font-weight: bold;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#banner .banner-content .slogan {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  font-style: italic;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card h3 {
  margin-bottom: 1rem;
  color: #0077b6;
  font-size: 1.2rem;
}

/* Lista de zonas críticas */
#zonasCriticas {
  list-style: none;
  padding: 0;
}

#zonasCriticas li {
  background: #eaf6ff;
  margin: 0.5rem 0;
  padding: 0.7rem;
  border-radius: 8px;
}

/* Divider visual */
.image-divider {
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.image-divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .section-with-image {
    flex-direction: column;
  }
  header nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
}

#phChart, #turbidezChart, #temperaturaChart {
  height: 300px;  /* or any fixed height you like */
  width: 100%;    /* full width of the container */
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  height: 350px; /* fixed height to contain chart */
}

