/*
Theme Name: Weather Tomorrow
Theme URI: https://weathertomorrow.click/
Author: WeatherTomorrow
Author URI: https://weathertomorrow.click/
Description: Light "Sky Day" theme for weathertomorrow.click — tomorrow's weather first, city search, hourly and 7-day forecasts, 25 weather tools. Live data from Open-Meteo (free, no API key). All content in English.
Version: 1.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: weather-tomorrow
Tags: weather, forecast, light, responsive, custom-menu
*/

/* ============================================================
   Weather Tomorrow — Sky Day (LIGHT theme)
   Palette: sky #0ea5e9 | sky bg #e0f2fe / #f0f9ff | white cards
   | sun yellow #facc15 | text slate #0f172a | muted #475569
   No dark sections anywhere.
   ============================================================ */

:root {
  --sky: #0ea5e9;
  --sky-dark: #0284c7;
  --sky-deep: #0369a1;
  --sky-light: #e0f2fe;
  --bg: #f0f9ff;
  --card: #ffffff;
  --sun: #facc15;
  --sun-dark: #eab308;
  --text: #0f172a;
  --muted: #475569;
  --border: #bae6fd;
  --border-soft: #e0f2fe;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(2, 132, 199, 0.10);
  --max-width: 1100px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--sky-dark); text-decoration: none; }
a:hover { color: var(--sky-deep); text-decoration: underline; }

h1, h2, h3 { color: var(--text); line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; }

p { margin: 0 0 1em; }

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

.section { padding: 40px 0; }
.section-title { margin-bottom: 4px; }
.section-sub { color: var(--muted); margin-bottom: 24px; }

/* ---------- Header — scrolls with the page (not sticky) ---------- */
.site-header {
  position: static;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  flex: 0 0 auto;
}
.site-logo:hover { color: var(--text); text-decoration: none; }
.site-logo svg { flex: 0 0 auto; }

.header-actions {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit-toggle {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}
.unit-toggle:hover { border-color: var(--sky); color: var(--sky-dark); }
.unit-toggle .unit-active {
  background: var(--sky);
  color: #ffffff;
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: 2px;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--sky-light);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Very narrow phones: icon-only menu button so the header stays one line. */
@media (max-width: 399px) {
  .menu-toggle .menu-label { display: none; }
}

/* Smallest phones: logo icon only, so logo + toggle + menu fit one line. */
@media (max-width: 359px) {
  .site-logo span { display: none; }
}

.main-nav { display: none; flex: 0 0 100%; width: 100%; order: 3; }
.site-header.nav-open .main-nav { display: block; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 4px; }
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.main-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
}
.main-nav a:hover {
  background: var(--sky-light);
  color: var(--sky-deep);
  text-decoration: none;
}
.main-nav .current-menu-item a,
.main-nav a.current {
  background: var(--sky-light);
  color: var(--sky-deep);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 100%);
  padding: 40px 0 32px;
  text-align: center;
}
.hero h1 { font-size: 2.25rem; margin-bottom: 8px; }
.hero-sub { color: var(--muted); max-width: 640px; margin: 0 auto 24px; font-size: 1.0625rem; }

/* Search */
.search-box { max-width: 560px; margin: 0 auto; position: relative; }
.search-row { display: flex; gap: 8px; }
.search-input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  background: #ffffff;
  color: var(--text);
}
.search-input:focus { border-color: var(--sky); outline: none; }
.search-btn {
  border: none;
  border-radius: 12px;
  background: var(--sky);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 20px;
}
.search-btn:hover { background: var(--sky-dark); }
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  list-style: none;
  margin: 0;
  padding: 4px;
  text-align: left;
  z-index: 50;
}
.search-results[hidden] { display: none; }
.search-results li {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}
.search-results li:hover,
.search-results li.active { background: var(--sky-light); }
.search-results .result-sub { color: var(--muted); font-size: 0.875rem; }

/* Status / error notice */
.weather-status {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 0.9375rem;
  color: var(--muted);
}
.weather-status.error {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
  padding: 12px 16px;
}
.weather-status[hidden] { display: none; }

/* ---------- Weather card ---------- */
.weather-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-top: 28px;
  text-align: left;
}
.weather-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.city-name { font-size: 1.375rem; font-weight: 800; margin: 0; }
.city-date { color: var(--muted); margin: 2px 0 0; font-size: 0.9375rem; }
.badge-tomorrow {
  background: var(--sun);
  color: #422006;
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}
.badge-sample {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 700;
  font-size: 0.8125rem;
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}
.weather-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0 8px;
}
.weather-icon { flex: 0 0 auto; width: 72px; height: 72px; }
.big-temp { font-size: 3.5rem; font-weight: 800; line-height: 1; }
.big-temp .temp-low { font-size: 1.5rem; font-weight: 600; color: var(--muted); }
.condition { font-size: 1.125rem; font-weight: 600; margin: 0; }
.feels-like { color: var(--muted); margin: 2px 0 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.stat {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat svg { flex: 0 0 auto; }
.stat-label { display: block; font-size: 0.8125rem; color: var(--muted); }
.stat-value { display: block; font-weight: 700; font-size: 1rem; }

.updated-at { color: var(--muted); font-size: 0.875rem; margin: 16px 0 0; }
.data-note { color: var(--muted); font-size: 0.875rem; margin: 8px 0 0; }

/* ---------- Hourly strip ---------- */
.hourly-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
}
.hour-item {
  flex: 0 0 84px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.06);
}
.hour-item .hour-time { font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.hour-item svg { margin: 8px auto; display: block; }
.hour-item .hour-temp { font-weight: 800; font-size: 1.0625rem; }
.hour-item .hour-rain { font-size: 0.8125rem; color: var(--sky-dark); font-weight: 600; }

/* ---------- 7-day cards ---------- */
.day-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.day-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
}
.day-card .day-name { font-weight: 800; margin-bottom: 4px; }
.day-card svg { margin: 6px auto; display: block; }
.day-card .day-temps { font-weight: 700; }
.day-card .day-temps .low { color: var(--muted); font-weight: 600; }
.day-card .day-rain { font-size: 0.875rem; color: var(--sky-dark); font-weight: 600; margin-top: 2px; }

/* ---------- Popular cities ---------- */
.city-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.city-pills a {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  color: var(--text);
}
.city-pills a:hover {
  background: var(--sky-light);
  border-color: var(--sky);
  color: var(--sky-deep);
  text-decoration: none;
}

/* ---------- Tools grid ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.tool-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  color: var(--text);
}
.tool-card:hover {
  border-color: var(--sky);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.16);
}
.tool-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--sky-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-card h3 { margin: 0 0 2px; font-size: 1.0625rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

/* ---------- Content + FAQ ---------- */
.content-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.content-card h2 { margin-top: 24px; }
.content-card h2:first-child { margin-top: 0; }

.faq-list details {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.06);
}
.faq-list summary {
  font-weight: 700;
  cursor: pointer;
  font-size: 1.0625rem;
}
.faq-list summary::marker { color: var(--sky); }
.faq-list details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- Footer (light) ---------- */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  color: var(--muted);
  margin-top: 16px;
  padding: 36px 0 24px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.footer-brand { color: var(--text); font-weight: 800; font-size: 1.125rem; }
.footer-brand p { color: var(--muted); font-weight: 400; font-size: 0.9375rem; margin-top: 6px; }
.footer-links h3 { font-size: 1rem; margin-bottom: 10px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--sky-deep); }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.875rem;
  text-align: center;
}

/* ---------- Inner pages ---------- */
.page-content {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  margin: 32px 0;
}
.page-content h1 { margin-bottom: 16px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { margin-bottom: 16px; }
.post-list h2 { font-size: 1.25rem; margin-bottom: 4px; }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  h1 { font-size: 2.25rem; }
  .hero h1 { font-size: 2.75rem; }
  .header-inner { padding: 10px 16px; gap: 12px; }
  .site-logo { font-size: 1.25rem; }
  .unit-toggle { padding: 6px 12px; font-size: 0.875rem; }
  .menu-toggle { display: none; }
  .main-nav {
    display: block;
    width: auto;
    order: 0;
    margin-left: auto;
  }
  .main-nav ul { flex-direction: row; gap: 2px; padding: 0; }
  .main-nav a { padding: 8px 12px; }
  .header-actions { margin-left: 0; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .day-grid { grid-template-columns: repeat(4, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 40px; }
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  .day-grid { grid-template-columns: repeat(7, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
