:root {
  --bg: #091019;
  --bg-soft: #111d29;
  --panel: rgba(16, 26, 37, 0.84);
  --panel-strong: #172636;
  --line: rgba(63, 136, 199, 0.12);
  --text: #edf6ff;
  --muted: #8ea6b9;
  --accent: #2d8add;
  --accent-2: #63b7ff;
  --sun: #ffcb47;
  --cloud: #f6fbff;
  --danger: #df6767;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  --radius: 22px;
  --container: 1180px;
}

:root[data-theme="light"] {
  --bg: #edf5fb;
  --bg-soft: #f7fbff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --line: rgba(45, 138, 221, 0.12);
  --text: #17344d;
  --muted: #60798e;
  --accent: #2d8add;
  --accent-2: #68baff;
  --sun: #ffc233;
  --cloud: #ffffff;
  --danger: #cf5858;
  --shadow: 0 18px 50px rgba(52, 88, 122, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Instrument Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(45, 138, 221, 0.16), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input {
  font: inherit;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg-soft) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.topbar,
.header-actions {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.6rem;
}

.header-actions {
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.hero h1,
.page-intro h1,
.section-heading h2,
.panel h2,
.feature-card h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

.brand-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.powered-by {
  display: block;
  font-size: 0.72rem;
  color: #dbb467;
  opacity: 0.9;
  margin-top: -0.2rem;
  transition: opacity 0.2s;
  font-weight: 500;
}

.powered-by:hover {
  opacity: 1;
  text-decoration: underline;
}

.brand-logo {
  width: 11.5rem;
  max-width: 48vw;
  height: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #58bbff 0%, #2d8add 100%);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.weather-mark .sun {
  position: absolute;
  width: 1rem;
  height: 1rem;
  left: 0.38rem;
  top: 0.46rem;
  border-radius: 999px;
  background: var(--sun);
  box-shadow: 0 0 0 0.22rem rgba(255, 203, 71, 0.24);
}

.weather-mark .cloud {
  position: absolute;
  width: 1.5rem;
  height: 0.82rem;
  right: 0.3rem;
  bottom: 0.68rem;
  border-radius: 999px;
  background: var(--cloud);
  box-shadow:
    -0.6rem 0.14rem 0 -0.08rem var(--cloud),
    -0.2rem -0.35rem 0 0.06rem var(--cloud);
}

.menu-toggle,
.menu-link {
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
}

[data-theme="light"] .menu-toggle,
[data-theme="light"] .menu-link {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.05);
}

.menu-toggle:hover,
.menu-link:hover {
  border-color: var(--accent);
  background: rgba(45, 138, 221, 0.12);
}

.site-nav {
  position: absolute;
  inset: calc(100% + 0.5rem) 1rem auto 1rem;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
  border-radius: 1rem;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  z-index: 2100;
}

.site-nav.active {
  display: flex !important;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.menu-extra {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

.social-icon svg {
  vertical-align: middle;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.social-pill--ig { color: #e1306c; border-color: rgba(225,48,108,0.4); }
.social-pill--yt { color: #ff4444; border-color: rgba(255,68,68,0.4); }
.social-pill--tg { color: #2ca5e0; border-color: rgba(44,165,224,0.4); }

.social-pill:hover               { transform: scale(1.1); background: rgba(255,255,255,0.2); }
.social-pill--ig:hover           { background: #e1306c; color: #fff; border-color: #e1306c; }
.social-pill--yt:hover           { background: #ff4444; color: #fff; border-color: #ff4444; }
.social-pill--tg:hover           { background: #2ca5e0; color: #fff; border-color: #2ca5e0; }

[data-theme="light"] .social-pill { color: #333; border-color: rgba(0,0,0,0.2); background: rgba(0,0,0,0.06); }

.hero,
.page-intro {
  padding: 1rem 0 1rem;
}

.hero-grid,
.split-grid,
.footer-grid {
  display: grid;
  gap: 1rem;
}

.hero h1,
.page-intro h1 {
  margin: 0.2rem 0 1rem;
  line-height: 0.94;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: -0.05em;
}

.lede {
  max-width: 60ch;
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--accent-2);
}

.hero-search,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.icon-button {
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(45, 138, 221, 0.14);
  color: var(--text);
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.hero-search {
  margin-top: 0;
  flex-direction: row;
  align-items: center;
  max-width: 46rem;
}

.toolbar {
  margin-top: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.search-input,
.field select {
  min-width: min(100vw - 6.5rem, 24rem);
  padding: 1rem 1.15rem;
  border-radius: 0.95rem;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.12rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06253a;
  font-weight: 700;
  cursor: pointer;
}

.button-cta {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  min-height: auto;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
}

.hero-panel,
.panel,
.feature-card,
.stat-card,
.news-featured {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.minimal-panel {
  padding: 0.9rem;
}

.hero-panel,
.panel,
.feature-card,
.news-featured {
  padding: 1.2rem;
}

.section {
  padding: 1.3rem 0;
}

.hero-grid {
  align-items: start;
}

.hero-search-field {
  flex: 1 1 16rem;
}

.search-results {
  margin-top: 0.55rem;
}

.metric-stack h3 {
  margin: 0.1rem 0 0.35rem;
  font-size: clamp(1.5rem, 4.6vw, 2rem);
}

.weather-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.metric-stack h2 {
  margin: 0 0 0.45rem;
}

.embed-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
}

.embed-fullscreen-trigger {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 20;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.4);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  pointer-events: all;
}

.embed-fullscreen-trigger:hover {
  background: var(--accent);
  color: #000;
  transform: scale(1.1);
}

.embed-open-button {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
}

/* En home: ocultar trigger de fullscreen */
[data-page="home"] .embed-fullscreen-trigger {
  display: none !important;
}

/* Overlay transparente encima del iframe — el iframe carga normal
   pero el toque/click llega al overlay, no al mapa */
[data-page="home"] .embed-card {
  position: relative;
}

[data-page="home"] .embed-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  cursor: default;
}

.weather-current-main {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.current-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.current-icon svg {
  width: 64px;
  height: 64px;
}

.weather-current-main h2 {
  font-size: clamp(3rem, 10vw, 5rem);
  margin: 0;
  line-height: 1;
}

.chart-grid-dual {
  display: flex;
  gap: 0.25rem;
  height: 200px;
  align-items: flex-end;
  overflow-x: auto;
  padding-bottom: 2rem;
}

.chart-bar-dual {
  min-width: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chart-layers {
  position: relative;
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px 4px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-temp-fill {
  background: var(--accent);
  width: 100%;
  position: relative;
  border-radius: 4px 4px 0 0;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.chart-rain-fill {
  background: #448aff;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  opacity: 0.6;
}

.chart-val {
  font-size: 0.7rem;
  font-weight: 700;
  position: absolute;
  top: -1.2rem;
  color: var(--text);
}

.chart-meta {
  font-size: 0.65rem;
  height: 1rem;
  text-align: center;
  color: #448aff;
  margin-top: 0.25rem;
}

.forecast-grid-compact {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  width: 100%;
  padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.day-card-compact {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  min-width: 120px;
  flex: 1; /* Esto hace que se repartan el ancho */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.day-card-compact:hover {
  border-color: var(--accent);
  background: rgba(219, 180, 103, 0.05);
  transform: translateY(-4px);
}

.meteogram-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  width: 100%;
}

/* Overview chart wrapper — fondo temático, scrollable en mobile */
.overview-chart-wrap {
  background: var(--bg-soft);
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
}

/* Etiquetas del meteograma — tema oscuro (default) */
.meteogram-wrapper .label-bg    { fill: rgba(0,0,0,0.45); }
.meteogram-wrapper .label-bg-sm { fill: rgba(0,0,0,0.28); }
.meteogram-wrapper .midnight-line { fill: rgba(255,255,255,0.55); }
.meteogram-wrapper .time-label  { fill: #aab8c4; }

/* Separador de días en overview — tema oscuro */
.overview-chart-wrap .day-sep { stroke: rgba(255,255,255,0.14); }
.overview-chart-wrap .time-label { fill: #6a849a; }

/* Etiquetas del meteograma — tema claro */
:root[data-theme="light"] .meteogram-wrapper .label-bg    { fill: rgba(0,0,0,0.07); }
:root[data-theme="light"] .meteogram-wrapper .label-bg-sm { fill: rgba(0,0,0,0.05); }
:root[data-theme="light"] .meteogram-wrapper .midnight-line { fill: rgba(0,0,0,0.25); }
:root[data-theme="light"] .meteogram-wrapper .time-label  { fill: #60798e; }
:root[data-theme="light"] .overview-chart-wrap .day-sep { stroke: rgba(0,0,0,0.10); }
:root[data-theme="light"] .overview-chart-wrap .time-label { fill: #60798e; }

.day-card-compact header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.temp-block {
  display: flex;
  flex-direction: column;
  margin: 0.5rem 0;
}

.temp-max {
  color: #ff5252;
  font-size: 1.5rem;
  font-weight: 700;
}

.temp-min {
  color: #448aff;
  font-size: 1.1rem;
  font-weight: 600;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pill-rain { background: rgba(68, 138, 255, 0.15); color: #448aff; }
.pill-uv { background: rgba(255, 152, 0, 0.15); color: #ff9800; }
.pill-wind { border: 1px solid var(--line); font-size: 0.7rem; }

.wind-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.forecast-grid-compact::-webkit-scrollbar {
  height: 4px;
}
.forecast-grid-compact::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}

.map-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 14, 0.82);
  backdrop-filter: blur(8px);
}

.map-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.map-lightbox-frame {
  width: 100%;
  height: 100%;
  padding-top: 3.25rem;
  background: #081018;
}

.map-lightbox-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.6rem;
}

body.has-lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .topbar {
    min-height: 4rem;
  }

  .brand {
    gap: 0.55rem;
  }

  .brand small {
    font-size: 0.86rem;
  }

  .brand-logo {
    width: 10rem;
    max-width: 56vw;
  }

  .hero,
  .page-intro {
    padding: 0.65rem 0 0.8rem;
  }

  .search-input,
  .field select {
    min-width: 0;
    width: 100%;
    font-size: 1.18rem;
  }

  .hero-search {
    gap: 0.6rem;
  }
}

.section-alt {
  background: linear-gradient(180deg, rgba(45, 138, 221, 0.06), rgba(45, 138, 221, 0.02));
}

.panel-head,
.section-heading,
.embed-actions,
.event-item header,
.news-item header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.cards-grid,
.forecast-grid,
.metric-stack,
.list-shell,
.stack-list {
  display: grid;
  gap: 1rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric,
.event-item,
.news-item,
.day-card {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.metric span,
.muted,
.chart-meta,
.chart-label,
.source-note {
  color: var(--muted);
}

.metric span {
  display: block;
  font-size: 0.82rem;
}

.metric strong {
  display: block;
  margin-top: 0.25rem;
}

.clickable-event {
  cursor: pointer;
  transition: background 0.2s;
}

.clickable-event:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.feature-kicker,
.panel-label,
.footer-title {
  color: var(--accent-2);
  font-size: 0.8rem;
}

.tag {
  display: inline-flex;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(45, 138, 221, 0.1);
  color: var(--accent);
  font-size: 0.82rem;
}

.tag-danger {
  background: rgba(223, 103, 103, 0.14);
  color: var(--danger);
}

.text-link {
  color: var(--accent);
}

.embed-frame-shell,
.map-shell,
.chart-shell {
  width: 100%;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.embed-card {
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding: 0.4rem;
}

.embed-action-group {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.embed-button {
  min-height: 2.35rem;
  padding: 0.65rem 1rem;
}

.embed-frame {
  width: 100%;
  min-height: 22rem;
  border: 0;
  background: #081018;
}

.map-shell {
  height: min(85vh, 50rem);
}

/* Mapas que llegan al borde */
.full-width-map-panel {
  padding: 0 !important;
  overflow: hidden;
}

.full-width-map-panel .panel-head {
  padding: 1.2rem;
}

.full-width-map-panel .embed-frame {
  min-height: 45rem;
}

.chart-shell {
  padding: 1rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(24, minmax(3rem, 1fr));
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.chart-bar {
  display: grid;
  gap: 0.5rem;
  min-width: 3rem;
}

.chart-bar-visual {
  height: 10rem;
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(45, 138, 221, 0.05), rgba(45, 138, 221, 0.14));
  padding: 0.35rem;
}

.chart-bar-fill {
  width: 100%;
  border-radius: 0.8rem;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.search-results {
  display: none;
  margin-top: 0.5rem;
  border-radius: 1rem;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.news-thumb-link {
  display: block;
  margin-top: 1rem;
}

.news-thumb-card {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
}

.news-thumb-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.8rem;
}

.menu-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.search-results.is-open {
  display: block;
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  padding: 0.6rem 1rem;
  border-radius: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.site-nav a.is-active,
.site-nav a:hover {
  color: var(--text);
  background: rgba(45, 138, 221, 0.1);
}

.search-result-main,
.search-result-meta {
  display: block;
}

.search-result-meta {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.chip-list {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.chip-main,
.chip-remove {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.chip-main {
  padding: 0.55rem 0.85rem;
}

.chip-remove {
  padding: 0.55rem 0.7rem;
  color: var(--muted);
}

.news-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.timeline-grid {
  margin-top: 1rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
}

@media (min-width: 720px) {
  .menu-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 1.5rem;
    background: transparent;
    box-shadow: none;
  }

  .nav-links {
    flex-direction: row;
    gap: 0.5rem;
  }

  .menu-extra {
    border-top: 0;
    margin-top: 0;
    padding: 0;
    gap: 0.25rem;
  }

  .hero-grid {
    grid-template-columns: 1.25fr 0.92fr;
    align-items: end;
  }

  .split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .forecast-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .forecast-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .news-thumb-card {
    grid-template-columns: 10rem 1fr;
    gap: 1.5rem;
  }
}

/* Gráficas de Pronóstico y Tendencia */
.overview-chart-wrap {
  width: 100%;
  margin: 1.5rem 0 0.5rem 0;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.overview-chart-wrap svg {
  min-width: 630px; /* Mantiene legibilidad en móviles */
  max-width: 100%;
  height: auto;
  display: block;
}

.day-sep {
  stroke: var(--line);
  opacity: 0.3;
}

.label-bg {
  fill: var(--bg-soft);
  opacity: 0.85;
}

.time-label {
  fill: var(--muted);
  font-size: 0.7rem;
}

/* Modal Lightbox de Mapas (Full Screen Puro) */
.map-lightbox {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;
  display: none;
  flex-direction: column;
}

#map-lightbox-iframe {
  flex: 1;
  width: 100%;
  border: none;
  display: block;
  min-height: 0;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

/* ── PWA Install Chip ─────────────────────────────────────────────────────── */
.pwa-chip {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--panel-strong);
  border: 1px solid var(--accent);
  border-radius: 50px;
  padding: 0.5rem 0.6rem 0.5rem 1rem;
  z-index: 9000;
  font-size: 0.85rem;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  animation: pwa-slide-up 0.35s ease;
}

@keyframes pwa-slide-up {
  from { transform: translateX(-50%) translateY(1.5rem); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);      opacity: 1; }
}

.pwa-chip-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.pwa-chip-text {
  color: var(--text);
  font-weight: 500;
}

.pwa-chip-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.pwa-chip-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.25rem 0.15rem;
}

.pwa-chip-close:hover {
  color: var(--text);
}

/* ── Current weather 2-column grid (desktop) ─────────────────────────────── */
.current-weather-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .current-weather-grid {
    grid-template-columns: 1fr 1fr;
    /* align-items default = stretch → columna derecha iguala altura de la izquierda */
  }

  .current-sat-embed {
    min-height: 0;
  }

  .current-sat-embed .embed-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    gap: 0;
    border-radius: 1.1rem;
    overflow: hidden;
  }

  .current-sat-embed .embed-frame {
    flex: 1;
    min-height: 0;
    height: auto;
  }
}

/* ── Wind direction label in daily cards ──────────────────────────────────── */
.wind-dir-label {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent-2);
  background: rgba(45,138,221,0.12);
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 2px;
  letter-spacing: 0.04em;
}
