/* Jefferson County Weather - styles1.css - FIXED */
:root {
  --smooth-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --brand-teal: #1DA1AA;
  --brand-teal-dark: #157a82;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Body background - moved up and merged, avoid fixed on mobile for performance */
body {
  background-image: url('../images/seamless_pale_sky_clouds.webp');
  background-size: cover;

  background-color: #ffffff;
  position: relative;
  overflow-x: hidden;
}
@media (max-width: 768px) {
  body {
    background-attachment: scroll; /* fixed causes jank on iOS */
  }
}

/* =====================================================
   NAVBAR
===================================================== */
.navbar {
  transition: box-shadow 0.6s var(--smooth-ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(255,255,255,0.85);
}
.navbar.scrolled {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.navbar .nav-link {
  font-weight: 600;
  transition: color 0.2s var(--smooth-ease), transform 0.2s var(--smooth-ease);
}
.navbar .nav-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  transform: translateY(-1px);
}

/* =====================================================
   SITE TITLE
===================================================== */
.site-title {
  color: var(--brand-teal);
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.2;
   transition: transform .25s ease;
}
.site-title:hover { color: #00D01D; transform: scale(1.05); }

@media (min-width: 768px) {
  .site-title { font-size: 2rem; }
}

/* =====================================================
   SOCIAL ICONS
===================================================== */
.social-icons {
  display: flex;
  gap: 12px;
  align-items: center;
}
.social-icons a {
  margin-right: 15px;
  color: #1A00FF;
  transition: color 0.3s var(--smooth-ease), transform 0.3s var(--smooth-ease);
  display: inline-block;
}
.social-icons a:last-child { margin-right: 0; }
.social-icons a:hover,
.social-icons a:focus-visible {
  color: #0B0B0B;
  transform: scale(1.15);
}

/* =====================================================
   SCROLL TO TOP BUTTON - FIXED stray brace and transition
===================================================== */
#myBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99;
  border: none;
  background-color: #0d6efd;
  color: white;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: background-color 0.35s var(--smooth-ease),
              transform 0.2s var(--smooth-ease);
}
#myBtn:hover,
#myBtn:focus-visible {
  background-color: #990000;
  transform: translateY(-2px);
}
@media (max-width: 576px) {
  #myBtn {
    right: 16px;
    bottom: 16px;
    padding: 10px 12px;
  }
}

/* =====================================================
   CARDS & STATION
===================================================== */
.card.shadow-lg {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.card-body.bg-gradient {
  background: linear-gradient(to bottom right, #f9f9f9, #eaeaea);
}
.station-card {
  border-radius: 20px;
  border: none;
  background-color: #ffffff;
  overflow: hidden;
  transition: transform 0.3s var(--smooth-ease),
              box-shadow 0.3s var(--smooth-ease);
}
.station-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

/* Missing effects used in index.html */
.img-hover-effect {
  transition: transform 0.35s var(--smooth-ease), filter 0.35s var(--smooth-ease);
}
.img-hover-effect:hover {
  transform: scale(1.02);
  filter: brightness(1.03);
}
.live-temp {
  font-weight: 500;
  color: #ffffff;
 
}

/* =====================================================
   IFRAMES
===================================================== */
.weather-iframe {
  display: block;
  width: 100%;
  height: 500px;
  border: none;
  background-color: transparent;
}
.forecast-iframe {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: none;
}
.radar-wrapper {
  position: relative;
  width: 100%;
  padding-top: 50%;
  margin: 0 auto;
}
.radar-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: none;
}

/* =====================================================
   RESPONSIVENESS
===================================================== */
@media (max-width: 768px) {
  .weather-iframe { height: 600px; }
  .radar-wrapper { padding-top: 100%; }
  .forecast-iframe { height: 220px; }
}
@media (min-width: 992px) {
  .forecast-iframe { height: 255px; }
}

/* =====================================================
   DARK MODE
===================================================== */
body.dark-mode {
  background-color: #121212;
  background-image: none;
  color: #f1f1f1;
}
body.dark-mode a { color: #66d9ff; }
body.dark-mode a:hover { color: #8be9fd; }
body.dark-mode .navbar { background-color: #000 !important; }
body.dark-mode .navbar .nav-link { color: #ddd; }
body.dark-mode .navbar .nav-link:hover { color: #fff; }
body.dark-mode .card,
body.dark-mode .card-body,
body.dark-mode .card-footer,
body.dark-mode .station-card {
  background-color: #1f1f1f;
  color: #f5f5f5;
}
body.dark-mode .card-body.bg-gradient {
  background: linear-gradient(to bottom right, #1f1f1f, #2a2a2a);
}
body.dark-mode .border-bottom { border-bottom-color: #333; }
body.dark-mode .card-footer { border-top-color: #333; }
body.dark-mode main p,
body.dark-mode main strong { color: #f5f5f5; }
body.dark-mode main a { color: #4da6ff; }
body.dark-mode .station-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6); }
body.dark-mode .navbar-toggler { border-color: #ccc; }
body.dark-mode .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* =====================================================
   THEME FADE OVERLAY
===================================================== */
.theme-fade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease;
}
.theme-fade.active { opacity: 0.08; }

/* Main container - slightly translucent, avoid !important if possible */
main.container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 12px;
}
body.dark-mode main.container {
  background: rgba(18,18,18,0.92) !important;
}

/* =====================================================
   WEATHER BAR - original Saratoga/ambient styles cleaned
===================================================== */
.weather-bar {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  padding: 12px 10px;
  background-color: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
.weather-bar::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  #nws-daily-bar { justify-content: center; }
}

@media (max-width: 576px) {
  #nws-daily-bar {
    flex-direction: column;
    overflow-x: visible;
    gap: 8px;
    padding: 10px 15px;
  }
  #nws-daily-bar .weather-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: auto;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  #nws-daily-bar .weather-item:last-child { border-bottom: none; }
  #nws-daily-bar .weather-item img {
    margin: 0;
    width: 44px;
    height: 44px;
  }
  #nws-daily-bar .weather-name {
    text-align: left;
    min-width: 90px;
  }
  #nws-daily-bar .weather-desc {
    text-align: left;
    margin-top: 0;
    padding: 0 10px;
    flex: 1;
  }
  #nws-daily-bar .weather-temp {
    text-align: right;
    min-width: 75px;
  }
}

.weather-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 110px;
  font-family: sans-serif;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
}
.weather-item img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  margin: 5px 0;
}
.weather-name {
  font-size: 0.85em;
  font-weight: bold;
  color: #333;
  text-transform: uppercase;
}
.weather-temp {
  font-size: 1.05em;
  font-weight: bold;
  color: #111;
  white-space: nowrap;
}
.weather-desc {
  font-size: 0.8em;
  color: #555;
  margin-top: 5px;
  line-height: 1.2;
}
.weather-heading {
  font-family: sans-serif;
  font-size: 1.1em;
  color: #333;
  margin: 15px 0 5px 0;
  text-transform: uppercase;
}
#weather-widget-container { max-width: 100%; }

/* Pollen card */
.pollen-card {
  background: #f8f9fa;
  border: 0;
  border-radius: 6px;
  margin: 12px 0;
  overflow: hidden;
}
.pollen-card-body {
  background: #ffffff;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 270px;
  width: 100%;
  position: relative;
  text-align: center;
}
.pollen-card-body iframe {
  display: block !important;
  margin: 0 auto !important;
  max-width: 100%;
  height: auto;
}

/* Environmental metrics grid */
.env-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 15px;
  margin-bottom: 20px;
}
.env-chart-card {
  background: #f9f9fb;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.env-widget-content {
  width: 100%;
  min-height: 290px;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  box-sizing: border-box;
}
.env-widget-content #PurpleAirWidget_194303_module_US_EPA_AQI_conversion_C0_average_10_layer_US_EPA_AQI {
  width: auto;
  max-width: 330px;
  margin: 0 auto;
}
body.dark-mode .env-chart-card { background: #2a2a2a; }
body.dark-mode .env-widget-content { background: #1f1f1f; }
body.dark-mode .env-widget-content iframe,
body.dark-mode .env-widget-content [id^="PurpleAirWidget"] {
  filter: invert(0.92) hue-rotate(180deg);
  background-color: transparent !important;
}
body.dark-mode .weather-bar {
  background-color: #1f1f1f;
  border-color: #333;
}
body.dark-mode .weather-name,
body.dark-mode .weather-temp { color: #f5f5f5; }
body.dark-mode .weather-desc { color: #aaa; }

/* Hourly scroll */
.hourly-scroll-wrapper {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 12px;
  padding-bottom: 10px;
}
.hourly-scroll-wrapper::-webkit-scrollbar { display: none; }
.hourly-card {
  flex: 0 0 75px;
  scroll-snap-align: start;
}

.a2a_kit {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center;
  max-width: 100%;
  gap: 6px;
}


/* =====================================================
   MISSING STAT BOXES - restored from old stylesheet
   These were lost in the previous clean and cause the 
   24-HR HIGH / MONTH HIGH / sunrise boxes to look unboxed
===================================================== */

/* The 24-hr, month, year, all-time stat pills */
.aw-stat-box {
  background: #f8f9fa;
  background-color: #f5f5f7;
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 110px;
  flex: 1 1 110px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
}

.aw-stat-box small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #86868b;
  line-height: 1.2;
}

.aw-stat-box b {
  font-size: 13.5px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1.2;
  white-space: nowrap;
}

/* Slightly larger on desktop, compact on mobile */
@media (max-width: 576px) {
  .aw-stat-box {
    min-width: calc(50% - 12px);
    flex: 1 1 calc(50% - 12px);
    padding: 8px 6px;
  }
  .aw-stat-box b {
    font-size: 12px;
  }
}

/* =====================================================
   ASTRO GRID - sunrise / sunset / moonrise / moonset / moon phase
===================================================== */
.astro-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 24px 0 10px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.astro-item {
  background: #f8f9fa;
  background-color: #f5f5f7;
  border-radius: 12px;
  padding: 14px 8px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.astro-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin-bottom: 2px;
}
#moonphase-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.astro-item small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #86868b;
  display: block;
}

.astro-item span {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .astro-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}
@media (max-width: 480px) {
  .astro-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .astro-item {
    padding: 12px 6px 8px;
  }
}

/* =====================================================
   CHART CARDS - 24-hour history
===================================================== */
.aw-chart-card {
  background: #f8f9fa;
  background-color: #f9f9fb;
  border-radius: 12px;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.aw-chart-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #86868b;
  margin-bottom: 8px;
  text-align: left;
}

.aw-chart-card canvas {
  width: 100% !important;
  height: auto !important;
  max-height: 220px;
}

/* =====================================================
   DARK MODE for weather station widget & boxes
===================================================== */
body.dark-mode #aw-widget-wrapper {
  background: #1e1e1e !important;
  color: #f5f5f7 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .aw-header-row {
  border-bottom-color: #333 !important;
}

body.dark-mode .aw-stat-row {
  border-top-color: #333 !important;
}

body.dark-mode .aw-stat-row-extended {
  border-top-color: #444 !important;
}

body.dark-mode .aw-wind-box {
  background: #2a2a2c !important;
}

body.dark-mode .aw-data-list {
  color: #e5e5ea !important;
}

body.dark-mode #aw-temp,
body.dark-mode #aw-temp-c,
body.dark-mode #aw-wind-speed,
body.dark-mode #aw-wind-speed-kph,
body.dark-mode #aw-wind-gust,
body.dark-mode #aw-wind-gust-kph {
  color: #f5f5f7 !important;
}

body.dark-mode #aw-location,
body.dark-mode #aw-time,
body.dark-mode #aw-feels {
  color: #a1a1a6 !important;
}

body.dark-mode .aw-stat-box,
body.dark-mode .astro-item,
body.dark-mode .aw-chart-card {
  background: #262628;
  background-color: #262628;
  border-color: #3a3a3c;
  box-shadow: none;
}

body.dark-mode .aw-stat-box small,
body.dark-mode .astro-item small,
body.dark-mode .aw-chart-title {
  color: #a1a1a6;
}

body.dark-mode .aw-stat-box b,
body.dark-mode .astro-item span {
  color: #f5f5f7;
}

body.dark-mode .astro-grid {
  border-top-color: #333;
}


.hero-banner {
    position: relative;
    width: 100%;
  

    background:
        linear-gradient(
            rgba(0,0,0,.45),
            rgba(0,0,0,.55)
        ),
        url('/images/seamless_pale_sky_clouds.webp');

    background-size: cover;
    background-position: center;

    border-radius: 16px;
    overflow: hidden;

    margin-bottom: 7px;
}

.hero-overlay {
    text-align: center;
    padding: 20px 20px;
    color: white;
}

.hero-title {
    font-size: clamp(2rem, 3vw, 3.5rem);
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 2px;

    margin: 0;

     transition: color 0.5s, transform 0.5s;
}

.hero-title:hover {
    text-shadow:
        0 0 10px rgba(255,255,255,.8),
        0 0 15px rgba(100,180,255,.8);

    transform: scale(1.03);
}

.hero-subtitle {
    margin-top: 12px;
    font-size: 1.1rem;
    opacity: .95;
}

.hero-location {
    margin-top: 8px;
    font-size: .95rem;
    opacity: .8;
}

.hero-current {
    margin-top: 16px;

    display: inline-block;

    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);

    padding: 6px 10px;
    border-radius: 20px;

   
}

/* =====================================================
   GOOGLE FORM IFRAME RESPONSIVENESS
===================================================== */
.google-form-iframe {
  width: 100%;
  max-width: 640px; /* Default for mobile/smaller screens */
  border: none;
  display: block;
  margin: 0 auto;
}

/* Expand width on medium screens (tablets/laptops) */
@media (min-width: 768px) {
  .google-form-iframe {
    max-width: 720px;
  }
}

/* Expand width on large desktop screens */
@media (min-width: 992px) {
  .google-form-iframe {
    max-width: 90%;
  }
}