/* ===================================================
   DEESPAÑA.COM - EL TIEMPO EN ESPAÑA & WIDGETS
   =================================================== */

/* --- 1. BARRA DE ACTUALIDAD EN HOMEPAGE --- */
.home-portal-bar {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  margin: 1rem auto 2.5rem auto;
  max-width: 1140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Montserrat', sans-serif;
}

.home-portal-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
}

.home-portal-date .portal-date-icon {
  font-size: 1.15rem;
}

.home-portal-weather {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.home-portal-weather:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  border-color: #38bdf8;
}

.portal-weather-city {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fbbf24;
}

.portal-weather-icon {
  font-size: 1.25rem;
}

.portal-weather-temp {
  font-weight: 800;
  font-size: 1.05rem;
  color: #38bdf8;
}

.portal-weather-desc {
  font-size: 0.85rem;
  color: #94a3b8;
}

.portal-weather-badge {
  font-size: 0.78rem;
  background: #dc2626;
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --- 2. PILL CLIMA EN HEADER NAVBAR --- */
.nav-weather-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  transition: all 0.3s ease !important;
}

.nav-weather-pill:hover {
  color: #7dd3fc !important;
  transform: translateY(-1px);
}

.nav-weather-badge {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* --- 3. PÁGINA COMPLETA EL TIEMPO EN ESPAÑA --- */
.weather-page-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0 4rem 0;
  font-family: 'Montserrat', sans-serif;
}

.weather-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.weather-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.weather-title {
  font-size: 2.3rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.weather-subtitle {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Control de Capas de Radar */
.radar-controls-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}

.radar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.radar-header-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.radar-layer-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-radar-layer {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-radar-layer:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-radar-layer.active {
  background: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.windy-iframe-wrapper {
  width: 100%;
  height: 520px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
}

.windy-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* --- 4. CIUDADES DE ESPAÑA (12 CAPITALES) --- */
.cities-weather-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2.25rem 2rem;
  margin: 3.5rem 0;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
}

.section-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1e293b;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-section-sub {
  text-align: center;
  color: #64748b;
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Cabecera de la tabla */
.cities-table-header {
  display: grid;
  grid-template-columns: 55px 230px 1fr 140px 110px 90px;
  gap: 1rem;
  align-items: center;
  padding: 0.6rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 0.75rem;
}

.cities-table-header .col-head-temp {
  text-align: right;
}

.cities-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.city-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #0284c7;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: grid;
  grid-template-columns: 55px 230px 1fr 140px 110px 90px;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

.city-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  border-color: #94a3b8;
  border-left-color: #dc2626;
  background: #f8fafc;
}

.city-col-icon {
  text-align: center;
  font-size: 2.2rem;
  line-height: 1;
}

.city-col-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.city-card-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.city-card-region {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 0.2rem;
}

.city-col-condition {
  display: flex;
  align-items: center;
  min-width: 0;
}

.city-card-condition {
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
}

.city-col-wind {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.city-col-humidity {
  font-size: 0.85rem;
  color: #0284c7;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.city-col-temp {
  text-align: right;
  min-width: 70px;
}

.city-card-temp {
  font-size: 1.95rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  line-height: 1;
}

@media (max-width: 960px) {
  .cities-table-header {
    grid-template-columns: 50px 180px 1fr 120px 80px;
  }
  .city-card {
    grid-template-columns: 50px 180px 1fr 120px 80px;
    gap: 0.75rem;
  }
  .col-head-humidity, .city-col-humidity {
    display: none;
  }
}

@media (max-width: 680px) {
  .cities-table-header {
    display: none;
  }
  .cities-weather-section {
    padding: 1.5rem 1rem;
  }
  .city-card {
    grid-template-columns: 44px 1fr auto;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }
  .city-col-condition, .city-col-wind, .city-col-humidity {
    display: none;
  }
  .city-card-temp {
    font-size: 1.7rem;
  }
}

/* --- 5. AVISOS OFICIALES AEMET & METEOCAT --- */
.official-alerts-box {
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  border: 1px solid #fecaca;
  border-radius: 18px;
  padding: 1.5rem 2rem;
  margin: 3.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.official-alerts-info {
  max-width: 650px;
}

.official-alerts-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #b91c1c;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.official-alerts-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #7f1d1d;
  margin-bottom: 0.35rem;
}

.official-alerts-desc {
  font-size: 0.95rem;
  color: #451a03;
  line-height: 1.5;
}

.official-alerts-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-official-alert {
  background: #ffffff;
  color: #991b1b;
  border: 1px solid #fca5a5;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-official-alert:hover {
  background: #991b1b;
  color: #ffffff;
  border-color: #991b1b;
}

/* --- 6. SECCIÓN PARAGUAS DE ESPAÑA --- */
.paraguas-showcase-section {
  margin: 3.5rem 0;
  padding: 0;
}

.paraguas-showcase-section .btn-amazon {
  white-space: nowrap !important;
  font-size: 15px !important;
  padding: 0.8rem 0.4rem !important;
}

.paraguas-header {
  text-align: center;
  margin-bottom: 2rem;
}

.paraguas-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fee2e2;
  color: #dc2626;
  padding: 0.3rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.paraguas-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.paraguas-sub {
  color: #64748b;
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .home-portal-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .weather-title {
    font-size: 1.8rem;
  }
  .windy-iframe-wrapper {
    height: 380px;
  }
  .official-alerts-box {
    padding: 1.25rem;
  }
}
