/* Estilos generales de la página */
body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  color: #333333;
  line-height: 1.6;
  scroll-behavior: smooth; /* Desplazamiento suave al hacer clic en el menú */
}

/* Cabecera y logotipos */
.header-container {
  text-align: center;
  margin-bottom: 15px;
}

.logo-tiempo {
  text-align: center;
  margin-bottom: 20px;
}

/* Estilos de la botonera-menú superior */
.menu-navegacion {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto 30px auto;
  background: #ffffff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #dcdde1;
}

.btn-menu {
  background-color: #2980b9;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
  transition: background-color 0.2s ease;
}

.btn-menu:hover {
  background-color: #1f618d;
}

/* Contenedor principal en cuadrícula flexible para widgets */
.weather-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 35px auto;
}

/* Tarjetas individuales de widgets */
.weather-card {
  background: #ffffff;
  border: 1px solid #dcdde1;
  border-radius: 12px;
  padding: 20px;
  flex: 1 1 280px;
  max-width: 360px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.weather-card > div {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Tarjeta especial destacada para el desglose horario */
.weather-card-highlight {
  background: #ffffff;
  border: 2px solid #2980b9;
  border-radius: 12px;
  padding: 20px;
  flex: 1 1 280px;
  max-width: 360px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 6px 18px rgba(41, 128, 185, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 13px;
  font-weight: bold;
  color: #2980b9;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  width: 100%;
}

.btn-app {
  display: inline-block;
  background-color: #2980b9;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
  margin-top: 15px;
  transition: background-color 0.2s;
}

.btn-app:hover {
  background-color: #1f618d;
}

/* Sección AEMET */
.aemet-container {
  text-align: center;
  margin: 40px 0;
}

.aemet-iframe {
  width: 100%;
  max-width: 1100px;
  height: 600px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ESTILOS DE LA TABLA PLUVIOMÉTRICA */
.plubi-container {
  max-width: 1100px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 14px;
  padding: 25px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.plubi-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 10px;
}

.plubi-title {
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
  margin: 0;
}

.plubi-info {
  font-size: 13px;
  color: #555;
}

.plubi-scroll {
  width: 100%;
  overflow-x: auto;
}

table.pluviometria {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 13px;
  min-width: 750px;
}

table.pluviometria th, table.pluviometria td {
  border: 1px solid #dcdde1;
  padding: 6px 4px;
}

table.pluviometria th {
  background-color: #2c3e50;
  color: #ffffff;
  font-weight: bold;
}

table.pluviometria tr:nth-child(even) {
  background-color: #f8f9fa;
}

table.pluviometria td[contenteditable="true"]:hover {
  background-color: #ebf3fb;
}

.fila-totales {
  background-color: #e2e8f0 !important;
  font-weight: bold;
  color: #2c3e50;
}

.plubi-resumen {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #dcdde1;
  gap: 15px;
}

.resumen-box {
  background: #f8f9fa;
  border: 1px solid #cbd5e1;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  color: #1e293b;
}

.resumen-valor {
  color: #2563eb;
  font-size: 16px;
}

/* Sección Cabañuelas Destacada */
.cabanuelas-container {
  background: #ffffff;
  border-radius: 14px;
  padding: 30px 15px;
  max-width: 1100px;
  margin: 40px auto 20px auto;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border-top: 4px solid #2c3e50;
}

.cabanuelas-heading {
  font-size: 28px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  color: #2c3e50;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.cabanuelas-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ancho uniforme para todas las columnas de los meses en la tabla de pluviometría */
table.pluviometria th:not(:first-child), 
table.pluviometria td:not(:first-child) {
  width: 7%; /* Reparte el espacio de forma equitativa entre los 12 meses */
  min-width: 55px; /* Evita que se compriman demasiado en pantallas pequeñas */
}

/* La columna de los días (primera columna) un poco más estrecha */
table.pluviometria th:first-child, 
table.pluviometria td:first-child {
  width: 4%;
  min-width: 35px;
}