/* ==========================================================================
   Severe Weather UK — Main Stylesheet
   Dark storm-weather theme, glassmorphism, responsive, accessible
   ========================================================================== */

/* ---- CSS Custom Properties ---- */
:root {
  --bg-deep: #08111f;
  --bg-navy: #0b1628;
  --bg-surface: rgba(255, 255, 255, 0.06);
  --bg-surface-hover: rgba(255, 255, 255, 0.10);
  --bg-surface-active: rgba(255, 255, 255, 0.14);
  --bg-elevated: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text-primary: #f4f7fb;
  --text-secondary: #c5cdd8;
  --text-muted: #8a95a6;
  --text-faint: #5a6575;

  --accent-blue: #57a6ff;
  --accent-blue-soft: rgba(87, 166, 255, 0.15);
  --accent-blue-glow: rgba(87, 166, 255, 0.35);

  --storm-yellow: #f6c945;
  --storm-yellow-soft: rgba(246, 201, 69, 0.15);

  --warning-orange: #ff9d45;
  --warning-orange-soft: rgba(255, 157, 69, 0.15);

  --danger-red: #ff5b6e;
  --danger-red-soft: rgba(255, 91, 110, 0.15);

  --safe-green: #55d18f;
  --safe-green-soft: rgba(85, 209, 143, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(87, 166, 255, 0.15);

  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace;

  --max-width: 1200px;
  --header-height: 64px;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  --backdrop-blur: blur(16px);
  --backdrop-blur-light: blur(8px);
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(87, 166, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 70%, rgba(246, 201, 69, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 40%, rgba(87, 166, 255, 0.04) 0%, transparent 60%),
    var(--bg-deep);
  background-size: 100% 100%;
}

/* Subtle animated gradient for hero */
@keyframes gradientDrift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: no-preference) {
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      radial-gradient(ellipse 100% 80% at 50% 30%, rgba(87, 166, 255, 0.03) 0%, transparent 70%),
      radial-gradient(ellipse 50% 50% at 30% 60%, rgba(246, 201, 69, 0.02) 0%, transparent 60%);
    animation: gradientDrift 20s ease-in-out infinite;
  }
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #7dbcff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ---- Focus styles ---- */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--accent-blue);
  color: #000;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 16px;
}

/* ---- Screen reader only ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Hidden ---- */
.hidden {
  display: none !important;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container { padding: 0 32px; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent-blue);
  color: #08111f;
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-primary:hover {
  background: #7dbcff;
  color: #08111f;
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 12px 24px;
  font-size: 1rem;
  border: 1px solid var(--border-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
}

.btn-secondary:hover {
  background: var(--bg-surface-active);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--accent-blue);
  padding: 8px 16px;
  font-size: 0.875rem;
  border: 1px solid var(--border-card);
}

.btn-outline:hover {
  background: var(--accent-blue-soft);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-text {
  background: none;
  color: var(--accent-blue);
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-text:hover {
  color: #7dbcff;
  text-decoration: underline;
}

.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-xs { padding: 5px 12px; font-size: 0.8rem; }

.btn-search {
  background: var(--accent-blue);
  color: #08111f;
  padding: 10px 20px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.btn-search:hover {
  background: #7dbcff;
  color: #08111f;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 17, 31, 0.82);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-base);
}

.site-header.scrolled {
  background: rgba(8, 17, 31, 0.95);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo-link:hover {
  color: var(--text-primary);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.logo-highlight {
  color: var(--storm-yellow);
}

/* ---- Navigation ---- */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
  display: flex;
  gap: 4px;
}

.nav-menu a {
  display: block;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-menu a:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.header-cta {
  display: inline-flex;
}

@media (min-width: 1024px) {
  .header-cta {
    display: inline-flex;
  }
}

@media (max-width: 1023px) {
  .header-cta {
    display: none;
  }
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(11, 22, 40, 0.97);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--border-card);
    padding: 12px 20px;
    gap: 2px;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    padding: 12px 16px;
    font-size: 1rem;
  }
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .hero {
    padding: 100px 0 80px;
    min-height: 600px;
  }
}

@media (min-width: 1024px) {
  .hero {
    min-height: 680px;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg picture,
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient-fallback {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 50% 25%, rgba(87, 166, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 75% 60%, rgba(246, 201, 69, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #0b1628 0%, #08111f 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 17, 31, 0.3) 0%,
    rgba(8, 17, 31, 0.5) 50%,
    rgba(8, 17, 31, 0.9) 90%,
    var(--bg-deep) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

@media (min-width: 1024px) {
  .hero-content {
    flex-direction: row;
    align-items: flex-start;
    gap: 60px;
  }
}

.hero-text {
  flex: 1;
  max-width: 620px;
}

.hero-text h1 {
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, #c5cdd8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 20px;
  line-height: 1.55;
}

.hero-trust {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  line-height: 1.5;
}

.trust-icon {
  flex-shrink: 0;
  font-style: normal;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-blue);
  margin-top: 1px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Hero Dashboard Cards ---- */
.hero-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

@media (min-width: 1024px) {
  .hero-dashboard {
    width: 420px;
    flex-shrink: 0;
  }
}

.dashboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: all var(--transition-base);
}

.dashboard-card:hover {
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-card:hover {
    transform: none;
  }
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  line-height: 1;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.card-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-blue);
}

.card-link:hover {
  text-decoration: underline;
}

/* ---- Sections ---- */
.section {
  padding: 64px 0;
  position: relative;
}

@media (min-width: 768px) {
  .section {
    padding: 80px 0;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Warnings Widget ---- */
.warnings-widget,
.flood-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
}

.warnings-widget-header,
.flood-widget-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
}

.widget-source,
.widget-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.source-label,
.meta-label {
  color: var(--text-muted);
}

.source-name {
  font-weight: 700;
  color: var(--accent-blue);
}

.meta-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.meta-count {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.warnings-widget-body,
.flood-widget-body {
  padding: 24px 20px;
  min-height: 120px;
}

.warnings-widget-footer,
.flood-widget-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.widget-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.widget-disclaimer a {
  color: var(--accent-blue);
  text-decoration: underline;
}

.official-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.official-links-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

/* ---- Widget States ---- */
.widget-state {
  text-align: center;
  padding: 32px 16px;
}

.state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.state-message {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.state-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  border: 3px solid var(--border-card);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
    border-top-color: var(--border-card);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Warning Cards ---- */
.warning-cards {
  display: grid;
  gap: 16px;
}

.warning-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border-left: 4px solid var(--storm-yellow);
  transition: all var(--transition-fast);
}

.warning-card.severity-red {
  border-left-color: var(--danger-red);
}

.warning-card.severity-amber {
  border-left-color: var(--warning-orange);
}

.warning-card.severity-yellow {
  border-left-color: var(--storm-yellow);
}

.warning-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.warning-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.warning-card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.badge-red {
  background: var(--danger-red-soft);
  color: var(--danger-red);
}

.badge-amber {
  background: var(--warning-orange-soft);
  color: var(--warning-orange);
}

.badge-yellow {
  background: var(--storm-yellow-soft);
  color: var(--storm-yellow);
}

.warning-card-region {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.warning-card-times {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.warning-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Flood Cards ---- */
.flood-cards {
  display: grid;
  gap: 16px;
}

.flood-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.flood-card.severity-severe {
  border-left: 4px solid var(--danger-red);
}

.flood-card.severity-warning {
  border-left: 4px solid var(--warning-orange);
}

.flood-card.severity-alert {
  border-left: 4px solid var(--storm-yellow);
}

.flood-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.flood-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.flood-card-river {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.flood-card-times {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.flood-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Local Weather Widget ---- */
.local-weather-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
}

.location-search {
  margin-bottom: 16px;
}

.search-input-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}

.search-input::placeholder {
  color: var(--text-faint);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-soft);
}

.search-hint {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.data-attribution {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.data-attribution a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* Location Results */
.location-results {
  margin-bottom: 16px;
}

.location-results-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.location-result-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.location-result-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.location-result-region {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.location-result-coords {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* Forecast Panel */
.forecast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.forecast-location-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.forecast-current {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.forecast-current-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.forecast-current-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2px;
}

.forecast-current-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.forecast-hourly {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
}

.forecast-hourly::-webkit-scrollbar {
  height: 4px;
}

.forecast-hourly::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 2px;
}

.forecast-hour-item {
  flex: 0 0 auto;
  min-width: 80px;
  text-align: center;
  padding: 12px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.forecast-hour-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.forecast-hour-icon {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.forecast-hour-temp {
  font-size: 0.95rem;
  font-weight: 700;
}

.forecast-hour-rain {
  font-size: 0.7rem;
  color: var(--accent-blue);
}

/* ---- Tools Grid ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

@media (prefers-reduced-motion: reduce) {
  .tool-card:hover {
    transform: none;
  }
}

.tool-card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.tool-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tool-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 14px;
  line-height: 1.5;
}

.tool-card-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  align-self: flex-start;
}

.badge-info {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.badge-coming {
  background: var(--storm-yellow-soft);
  color: var(--storm-yellow);
}

.badge-data {
  background: var(--safe-green-soft);
  color: var(--safe-green);
}

.tool-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-blue);
  align-self: flex-start;
}

.tool-card-link:hover {
  text-decoration: underline;
}

/* ---- Storm Section ---- */
.storm-content {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .storm-content {
    grid-template-columns: 1fr 1fr;
  }
}

.storm-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
}

.storm-info-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.storm-info-card p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}

.storm-info-card p:last-of-type {
  margin-bottom: 16px;
}

.storm-checklist {
  list-style: none;
  padding: 0;
}

.storm-checklist li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.storm-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--safe-green);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---- Preparedness Grid ---- */
.prep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.prep-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: all var(--transition-base);
}

.prep-card:hover {
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
  .prep-card:hover {
    transform: none;
  }
}

.prep-card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.prep-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.prep-card ul {
  padding: 0;
}

.prep-card li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}

.prep-card li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--accent-blue);
}

/* ---- SEO Content ---- */
.seo-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
}

@media (min-width: 768px) {
  .seo-content {
    padding: 40px 36px;
  }
}

.seo-columns {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .seo-columns {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

.seo-column h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--text-primary);
}

.seo-column h3:first-child {
  margin-top: 0;
}

.seo-column p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.65;
}

/* ---- Explainers Grid ---- */
.explainers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.explainer-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: all var(--transition-base);
}

.explainer-card:hover {
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
  .explainer-card:hover {
    transform: none;
  }
}

.explainer-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.explainer-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.explainer-card h3 a:hover {
  color: var(--accent-blue);
}

.explainer-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Footer ---- */
.site-footer {
  background: rgba(11, 22, 40, 0.9);
  border-top: 1px solid var(--border-card);
  padding: 56px 0 32px;
  margin-top: 32px;
}

.footer-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 40px;
}

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  }
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 12px;
}

.footer-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.footer-logo-text {
  font-weight: 700;
  font-size: 1rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-links h4,
.footer-attribution h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.footer-links ul,
.footer-attribution ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a,
.footer-attribution a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links a:hover,
.footer-attribution a:hover {
  color: var(--accent-blue);
}

.attribution-list {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.attribution-list a {
  color: var(--accent-blue);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  max-width: 800px;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ---- Utility: Loaded JS state ---- */
.no-js .widget-state.state-loading {
  display: none;
}

.no-js .official-links {
  margin-top: 12px;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 480px) {
  .hero-dashboard {
    grid-template-columns: 1fr;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .forecast-current {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-input-wrap {
    flex-direction: column;
  }

  .btn-search {
    width: 100%;
    justify-content: center;
  }

  .warnings-widget-header,
  .flood-widget-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

