/* ==========================================================================
   1. Global Styles & Variables
   ========================================================================== */

/* Root variables for consistency and maintainability */
:root {
  --primary-color: #0c2945;
  --secondary-color: #1f65a7;
  --dark-blue: #0c2945;
  --background-grey: #e9e8e8;
  --dark-grey: #333;
  --light-grey: #f4f4f4;
  --text-dark: #333;
  --text-light: #fff;
  --error-bg: rgba(255, 0, 0, 0.8);
  --border-color: #ccc;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
  --transition: 0.3s ease;
  --border-radius: 5px;
  --border-radius-lg: 8px;
  --border-radius-xl: 10px;
  --font-primary: Poppins, sans-serif;
  --font-monospace: monospace;
}

/* Font Awesome Fix */
.fa, .fas {
  font-family: "Font Awesome 5 Free";
}

/* Global styles */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  font-size: large;
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, var(--secondary-color), var(--dark-blue));
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   2. Layout
   ========================================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0px 0px 20px 16px rgba(0, 0, 0, 0.2);
}

.main-grid, .sidebar-card {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  box-shadow: var(--shadow-md);
  background: #fff;
  padding: 0;
  flex: 1;
}

.main-left,
.main-right {
  flex: 1 1 0;
  min-width: 0;
  width: 50%;
  box-sizing: border-box;
  color: var(--text-dark);
  padding: 15px;
}

.main-bottom {
  flex-basis: 100%;
  padding: 15px;
  box-sizing: border-box;
}

/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */

.site-header {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  box-shadow: var(--shadow-md);
  width: 100%;
}

.header-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  box-shadow: var(--shadow-md);
}

.header-image-container {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.header-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: brightness(0.7);
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-title {
  font-size: 300%;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  padding: 10px 20px;
  position: relative;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.site-logo {
  height: 60px;
  width: auto;
  display: block;
}

/* Hamburger Menu Button */
.menu-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1300;
  width: 45px;
  height: 45px;
  box-sizing: border-box;
  position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  background-color: #ffffff;
  height: 4px;
  width: 25px;
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
  position: absolute;
}

.hamburger {
  top: 20px;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* ==========================================================================
   4. Weather Ticker
   ========================================================================== */

.weather-ticker-container {
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-top: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  overflow: hidden;
  position: relative;
  z-index: 50;
}

.weather-ticker {
  height: 45px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(90deg, 
    rgba(82, 128, 255, 0.8) 0%, 
    rgba(82, 128, 255, 0.3) 20%, 
    rgba(82, 128, 255, 0.3) 80%, 
    rgba(82, 128, 255, 0.8) 100%);
}

.ticker-content {
  position: absolute;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px;
  font-weight: bold;
  color: #00ff00;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
  animation: scroll-ticker 120s linear infinite;
  padding-left: 100%;
}

.ticker-content span {
  margin-right: 50px;
}

.ticker-hash {
  color: #ffff00;
  text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

.ticker-city {
  color: #3cff00;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.ticker-temp {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

.ticker-condition {
  color: #ffffff;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}

.ticker-precip {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(0, 170, 255, 0.5);
}

.ticker-separator {
  color: #ffffff;
  margin: 0 10px;
}

@keyframes scroll-ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ==========================================================================
   5. Alert Banners & Details
   ========================================================================== */

.alert-banners {
  position: sticky;
  top: 0; /* Adjusted dynamically in JS */
  width: 100%;
  z-index: 1100;
  background-color: transparent;
}

.alert-banner {
  position: relative;
  width: 100%;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.alert-banner .county-link {
  color: inherit;
  text-decoration: underline;
}

.alert-banner .county-link:hover { text-decoration: none; }

.alert-banner .close-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: inherit;
  padding: 0 10px;
}

.alert-banner .close-btn:hover { opacity: 0.7; }

/* NWS Alert Banner Colors (F5Data Scheme) */
.alert-banner.nws-red, .weather-footer.nws-red { background-color: #ff0000; color: #ffffff; } /* Tornado Warning */
.alert-banner.nws-orange, .weather-footer.nws-orange { background-color: #ffa500; color: #000000; } /* Severe Thunderstorm Warning */
.alert-banner.nws-dark-red, .weather-footer.nws-dark-red { background-color: #8b0000; color: #ffffff; } /* Flash Flood Warning */
.alert-banner.nws-orange-red, .weather-footer.nws-orange-red { background-color: #ff4500; color: #ffffff; } /* Blizzard / Extreme Wind Warning */
.alert-banner.nws-yellow, .weather-footer.nws-yellow { background-color: #ffff00; color: #000000; } /* Tornado Watch */
.alert-banner.nws-pale-violet-red, .weather-footer.nws-pale-violet-red { background-color: #db7093; color: #ffffff; } /* Severe Thunderstorm Watch */
.alert-banner.nws-sea-green, .weather-footer.nws-sea-green { background-color: #2e8b57; color: #ffffff; } /* Flash Flood Watch / Flood Watch */
.alert-banner.nws-lime, .weather-footer.nws-lime { background-color: #00ff00; color: #000000; } /* Flood Warning */
.alert-banner.nws-spring-green, .weather-footer.nws-spring-green { background-color: #00ff7f; color: #000000; } /* Flood Advisory */
.alert-banner.nws-hot-pink, .weather-footer.nws-hot-pink { background-color: #ff69b4; color: #000000; } /* Winter Storm Warning */
.alert-banner.nws-orchid, .weather-footer.nws-orchid { background-color: #da70d6; color: #000000; } /* Ice Storm Warning */
.alert-banner.nws-steel-blue, .weather-footer.nws-steel-blue { background-color: #4682b4; color: #ffffff; } /* Winter Storm Watch */
.alert-banner.nws-medium-slate-blue, .weather-footer.nws-medium-slate-blue { background-color: #7b68ee; color: #ffffff; } /* Winter Weather Advisory */
.alert-banner.nws-pale-turquoise, .weather-footer.nws-pale-turquoise { background-color: #afeeee; color: #000000; } /* Wind Chill Warning */
.alert-banner.nws-light-steel-blue, .weather-footer.nws-light-steel-blue { background-color: #b0c4de; color: #000000; } /* Wind Chill Watch */
.alert-banner.nws-thistle, .weather-footer.nws-thistle { background-color: #d8bfd8; color: #000000; } /* Wind Chill Advisory */
.alert-banner.nws-goldenrod, .weather-footer.nws-goldenrod { background-color: #daa520; color: #000000; } /* High Wind Warning */
.alert-banner.nws-tan, .weather-footer.nws-tan { background-color: #d2b48c; color: #000000; } /* Wind Advisory */
.alert-banner.nws-coral, .weather-footer.nws-coral { background-color: #ff7f50; color: #000000; } /* Heat Advisory */
.alert-banner.nws-slate-gray, .weather-footer.nws-slate-gray { background-color: #708090; color: #ffffff; } /* Dense Fog Advisory */
.alert-banner.nws-moccasin, .weather-footer.nws-moccasin { background-color: #ffe4b5; color: #000000; } /* Special Weather Statement */
.alert-banner.nws-gray, .weather-footer.nws-gray { background-color: #808080; color: #ffffff; } /* Default/Unknown */

/* Alert Details Page */
#alert-map {
  height: 400px;
  width: 100%;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.alert-details {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.alert-details h2 { margin-top: 0; }
.alert-details p { margin: 10px 0; }

.alert-description-text,
.alert-instruction-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  background-color: var(--light-grey);
  padding: 10px;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  font-family: var(--font-monospace);
  font-size: 0.9rem;
}

/* ==========================================================================
   6. Search Component
   ========================================================================== */

.search-container { margin-bottom: 20px; }

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

#search-input {
  width: 100%;
  max-width: 300px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#search-button,
#clear-search {
  height: 40px;
  padding: 0 15px;
  background: var(--dark-grey);
  color: var(--text-light);
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  cursor: pointer;
  transition: background var(--transition);
}

#search-button:hover,
#clear-search:hover {
  background: #555;
}

.autocomplete-list {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  max-width: 300px;
  background: var(--text-light);
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-sizing: border-box;
  display: none;
}

.autocomplete-list li {
  padding: 10px;
  cursor: pointer;
  transition: background var(--transition);
}

.autocomplete-list li:hover { background: var(--light-grey); }

/* ==========================================================================
   7. Card Styles
   ========================================================================== */

/* --- Common Card Styles --- */
.about-card, .alert-details, .forecast-card,
.hourly-card, .daily-card, .discussion-card {
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto 20px auto;
  box-shadow: var(--shadow-lg);
  background: #fff;
  color: var(--text-dark);
}

/* Common Card Headings */
.conditions-card h1, .conditions-card h2, .forecast-card h2, .hourly-card h2,
.daily-card h2, .discussion-card h2, .weather-graphics-card h2 {
  margin: 10px 0 10px 0;
  font-weight: 600;
}

.conditions-card h1 { font-size: 3rem; font-weight: 700; }

.conditions-card h2, .forecast-card h2, .hourly-card h2, .daily-card h2,
.discussion-card h2, .weather-graphics-card h2 { font-size: 2.4rem; }

.conditions-card h2 { text-shadow: 0 1px 10px rgba(0,0,0,0.5); }

/* --- Storm Summary Card --- */
.storm-summary-card {
  background: var(--light-grey);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.summary-card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
  padding: 12px 15px;
}

.summary-card-header h4 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-card-header h4 i {
  font-family: "Font Awesome 5 Free";
  font-weight: 900; /* Ensure solid icons are used */
}

.summary-card-header p {
  margin: 5px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.summary-card-body {
  padding: 15px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.summary-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

.summary-item div {
  display: flex;
  flex-direction: column;
}

.summary-item span {
  color: #555;
}

/* --- Conditions Card --- */
.conditions-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
  padding: 20px;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.conditions-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2); /* Semi-transparent overlay */
  z-index: 1;
  border-radius: inherit;
}

.conditions-card > * {
  position: relative;
  z-index: 2; /* Place content above the overlay */
}

.card-header { 
  text-align: center; 
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.date-time { 
  font-size: 2rem;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}
#feels-like { 
  margin: 0; 
  font-size: 1.4rem; 
}
#weather-description {
  text-transform: capitalize;
}

.weather-grid {
  display: flex;
  align-items: center;
  margin: 15px 0;
  gap: 20px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.weather-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.temp-large {
  font-size: 80px;
  font-weight: bold;
  margin: 0 0 8px 0;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

.vertical-separator {
  width: 1px;
  background: rgba(255, 255, 255, 0.5);
  height: 120px;
}

.weather-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.weather-items-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.weather-item {
  display: flex;
  align-items: center;
  padding: 5px 0;
  gap: 15px;
}

.weather-item .label {
  font-weight: bold;
  font-size: 1.2rem;
  width: 25px;
  text-align: center;
}
.weather-item span { font-size: 1rem; }

.weather-footer {
  margin: 20px -20px -20px -20px;
  padding: 10px 20px;
  border-bottom-left-radius: var(--border-radius-xl);
  border-bottom-right-radius: var(--border-radius-xl);
  text-align: center;
  transition: background-color 0.3s ease;
  position: relative;
  z-index: 3; /* Place banner above content and overlay */
}

/* --- Map Card & Leaflet --- */
.map-card { padding: 10px; }

#map {
  height: 500px;
  border-radius: var(--border-radius);
  width: 100%;
  margin: 0 auto;
  outline: auto;
  box-sizing: border-box;
  line-height: 0;
}

.map-no-gaps .leaflet-tile,
.radar-layer .leaflet-tile,
.leaflet-tile-container .leaflet-tile {
  outline: 1px solid transparent;
  border: none !important;
  box-shadow: none !important;
}

.radar-error {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--error-bg);
  color: var(--text-light);
  padding: 10px;
  border-radius: var(--border-radius);
  z-index: 1000;
}

/* --- Radar Controls --- */
.radar-control {
  z-index: 1000; /* Ensure it's above map layers */
}

.radar-control-inner {
  background: rgba(255,255,255,0.9);
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.radar-control-header {
  margin-bottom: 8px;
}

#playPauseBtn {
  padding: 5px 10px;
  margin-right: 10px;
  border: none;
  border-radius: 3px;
  background: #007cba;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

#playPauseBtn.loading {
  background: #666;
  cursor: not-allowed;
}

#timestampDisplay {
  font-size: 12px;
  color: #333;
}

#frameSlider {
  width: 200px;
}

.radar-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}

/* --- Hourly & Daily Forecast Cards --- */
.hourly-card, .daily-card {
  padding: 0;
  overflow: visible;
  display: block;
}

.hourly-cards, .forecast-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background-color: var(--light-grey);
  border-radius: var(--border-radius);
}

.hourly-row, .forecast-row {
  display: grid;
  grid-template-columns: 80px 60px 1fr; /* Time/Date | Icon | Details */
  align-items: center;
  gap: 10px;
  padding: 8px;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid #ddd;
}

.hourly-time, .forecast-date {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

.hourly-icon, .forecast-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 0 auto;
}

.hourly-details, .forecast-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hourly-desc, .forecast-desc {
  font-size: 1rem;
  font-weight: 500;
  text-transform: capitalize;
}

.hourly-temp {
  font-size: 1.1rem;
  font-weight: bold;
}

.forecast-temps {
  display: flex;
  gap: 15px;
  font-size: 0.9rem;
}

/* --- Discussion Card --- */
.discussion-card { padding: 5px; }

.discussion-text {
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: var(--font-monospace);
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

/* --- Weather Graphics Card --- */
.weather-graphics-card {
  margin-top: 20px;
}

.weather-graphics-card h2 { text-align: center; }

.weather-graphic {
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1rem;
  background: white;
  box-shadow: var(--shadow-md);
}

.weather-graphic img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--border-radius);
}

.weather-graphic h3 {
  text-align: center;
  font-size: 1.6rem;
  margin: 10px 0 8px 0;
  font-weight: 500;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

.weather-graphic p {
  text-align: center;
  margin-top: 8px;
}

/* ==========================================================================
   8. Tropical Weather Page Styles
   ========================================================================== */

.tropical-header {
  text-align: center;
  margin-bottom: 2rem;
}

.last-updated {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #666;
}

#refresh-btn {
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition);
}

#refresh-btn:hover {
  background-color: #0056b3;
}

.weather-graphics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.image-container {
  position: relative;
  text-align: center;
}

.loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.9);
  padding: 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  color: var(--text-dark);
}

.source-link {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: #666;
}

.source-link a {
  color: var(--primary-color);
  text-decoration: none;
}

.source-link a:hover {
  text-decoration: underline;
}

.weather-section {
  padding: 1rem;
  margin-bottom: 1rem;
}

.section-title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1.3rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.basin-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

.weather-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.full-width-section {
  grid-column: 1 / -1;
}

.error-message {
  color: #dc3545;
  text-align: center;
  padding: 1rem;
  background: #f8d7da;
  border-radius: var(--border-radius);
  margin: 0.5rem 0;
  border: 1px solid #f5c6cb;
}

.storm-graphic {
  margin-bottom: 1.5rem;
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  background: white;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.storm-graphic:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.storm-info {
  background: none;
  padding: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.storm-graphic h4 {
  margin: 1.5rem 0 0.75rem 0;
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 500;
}

.storm-graphic img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}

.forecast-advisory {
  margin-top: 1.5rem;
}

.advisory-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  background-color: var(--light-grey);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  font-family: var(--font-monospace);
  font-size: 0.85rem;
  max-height: 400px;
  overflow-y: auto;
  color: var(--text-dark);
}

#active-storms-container {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--light-grey);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  min-height: 150px; /* Ensure container has height while loading */
}

#active-storms-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

/* ==========================================================================
   9. Footer
   ========================================================================== */

.site-footer {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: var(--text-light);
  margin-top: auto;
  border-top: 2px solid var(--primary-color);
  padding: 40px 0 0 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 0 20px;
}

.footer-column h3 {
  color: var(--text-light);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 5px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1rem;
  transition: color var(--transition);
  display: block;
  padding: 2px 0;
}

.footer-links a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-links a {
  color: var(--text-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  transition: color var(--transition);
  padding: 5px 0;
}

.social-links a:hover {
  color: var(--primary-color);
}

.social-links i {
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

.contact-info p {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.contact-info i {
  font-size: 1rem;
  width: 16px;
  text-align: center;
  color: var(--primary-color);
}

.contact-info a {
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-info a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 30px;
  padding: 20px 0;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   10. Page-Specific Overrides
   ========================================================================== */

/* --- Radar Page Specific Styles --- */
.radar-page .main-grid {
  margin: 10px;
  max-width: none;
  width: calc(100% - 20px);
  height: calc(100vh - 200px);
  min-height: 600px;
  margin-left: 10px;
  margin-right: 10px;
}

.radar-page .main-grid > div {
  width: 100%;
  padding: 10px;
}

.radar-page .map-card {
  width: 100%;
  height: calc(100vh - 240px);
  min-height: 500px;
  padding: 10px;
  margin: 0;
}

.radar-page #map {
  width: 100%;
  height: calc(100% - 60px);
  min-height: 450px;
  margin: 0;
}

.radar-page h2 {
  margin: 0 0 10px 0;
  text-align: center;
}

/* --- Severe Page Specific Styles --- */
.severe-page .main-grid { margin:10px; max-width:none; width:calc(100% - 20px); }
.severe-page #severe-radar { background:#000; }
.severe-page .alert-summary .alert-banner { margin-bottom:6px; }
.severe-page pre#spc-outlook-text { font-family: var(--font-monospace); }

/* ==========================================================================
   11. Responsive Styles
   ========================================================================== */

/* All responsive styles have been moved to mobile.css for better organization */