/* ── Header ─────────────────────────────────────────────────────────────────── */

header {
  background: var(--ocean);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 500;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-ic {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.logo h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--accent);
  line-height: 1;
}

.logo p {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-desc {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
  text-align: center;
  padding: 0 32px;
}

@media (max-width: 700px) {
  .header-desc {
    display: none;
  }
}

.hright {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upd-info {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  line-height: 1.4;
}

.btn-refresh {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: var(--deep);
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Wind bar ────────────────────────────────────────────────────────────────── */

.wind-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
  flex-shrink: 0;
}

.wstat {
  display: flex;
  flex-direction: column;
  padding: 0 12px;
  white-space: nowrap;
}

.wstat:first-child {
  padding-left: 0;
}

.wlabel {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wvalue {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.wdiv {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .wind-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 0;
    padding: 8px 16px;
  }

  .wdiv {
    display: none;
  }

  .wstat {
    padding: 0 8px;
    border-right: 1px solid var(--border);
  }

  /* pos 5 = Ráfagas (3er wstat), pos 11 = Temp. agua (6o wstat) */
  .wstat:nth-child(5),
  .wstat:nth-child(11) {
    border-right: none;
  }
  .wstat:first-child {
    padding-left: 8px;
  }
}

.warrow {
  display: inline-block;
  font-size: 16px;
  transition: transform 0.8s ease;
}

/* Risk badges */
.rbadge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.r-alto {
  background: rgba(255, 64, 85, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 64, 85, 0.3);
}
.r-medio {
  background: rgba(255, 170, 0, 0.15);
  color: var(--warn);
  border: 1px solid rgba(255, 170, 0, 0.3);
}
.r-bajo {
  background: rgba(34, 212, 106, 0.15);
  color: var(--safe);
  border: 1px solid rgba(34, 212, 106, 0.3);
}
