:root {
  --sky: #357a4f;
  --sky-dark: #28653f;
  --sky-light: #e6f2e8;
  --brand-strong: #2e6b45;
  /* chữ/nút xanh đạt tương phản WCAG AA trên nền trắng */
  --brand-soft: #eef6ef;
  --sky-mid: #38bdf8;
  --cloud: #f7fbf7;
  --night: #0f172a;
  --night2: #1e293b;
  --night3: #334155;
  --text: #0f172a;
  --muted: #56637a;
  --muted2: #64748b;
  --accent: #f97316;
  --accent2: #fbbf24;
  --green: #357a4f;
  --surface: #ffffff52;
  --surface2: #f6f9f6;
  --border: rgba(15, 23, 42, 0.08);
  --radius: 5px;
  --shadow: 0 4px 24px rgba(46, 107, 69, 0.08);
  --shadow2: 0 2px 12px rgba(46, 107, 69, 0.07);
  --blur: blur(30px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 420px;
  background-image: url(./banner.svg);
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
  clip-path: ellipse(120% 100% at 50% 0%);
}

/* ========== HEADER ========== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(47 122 77 / 96%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.admin-bar #wpadminbar {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  top: 0 !important;
  z-index: 999999 !important;
}

body.admin-bar header {
  top: 32px;
}

.preferred-location-bar {
  position: sticky;
  top: 64px;
  z-index: 90;
  height: 28px;
  background: rgb(230 242 232 / 94%);
  border-bottom: 1px solid rgb(62 149 96 / 18%);
  backdrop-filter: blur(12px);
}

body.admin-bar .preferred-location-bar {
  top: 96px;
}

.preferred-location-inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.preferred-location-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
  color: var(--sky-dark);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.preferred-location-label strong {
  color: #0f172a;
  font-weight: 700;
}

.preferred-location-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #4a9e68;
  box-shadow: 0 0 0 3px rgb(74 158 104 / 18%);
}

.preferred-location-dot::before,
.preferred-location-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgb(74 158 104 / 48%);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.35);
  animation: preferredLocationPulse 2s ease-out infinite;
}

.preferred-location-dot::after {
  animation-delay: 1s;
}

@keyframes preferredLocationPulse {
  0% {
    opacity: 0.65;
    transform: scale(0.35);
  }

  70% {
    opacity: 0;
    transform: scale(1.25);
  }

  100% {
    opacity: 0;
    transform: scale(1.25);
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar header {
    top: 46px;
  }

  .preferred-location-bar {
    top: 110px;
  }

  body.admin-bar .preferred-location-bar {
    top: 156px;
  }
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text {
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--accent2);
}

.search-bar {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: background 0.2s;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-bar input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  pointer-events: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.dropdown {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: -8px;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: none;
  font-family: inherit;
  transition: all 0.2s;
}

.dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.dropdown-toggle svg {
  transition: transform 0.2s;
}

.dropdown:hover .dropdown-toggle svg {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--cloud);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  min-width: 640px;
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  z-index: 200;
}

.dropdown:hover .dropdown-menu {
  display: grid;
}

.region-group h4 {
  font-family: 'Lexend', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.region-group a {
  display: block;
  color: rgba(44, 44, 44, 0.85);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 8px;
  border-radius: 6px;
  transition: all 0.15s;
  line-height: 1.4;
}

.region-group a:hover {
  background: rgb(62 149 96 / 14%);
  color: #000000;
  padding-left: 12px;
}

/* ========== MAIN ========== */
main {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ========== HERO WEATHER ========== */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 32px;
}

.hero-main {
  background: var(--surface);
  backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  padding: 32px 36px;
  color: #0f172a;
  position: relative;
  overflow: hidden;
}

.home-hero-main {
  padding: 0;
  border: 1px solid var(--border);
}

.home-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  padding: 22px 18px 20px;
}

.home-hero-primary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-hero-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--sky);
  border-radius: 16px;
  background: var(--sky-light);
}

.home-weather-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.home-weather-meta .meta-item {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.26);
  align-items: flex-start;
}

.home-weather-meta .meta-item span:last-child {
  line-height: 1.45;
}

.home-hero-aside .update-time {
  margin-top: 12px;
  padding-left: 4px;
}

.hero-main::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.hero-main::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: 80px;
  width: 280px;
  height: 280px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.city-name {
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.65);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.city-name svg {
  width: 14px;
  height: 14px;
}

.city-title {
  font-family: 'Lexend', sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero-temp-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}

.big-temp {
  font-family: 'Lexend', sans-serif;
  font-size: 96px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -4px;
}

.big-temp sup {
  font-size: 36px;
  font-weight: 500;
  vertical-align: super;
  letter-spacing: 0;
}

.weather-icon-big {
  font-size: 72px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.weather-desc {
  font-size: 18px;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 24px;
}

.weather-meta {
  display: flex;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.75);
}

.meta-item span:first-child {
  font-size: 16px;
}

/* ========== 3-DAY FORECAST ========== */
.forecast-panel {
  background: var(--surface);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 24px;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.forecast-title {
  font-family: 'Lexend', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 16px;
}

.forecast-day {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  gap: 12px;
}

.forecast-day:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.forecast-day:first-of-type {
  padding-top: 0;
}

.day-name {
  font-weight: 600;
  font-size: 14px;
  width: 80px;
  flex-shrink: 0;
}

.day-date {
  font-size: 11px;
  opacity: 0.6;
  display: block;
}

.day-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin: 0 8px;
}

.day-desc {
  font-size: 13px;
  opacity: 0.8;
  flex: 1;
  line-height: 1.3;
}

.day-temps {
  font-weight: 600;
  font-size: 15px;
  text-align: right;
  white-space: nowrap;
}

.day-temps .low {
  font-weight: 400;
  opacity: 0.6;
  font-size: 13px;
  margin-left: 4px;
}

/* ========== SECTION TITLE ========== */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  margin-top: 8px;
}

.section-title {
  font-family: 'Lexend', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.section-badge {
  background: var(--sky-light);
  color: var(--sky-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.home-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.home-main-col {
  min-width: 0;
}

.home-section-header {
  margin-top: 0;
}

/* ========== PROVINCES GRID ========== */
.provinces-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.province-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.province-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  opacity: 0;
  transition: opacity 0.2s;
}

.province-card:hover {
  border-color: var(--sky);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.province-card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.card-city {
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.card-region {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 2px;
  font-weight: 400;
}

.card-icon {
  font-size: 40px;
  line-height: 1;
}

.card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.card-temp {
  font-family: 'Lexend', sans-serif;
  font-size: 36px;
  font-weight: 300;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
}

.card-temp span {
  font-size: 16px;
  font-weight: 500;
  vertical-align: super;
  letter-spacing: 0;
}

.card-info {
  text-align: right;
}

.card-desc {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.card-humidity {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted2);
  justify-content: flex-end;
}

/* ========== FOOTER ========== */
footer {
  background: var(--night);
  color: rgba(255, 255, 255, 0.75);
  padding: 52px 24px 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 300px 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 20px;
}

.footer-brand .logo-text {
  font-size: 20px;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  margin-top: 12px;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
}

.social-btn:hover {
  background: var(--sky);
}

.footer-col h5 {
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--green);
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--sky-mid);
}

/* ========== HAMBURGER BUTTON ========== */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.25s;
}

.menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========== MOBILE DRAWER ========== */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--cloud);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
  border-top: 1px solid var(--border);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-search {
  position: relative;
  margin-bottom: 16px;
}

.drawer-search input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow2);
}

.drawer-search input::placeholder {
  color: var(--muted);
}

.drawer-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sky);
}

.drawer-nav-links {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.drawer-nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s;
  box-shadow: var(--shadow2);
}

.drawer-nav-links a:hover {
  background: var(--sky);
  color: #fff;
}

.drawer-region {
  margin-bottom: 20px;
}

.drawer-region h4 {
  font-family: 'Lexend', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--sky-dark);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border);
}

.drawer-region-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.drawer-region-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: all 0.2s;
  background: var(--surface);
  border: 1px solid var(--border);
}

.drawer-region-links a:hover {
  background: var(--sky-light);
  border-color: var(--sky);
  color: var(--sky-dark);
}

/* ========== BADGES & UTILS ========== */
.now-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.75);
  margin-bottom: 20px;
}

.pulse {
  width: 7px;
  height: 7px;
  background: #6db47b;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1.5);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.update-time {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.5);
  margin-top: 6px;
}

/* ========== PROVINCES SECTION ========== */
.provinces-section {
  margin-top: 36px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  padding: 32px 36px 28px;
  position: relative;
  overflow: hidden;
}

.provinces-section-title {
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted2, #64748b);
  margin-bottom: 22px;
}

.provinces-grid-full {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  /* Desktop: 4 cols × 5 rows = 20 items visible */
  max-height: calc(5 * 52px);
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 100px), transparent 100%);
  mask-image: linear-gradient(to bottom, black calc(100% - 100px), transparent 100%);
}

.provinces-grid-full.expanded {
  max-height: 5000px;
  -webkit-mask-image: none;
  mask-image: none;
}

.province-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 0px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.province-link:hover {
  background: rgb(230 242 232 / 55%);
  color: var(--green);
  transform: translateX(4px);
}

.provinces-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px auto 0;
  padding: 10px 28px;
  border: 1.5px solid rgb(62 149 96 / 26%);
  border-radius: 0px;
  background: rgb(62 149 96 / 6%);
  color: var(--green);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.provinces-toggle:hover {
  background: rgb(214 236 218 / 34%);
  border-color: rgb(109 180 123 / 40%);
  transform: translateY(-1px);
}

.provinces-toggle-icon {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.provinces-toggle.active .provinces-toggle-icon {
  transform: rotate(180deg);
}

/* ========== TABLET ========== */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .home-body {
    grid-template-columns: 1fr;
  }

  .provinces-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  header nav {
    display: none;
  }

  .search-bar {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .mobile-drawer {
    display: block;
  }
}

/* ========== MOBILE ========== */
@media (max-width: 720px) {
  .preferred-location-bar {
    top: 58px;
    height: 26px;
  }

  body.admin-bar .preferred-location-bar {
    top: 104px;
  }

  .preferred-location-inner {
    padding: 0 16px;
  }

  .preferred-location-label {
    max-width: 100%;
    overflow: hidden;
    gap: 6px;
    font-size: 11.5px;
    text-overflow: ellipsis;
  }

  .preferred-location-label span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-inner {
    padding: 0 16px;
    gap: 12px;
    height: 58px;
    justify-content: flex-start;
  }

  .mobile-actions {
    margin-left: auto;
  }

  .mobile-drawer {
    top: 58px;
  }

  main {
    padding: 24px 16px 48px;
  }

  body::before {
    height: 340px;
  }

  .hero-main {
    padding: 22px 20px;
    border-radius: 20px;
  }

  .home-hero-main {
    padding: 0;
  }

  .home-hero-layout,
  .detail-hero-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .city-title {
    font-size: 23px;
    margin-bottom: 10px;
  }

  .big-temp {
    font-size: 72px;
    letter-spacing: -3px;
  }

  .big-temp sup {
    font-size: 28px;
  }

  .weather-icon-big {
    font-size: 56px;
  }

  .hero-temp-row {
    margin-bottom: 14px;
  }

  .weather-desc {
    font-size: 15px;
    margin-bottom: 18px;
  }

  .weather-meta,
  .home-weather-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    order: 1;
  }

  .detail-hero-aside,
  .home-hero-aside {
    display: flex;
    flex-direction: column;
  }

  .update-time {
    order: 2;
    margin-top: 12px;
    text-align: center;
    width: 100%;
  }

  .meta-item {
    font-size: 13px;
  }

  .provinces-section {
    padding: 22px 18px 20px;
    border-radius: 20px;
    margin-top: 24px;
  }

  .provinces-section-title {
    font-size: 12px;
    margin-bottom: 16px;
  }

  .provinces-grid-full {
    grid-template-columns: repeat(2, 1fr);
    /* Mobile: 3 cols × 5 rows = 15 items visible */
    max-height: calc(5 * 46px);
    -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 60px), transparent 100%);
    mask-image: linear-gradient(to bottom, black calc(100% - 60px), transparent 100%);
  }

  .province-link {
    padding: 12px 10px;
    font-size: 12.5px;
    gap: 5px;
  }

  .provinces-toggle {
    font-size: 12px;
    padding: 8px 22px;
    margin-top: 14px;
  }

  .forecast-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .day-name {
    width: 68px;
    font-size: 13px;
  }

  .day-icon {
    font-size: 24px;
    margin: 0 4px;
  }

  .day-desc {
    font-size: 12px;
  }

  .day-temps {
    font-size: 14px;
  }

  .section-title {
    font-size: 17px;
  }

  .provinces-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .province-card {
    padding: 14px;
    border-radius: 14px;
  }

  .card-city {
    font-size: 14px;
  }

  .card-icon {
    font-size: 32px;
  }

  .card-temp {
    font-size: 30px;
  }

  .card-temp span {
    font-size: 14px;
  }

  .card-desc {
    font-size: 12px;
  }

  footer {
    padding: 10px 16px 0;
  }

  .footer-top {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  .footer-brand,
  .footer-widgets-area {
    width: 100%;
  }

  .footer-widgets-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-widget-column {
    width: 100%;
    min-width: 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .now-badge {
    font-size: 11px;
    padding: 3px 10px;
  }
}

@media (max-width: 380px) {
  .provinces-grid {
    grid-template-columns: 1fr;
  }

  .big-temp {
    font-size: 60px;
  }
}

/* ============================================================
   DETAIL PAGE — chi tiết thời tiết tỉnh thành
   ============================================================ */

/* ── Sticky Navigation Tabs ── */
.detail-nav {
  display: block;
  position: sticky;
  top: 85px;
  z-index: 97;
  padding: 12px 0;
  margin-left: 0;
}

.detail-nav+main {
  padding-top: 0;
}

.detail-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.detail-nav-inner::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  flex: 1;
  /* Fill width */
  text-align: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding: 10px 16px;
  white-space: nowrap;
  border-radius: 1px;
  /* Pill shape */
  background: rgb(255 255 255 / 91%);
  /* Soft transparent background */
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #00000021;
}

.nav-tab:hover {
  background: rgb(169 214 172 / 40%);
  color: var(--sky-dark);
}

.nav-tab.active {
  background: var(--sky);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.nav-tab.active::after {
  display: none;
  /* Remove underline */
}

@media (max-width: 900px) {
  .detail-nav-inner {
    gap: 8px;
  }

  .nav-tab {
    flex: none;
    /* Don't force fill on mobile to allow scroll */
    min-width: fit-content;
    padding: 8px 14px;
  }
}

@media (max-width: 720px) {
  .detail-nav {
    top: 80px;
    z-index: 97;
    margin-bottom: 0;
    padding: 8px 0;
  }

  .detail-nav+main {
    padding-top: 0;
  }

  .detail-nav-inner {
    padding: 0 16px;
  }

  .nav-tab {
    font-size: 12px;
  }
}

/* ── Hero full-width ── */
.detail-hero {
  background: var(--surface);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  padding: 22px 18px 20px;
  color: #0f172a;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

.detail-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.detail-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 40%;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.detail-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 32px;
}

.detail-hero-primary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.detail-hero-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.detail-hero-layout .weather-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-hero-layout .meta-item {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.26);
  align-items: flex-start;
}

.detail-hero-layout .meta-item span:last-child {
  line-height: 1.45;
}

.detail-hero-aside .update-time {
  margin-top: 12px;
  padding-left: 4px;
}

.detail-hero-primary .hero-temp-row {
  margin-bottom: 14px;
  justify-content: center;
  align-items: center;
}

.detail-hero-primary .big-temp {
  font-size: 100px;
}

.detail-hero-primary .weather-desc {
  font-size: 19px;
  margin-bottom: 20px;
}

.detail-temp-range {
  font-family: 'Lexend', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.65);
}

.detail-temp-range strong {
  color: var(--text);
}

/* ── 7/3 layout ── */
.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

/* ── Cards chung ── */
.detail-card {
  background: var(--surface);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 24px;
  margin-bottom: 20px;
}

.detail-card:last-child {
  margin-bottom: 0;
}

.detail-card-title {
  font-family: 'Lexend', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-card-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── 12h forecast (horizontal scroll) ── */
.hourly-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--sky-light) transparent;
}

.hourly-list::-webkit-scrollbar {
  height: 4px;
}

.content-section {
  margin-top: 32px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  padding: 32px 36px 28px;
  position: relative;
  overflow: hidden;
}

.hourly-list::-webkit-scrollbar-thumb {
  background: var(--sky-light);
  border-radius: 4px;
}

.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 0px;
  background: var(--surface2);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 62px;
  text-align: center;
}

.hourly-item:hover,
.hourly-item.active {
  background: var(--sky-light);
  border-color: var(--sky);
}

.hourly-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.hourly-item.active .hourly-time {
  color: var(--sky-dark);
}

.hourly-icon {
  font-size: 22px;
  line-height: 1;
}

.hourly-temp {
  font-family: 'Lexend', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.hourly-rain {
  font-size: 10px;
  color: var(--sky);
  font-weight: 500;
}

/* ── 7-day accordion ── */
.day-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-row {
  border: 1.5px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.day-row.open {
  border-color: var(--sky);
  box-shadow: 0 2px 16px rgba(14, 165, 233, 0.1);
}

.day-row-header {
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
  background: var(--surface);
  transition: background 0.2s;
  user-select: none;
}

.day-row.open .day-row-header {
  background: var(--sky-light);
}

.day-row-name {
  font-weight: 700;
  font-size: 14px;
  width: 90px;
  flex-shrink: 0;
}

.day-row-date {
  font-size: 11px;
  color: var(--muted2);
  font-weight: 400;
  display: block;
}

.day-row-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.day-row-desc {
  flex: 1;
  font-size: 13px;
  color: var(--muted);
}

.day-row-temps {
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  color: var(--text);
}

.day-row-temps .lo {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted2);
  margin-left: 5px;
}

.day-row-humidity {
  font-size: 12px;
  color: var(--sky);
  font-weight: 600;
  width: 44px;
  text-align: right;
  flex-shrink: 0;
}

.day-row-chevron {
  color: var(--muted2);
  font-size: 12px;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.day-row.open .day-row-chevron {
  transform: rotate(180deg);
}

/* expanded detail */
.day-row-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(.4, 0, .2, 1);
}

.day-row-body-inner {
  padding: 0 18px 18px;
  background: var(--sky-light);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.day-detail-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.day-detail-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted2);
}

.day-detail-stat-value {
  font-family: 'Lexend', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.day-detail-stat-sub {
  font-size: 11px;
  color: var(--muted);
}

/* ── Chart ── */
.chart-stack {
  display: grid;
  gap: 18px;
}

.chart-panel {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.chart-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-panel-head h3 {
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  flex: 1;
}

.chart-panel-head .detail-card-subtitle {
  width: 100%;
  margin: 4px 0 0 0;
  font-size: 13.5px;
  order: 3;
}

.chart-panel-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--sky-light);
  color: var(--sky-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.chart-badge {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--sky-light);
  color: var(--sky-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.chart-wrapper {
  position: relative;
  height: 240px;
}

.chart-wrapper.compact {
  height: 240px;
}

.chart-wrapper canvas {
  width: 100% !important;
  display: block;
}

.chart-tooltip {
  position: fixed;
  z-index: 300;
  min-width: 152px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 6px;
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.chart-tooltip span {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.chart-tooltip b {
  color: #fff;
  font-weight: 600;
}

/* ── Sidebar cards ── */
.sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* AQI */
.aqi-value-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 16px;
}

.aqi-number {
  font-family: 'Lexend', sans-serif;
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -2px;
}

.aqi-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.aqi-good {
  background: #e3f1e5;
  color: #2e6b45;
}

.aqi-moderate {
  background: #fef9c3;
  color: #a16207;
}

.aqi-sensitive {
  background: #ffedd5;
  color: #c2410c;
}

.aqi-unhealthy {
  background: #fee2e2;
  color: #b91c1c;
}

.aqi-bar-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6db47b 0%, #facc15 40%, #fb923c 65%, #f87171 85%, #a855f7 100%);
  position: relative;
  margin-bottom: 6px;
}

.aqi-bar-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: left 0.6s cubic-bezier(.4, 0, .2, 1);
}

.aqi-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 600;
  color: var(--muted2);
  letter-spacing: 0.3px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.aqi-pollutants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.aqi-pollutant {
  background: var(--surface2);
  border-radius: 5px;
  padding: 10px 12px;
}

.aqi-pollutant-name {
  font-size: 10px;
  color: var(--muted2);
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.aqi-pollutant-val {
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.aqi-pollutant-unit {
  font-size: 10px;
  color: var(--muted2);
}

/* ── Sun arc ── */
.sun-arc-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 8px;
}

.sun-arc-svg-wrap {
  width: 100%;
  max-width: 260px;
}

.sun-arc-times {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 260px;
  margin-top: 2px;
}

.sun-arc-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.sun-arc-time-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted2);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sun-arc-time-val {
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.sun-duration {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

.sun-duration strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Extra stats row in sidebar ── */
.sidebar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 0;
}

.stat-mini {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-mini-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted2);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.stat-mini-value {
  font-family: 'Lexend', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}

.stat-mini-sub {
  font-size: 11px;
  color: var(--muted);
}

/* ── Back button ── */
/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.breadcrumb a {
  color: rgba(15, 23, 42, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--sky-dark);
}

.breadcrumb svg {
  color: rgba(15, 23, 42, 0.4);
}

.breadcrumb span:last-child {
  color: var(--text);
}

/* ── Responsive detail page ── */
@media (max-width: 1024px) {
  .hourly-list {
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 42px) / 8);
    /* 8 items (7 gaps of 6px = 42px) */
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .hourly-item {
    scroll-snap-align: start;
  }
}

@media (max-width: 960px) {
  .detail-body {
    grid-template-columns: 1fr;
  }

  .sidebar-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .sidebar-col .detail-card {
    margin-bottom: 0;
  }
}

@media (max-width: 720px) {
  .detail-hero {
    padding: 24px 20px 22px;
    border-radius: 22px;
    margin-bottom: 20px;
  }

  .detail-hero::before {
    width: 180px;
    height: 180px;
    top: -40px;
    right: -40px;
  }

  .detail-hero::after {
    width: 220px;
    height: 220px;
    bottom: -90px;
    left: 28%;
  }

  .detail-hero-inner {
    flex-direction: column;
    gap: 18px;
  }

  .detail-hero-left .city-title {
    font-size: 34px;
  }

  .detail-hero-left .big-temp {
    font-size: 82px;
  }

  .detail-hero-left .weather-desc {
    font-size: 16px;
    max-width: 28ch;
  }

  .detail-hero-left .weather-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .detail-hero-left .meta-item {
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.26);
  }

  .detail-hero-left .meta-item span:last-child {
    line-height: 1.45;
  }

  .detail-body {
    gap: 18px;
  }

  .detail-card {
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 16px;
  }

  .day-row-header {
    display: grid;
    grid-template-columns: minmax(82px, 1fr) auto;
    gap: 10px 14px;
    align-items: center;
  }

  .day-row-name {
    width: auto;
  }

  .day-row-icon {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
  }

  .day-row-desc {
    grid-column: 1 / -1;
    order: 3;
  }

  .day-row-humidity,
  .day-row-temps,
  .day-row-chevron {
    justify-self: start;
    text-align: left;
    width: auto;
  }

  .sidebar-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .breadcrumb {
    margin-bottom: 20px;
    font-size: 13px;
    padding: 0 4px;
  }

  .detail-hero {
    padding: 22px 18px 20px;
    border-radius: 20px;
  }

  .detail-hero-left .city-name {
    font-size: 12px;
    gap: 5px;
  }

  .detail-hero-left .city-title {
    font-size: 30px;
  }

  .detail-hero-left .hero-temp-row {
    gap: 12px;
    align-items: center;
  }

  .detail-hero-left .big-temp {
    font-size: 72px;
    letter-spacing: -3px;
  }

  .detail-hero-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .detail-hero-primary {
    width: 100%;
  }

  .detail-hero-primary .big-temp sup {
    font-size: 28px;
  }

  .detail-hero-primary .weather-desc {
    margin-bottom: 16px;
  }

  .detail-hero-aside .weather-meta {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    order: 1;
  }

  .detail-hero-aside .meta-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .detail-hero-aside .update-time {
    order: 2;
    margin-top: 12px;
    line-height: 1.5;
    text-align: center;
    width: 100%;
  }

  .detail-hero-aside {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .detail-card {
    padding: 18px;
    border-radius: 16px;
  }

  .detail-card-title {
    margin-bottom: 16px;
    font-size: 11px;
    letter-spacing: 1.2px;
  }

  .hourly-list {
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 20px) / 3);
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    margin: 0;
    padding: 2px 0 0;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }

  .hourly-item {
    min-width: 0;
    padding: 12px 6px;
    scroll-snap-align: start;
  }

  .day-row-header {
    grid-template-columns: minmax(88px, 1fr) auto auto;
    padding: 5px 14px;
    gap: 0 12px;
    align-items: center;
  }

  .day-row-name {
    font-size: 13px;
    width: auto;
  }

  .day-row-date {
    font-size: 10px;
  }

  .day-row-icon {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: center;
    font-size: 22px;
  }

  .day-row-desc {
    grid-column: 1 / -1;
    font-size: 12px;
    line-height: 1.45;
    padding-right: 18px;
  }

  .day-row-humidity {
    font-size: 11px;
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    text-align: left;
  }

  .day-row-temps {
    font-size: 15px;
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
    text-align: right;
  }

  .day-row-chevron {
    position: absolute;
    top: 16px;
    right: 14px;
    justify-self: auto;
  }

  .day-row {
    position: relative;
  }

  .day-row-body-inner {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 14px 14px;
  }

  .day-detail-stat {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
  }

  .chart-wrapper {
    height: 260px;
  }

  .aqi-value-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .aqi-number {
    font-size: 48px;
  }

  .aqi-pollutants,
  .sidebar-stats {
    grid-template-columns: 1fr 1fr;
  }

  .sun-arc-container {
    padding-top: 0;
  }

  .chart-panel {
    padding: 16px 14px 12px;
    border-radius: 16px;
  }

  .chart-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .chart-panel-head h3 {
    font-size: 14px;
  }

  .chart-wrapper.compact {
    height: 188px;
  }
}

@media (max-width: 420px) {
  .detail-hero-primary .city-title {
    font-size: 23px;
  }

  .detail-hero-primary .big-temp {
    font-size: 64px;
  }

  .weather-icon-big {
    font-size: 48px;
  }

  .detail-hero-primary .weather-desc {
    font-size: 15px;
  }

  .hourly-list {
    grid-auto-columns: calc((100% - 115px) / 2);
  }

  .day-row-header {
    grid-template-columns: minmax(72px, -1fr) auto;
  }

  .day-row-icon {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .day-row-temps {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .day-row-humidity {
    grid-column: 1;
    grid-row: 2;
  }

  .day-row-desc {
    grid-column: 1 / -1;
  }



  .day-row-body-inner {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 14px 14px;
  }

  .chart-wrapper,
  .chart-wrapper.compact {
    height: 245px;
  }

  .aqi-labels {
    font-size: 8px;
  }
}

/* ============================================================
   HOURLY PAGE — sidebar summary card + day separator
   ============================================================ */

/* ── Day separator ── */
.hourly-day-separator {
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--sky-dark);
  background: var(--sky-light);
  padding: 10px 16px;
  border-radius: 10px;
  margin: 12px 0 6px;
  letter-spacing: 0.2px;
}

.hourly-day-separator:first-child {
  margin-top: 0;
}

/* ── Sidebar weather summary ── */
.hourly-summary-card {
  border: 1.5px solid rgba(14, 165, 233, 0.15);
}

.hourly-summary-header {
  margin-bottom: 14px;
}

.hourly-summary-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.hourly-summary-city {
  font-family: 'Lexend', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin: 0;
}

.hourly-summary-temp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.hourly-summary-temp {
  font-family: 'Lexend', sans-serif;
  font-size: 52px;
  font-weight: 300;
  color: var(--text);
  line-height: 1;
  letter-spacing: -2px;
}

.hourly-summary-temp sup {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
}

.hourly-summary-icon {
  font-size: 48px;
  line-height: 1;
}

.hourly-summary-desc {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.5;
}

.hourly-summary-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.hourly-summary-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  font-size: 13px;
}

.hourly-summary-meta-item span {
  color: var(--muted);
  font-weight: 500;
}

.hourly-summary-meta-item strong {
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}

@media (max-width: 720px) {
  .hourly-summary-city {
    font-size: 22px;
  }

  .hourly-summary-temp {
    font-size: 44px;
  }

  .hourly-summary-icon {
    font-size: 40px;
  }

  .hourly-summary-meta {
    grid-template-columns: 1fr 1fr;
  }

  .hourly-summary-meta-item {
    padding: 8px 5px;
  }
}

/* TOMORROW HERO CARD */
.tomorrow-hero-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tomorrow-hero-date {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.tomorrow-hero-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.tomorrow-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tomorrow-hero-icon {
  font-size: 64px;
  line-height: 1;
}

.tomorrow-hero-temp-wrap {
  display: flex;
  flex-direction: column;
}

.tomorrow-hero-temp {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
}

.tomorrow-hero-temp sup {
  font-size: 24px;
  font-weight: 500;
  margin-top: 10px;
}

.tomorrow-hero-desc {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 5px;
}

.tomorrow-hero-feel {
  font-size: 14px;
  color: var(--muted);
  margin-top: 5px;
}

.tomorrow-hero-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.tomorrow-hero-right-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tomorrow-hero-right-item strong {
  color: var(--text-main);
  font-weight: 500;
}

.tomorrow-hero-bottom {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  text-align: center;
}

.tomorrow-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.tomorrow-hero-stat-icon {
  font-size: 20px;
  color: var(--muted);
}

.tomorrow-hero-stat-label {
  font-size: 13px;
  color: var(--muted);
}

.tomorrow-hero-stat-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* FORECAST BLOCK (3 DAYS / 5 DAYS) */
.forecast-block {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.forecast-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.forecast-block:first-child {
  padding-top: 0;
}

.forecast-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.forecast-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.forecast-hero {
  display: flex;
  align-items: center;
  gap: 12px;
}

.forecast-icon {
  font-size: 48px;
  line-height: 1;
}

.forecast-temp {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  display: flex;
  align-items: flex-start;
}

.forecast-temp sup {
  font-size: 20px;
  font-weight: 500;
  margin-top: 6px;
}

.forecast-desc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.forecast-desc .desc-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.forecast-desc .feel-text {
  font-size: 13px;
  color: var(--muted);
}

.forecast-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.forecast-meta>div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.forecast-meta strong {
  color: var(--text);
  font-weight: 600;
}

.forecast-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  text-align: center;
  margin-bottom: 20px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.f-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.f-stat-icon {
  font-size: 18px;
  color: var(--muted);
}

.f-stat-label {
  font-size: 12px;
  color: var(--muted);
}

.f-stat-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.forecast-actions {
  display: flex;
  justify-content: flex-start;
}

.btn-xem-chi-tiet {
  background: var(--sky);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-xem-chi-tiet:hover {
  background: var(--sky-dark);
}

.btn-xem-chi-tiet.active {
  background: var(--sky-dark);
}

.forecast-block-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(.4, 0, .2, 1);
}

.forecast-block-body-inner {
  padding: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.daily-list-header {
  display: grid;
  grid-template-columns: 110px 120px 1fr 100px 80px;
  gap: 15px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 0 18px;
  /* match day-row-header */
}

.daily-list-header .col-date {}

.daily-list-header .col-icons {
  display: flex;
  justify-content: space-between;
  text-align: center;
  width: 100%;
}

.daily-list-header .col-icons span {
  flex: 1;
}

.day-row-daily .day-row-header {
  display: grid;
  grid-template-columns: 110px 120px 1fr 100px 80px;
  gap: 15px;
  align-items: center;
  cursor: pointer;
}

.day-row-daily .day-row-name {
  font-weight: 600;
  font-size: 14px;
}

.day-row-daily .day-row-name .date {
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
}

.day-row-daily .day-row-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.day-row-daily .day-row-icons img,
.day-row-daily .day-row-icons span {
  width: 50px;
  height: 50px;
  font-size: 32px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.day-row-daily .day-row-desc {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-row-daily .day-row-wind {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.day-row-daily .day-row-temps {
  font-weight: 600;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

span.hi {
  font-weight: 500;
  font-size: 15px;
  color: #000000;
}

.daily-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  text-align: center;
  padding: 15px 0;
}

.daily-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.daily-stat-icon {
  font-size: 18px;
  color: var(--muted);
}

.daily-stat-label {
  font-weight: 600;
  font-size: 14px;
}

.daily-stat-val {
  font-size: 13px;
  color: var(--muted);
}

.forecast-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.forecast-nav-pills .pill {
  padding: 6px 16px;
  border-radius: 0px;
  background: var(--sky);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
  border: 1.5px solid rgb(59 130 246 / 40%);
}

.forecast-nav-pills .pill.active {
  background: var(--sky);
}

.forecast-nav-pills .pill:not(.active) {
  background: var(--sky-light);
  color: var(--text);
}

.forecast-nav-pills .pill:hover:not(.active) {
  background: var(--sky);
  color: #fff;
}

@media (max-width: 768px) {
  .day-row-daily .day-row-header {
    grid-template-columns: 1fr 70px 80px;
  }

  .day-row-daily .day-row-wind {
    display: none;
  }

  .day-row-daily .day-row-desc {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
    padding-top: 8px;
    font-size: 13px;
    color: var(--muted);
  }

  .day-row-daily.open .day-row-desc {
    display: block;
  }

  .day-row-daily .day-row-icons {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: center;
  }

  .day-row-daily .day-row-temps {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }

  .daily-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .daily-list-header {
    display: none;
  }
}

/* Global Icon Sizing */
.weather-icon-big img,
.tomorrow-hero-icon img {
  width: 100px !important;
  height: 100px !important;
  object-fit: contain;
}

.day-row-icons img,
.hourly-icon img,
.day-row-icon img,
.day-icon img,
.card-icon img {
  width: 50px !important;
  height: 50px !important;
  object-fit: contain;
}

.logo-icon img {
  width: 24px !important;
  height: 24px !important;
}

/* Responsive Icon Sizing */
@media (max-width: 768px) {
  .day-row-daily .day-row-header {
    grid-template-columns: 1fr 90px 70px !important;
  }

  .day-row-icons img,
  .hourly-icon img,
  .day-row-icon img {
    width: 35px !important;
    height: 35px !important;
  }

  .weather-icon-big img,
  .tomorrow-hero-icon img {
    width: 80px !important;
    height: 80px !important;
  }
}

/* Mobile Search & Actions */
.mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-search-toggle {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.2s;
}

.mobile-search-toggle:active {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-search-drop {
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  background: var(--cloud);
  padding: 16px;
  z-index: 999;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-bottom: 1.5px solid var(--border);
}

.mobile-search-drop.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.search-drop-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.search-drop-inner input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  box-shadow: var(--shadow2);
}

.search-drop-btn {
  background: var(--sky);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-drop-btn:active {
  background: var(--sky-dark);
}

@media (max-width: 768px) {
  .mobile-actions {
    display: flex;
    margin-left: auto;
  }
}

/* Custom Logo */
.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  max-width: 165px !important;
  height: auto;
  max-height: 50px;
  display: block;
}


/* --- NEWS ARCHIVE --- */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: flex;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  align-items: stretch;
}

.news-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.news-thumb {
  flex-shrink: 0;
  width: 250px;
  border-radius: 12px;
  overflow: hidden;
  display: block;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 16/9;
}

.news-thumb.no-thumb {
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
}

.news-thumb.no-thumb svg {
  width: 48px;
  height: 48px;
}

.news-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.news-title {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.news-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.news-title a:hover {
  color: var(--sky-dark);
}

.news-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.news-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.news-pagination .page-numbers:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.news-pagination .page-numbers.current {
  background: #1e88e5;
  color: #fff;
  border-color: #1e88e5;
}

.widget-news-item:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

@media (max-width: 720px) {
  .news-item {
    flex-direction: column;
    gap: 16px;
  }

  .news-thumb {
    width: 100%;
  }
}

/* --- SINGLE POST & PAGE --- */
.single-post-card {
  padding: 24px;
}

.single-hero-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
}

.single-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-post-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.single-post-meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.single-post-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0 0 24px 0;
}

.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
}

.post-content p {
  margin-bottom: 12px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--text);
  margin: 10px 0 3px 0;
  font-weight: 600;
}

.post-content h2 {
  font-size: 24px;
}

.post-content h3 {
  font-size: 20px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin: 10px 0;
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px 20px;
  padding: 0;
}

.post-content li {
  margin-bottom: 0;
}

/* Liên kết trong bài viết có gạch chân để phân biệt không chỉ bằng màu (yêu cầu hỗ trợ tiếp cận). */
.post-content a {
  color: var(--brand-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-content a:hover {
  text-decoration-thickness: 2px;
}

.post-content .wp-block-table {
  overflow-x: auto;
  margin: 24px 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.post-content .wp-block-table table {
  margin: 0;
}

.post-content table th,
.post-content table td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.post-content table th,
.post-content table thead th,
.post-content table thead td {
  background-color: #f1f5f9a8;
  /* Slightly darker than surface2 for better contrast */
  font-weight: 600;
  color: var(--text);
}

tbody {
  background-color: #d3d3d340;
}

/* --- RELATED NEWS --- */
.related-news-section {
  margin-top: 32px;
  padding: 24px;
}

.related-news-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.related-news-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-news-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

.related-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.related-news-item:hover .related-news-thumb img {
  transform: scale(1.05);
}

.related-news-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.related-news-title a {
  color: var(--text);
  text-decoration: none;
}

.related-news-title a:hover {
  color: var(--sky);
}

@media (max-width: 1024px) {
  .related-news-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .related-news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .related-news-item {
    flex-direction: row;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }

  .related-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .related-news-thumb {
    width: 100px;
    flex-shrink: 0;
    aspect-ratio: 16/9;
  }

  .footer-brand {
    flex: 0 !important;
  }
}



/* --- TABLE OF CONTENTS --- */
html {
  scroll-behavior: smooth;
}

.single-hero-thumb img,
.post-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 5px;
  margin-left: auto;
  margin-right: auto;
}

/* Fix WordPress inline width on containers (like captions) */
.single-hero-thumb,
.post-content .wp-caption,
.post-content .wp-block-image,
.post-content figure,
.post-content div[style] {
  max-width: 100% !important;
  height: auto !important;
}

/* Ensure global containers don't overflow */
.detail-card,
.main-col,
.sidebar-col,
.detail-body {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.post-content .aligncenter,
.post-content .alignnone,
.post-content .alignleft,
.post-content .alignright {
  max-width: 100% !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
  float: none !important;
}

.post-content figure img {
  width: 100% !important;
  height: auto !important;
}

/* Fix for Gutenberg blocks */
.wp-block-image {
  margin-bottom: 1.5em;
  max-width: 100% !important;
}

.wp-block-image img {
  max-width: 100%;
  height: auto;
}

.toc-container {
  border: 2.5px solid rgba(14, 165, 233, 0.15);
  background: #ffffff;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.toc-title-row {
  text-align: left;
  margin-bottom: 0;
  transition: margin-bottom 0.3s ease;
  white-space: nowrap;
}

.toc-container.is-open .toc-title-row {
  margin-bottom: 12px;
}

.toc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
}

.toc-toggle {
  font-size: 14px;
  color: var(--sky);
  cursor: pointer;
  font-weight: normal;
  margin-left: 8px;
  user-select: none;
  transition: color 0.2s;
}

.toc-toggle:hover {
  text-decoration: underline;
}

.toc-content-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  max-width: 0;
  opacity: 0;
  transition: grid-template-rows 0.3s ease, opacity 0.3s ease;
}

.toc-container.is-open .toc-content-wrapper {
  grid-template-rows: 1fr;
  max-width: none;
  opacity: 1;
}

.toc-content {
  overflow: hidden;
}

.toc-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.toc-list li {
  margin-bottom: 8px !important;
  line-height: 1.5;
}

.toc-list li:last-child {
  margin-bottom: 0 !important;
}

.toc-list a {
  color: var(--brand-strong);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: #24573a;
  text-decoration: underline;
}

/* --- FOOTER --- */


.footer-inner {
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.footer-brand {
  flex: 0 0 350px;
  display: flex;
  flex-direction: column;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 16px 0 24px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
  text-decoration: none;
}

.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #fff;
}

.social-btn svg {
  width: 18px;
  height: 18px;
}

.social-facebook {
  background: #1877F2;
}

.social-youtube {
  background: #FF0000;
}

.social-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-tiktok {
  background: #000000;
}

.footer-widgets-area {
  display: grid;
  gap: 40px;
  flex: 1;
  min-width: 0;
}

.footer-widgets-area[data-columns="1"] {
  grid-template-columns: 1fr;
  max-width: 250px;
  margin-left: auto;
}

.footer-widgets-area[data-columns="2"] {
  grid-template-columns: repeat(2, 1fr);
  max-width: 500px;
  margin-left: auto;
}

.footer-widgets-area[data-columns="3"] {
  grid-template-columns: repeat(3, 1fr);
}

.footer-widget-title {
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.footer-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-widget ul li {
  margin-bottom: 12px;
}

.footer-widget ul li a {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.15s;
}

.footer-widget ul li a:hover {
  color: var(--green);
  opacity: 1;
}

.footer-bottom {
  padding-top: 15px;
  border-top: 1.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.footer-bottom a {
  color: var(--sky);
  text-decoration: none;
  font-weight: 500;
}

@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-widgets-area {
    gap: 30px;
  }
}

@media (max-width: 768px) {

  .footer-widgets-area[data-columns="3"],
  .footer-widgets-area[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  footer {
    padding-top: 20px;
  }

  .footer-widgets-area[data-columns="3"],
  .footer-widgets-area[data-columns="2"] {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}

/* --- WIDGET BUILDER PAGE --- */
.widget-builder-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

.widget-builder-header {
  margin-bottom: 40px;
}

.widget-builder-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

.widget-builder-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 700px;
}

.widget-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 24px;
  margin-bottom: 20px;
}

/* Form */
.widget-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wf-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wf-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.wf-label-sm {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

.wf-input,
.wf-select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.wf-input:focus,
.wf-select:focus {
  border-color: var(--sky);
}

.wf-search-wrap {
  position: relative;
}

.wf-search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
}

.wf-search-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}

.wf-search-item:last-child {
  border-bottom: none;
}

.wf-search-item:hover {
  background: rgba(14, 165, 233, 0.08);
  color: var(--sky-dark);
}

.wf-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

/* Toggle Switch */
.wf-toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wf-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.wf-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.wf-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: 0.3s;
}

.wf-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.wf-toggle input:checked+.wf-toggle-slider {
  background: var(--sky);
}

.wf-toggle input:checked+.wf-toggle-slider::before {
  transform: translateX(20px);
}

.wf-toggle-label {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

/* Color Picker */
.wf-color-group {
  display: flex;
  flex-direction: column;
}

.wf-color {
  width: 42px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 2px;
  background: #fff;
}

/* Buttons */
.wf-btn {
  padding: 14px 28px;
  background: var(--sky);
  color: #fff;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wf-btn:hover {
  background: var(--sky-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.wf-btn-copy {
  background: var(--sky);
  margin-top: 12px;
}

.wf-btn-copy:hover {
  background: #3a8a59;
  box-shadow: 0 4px 12px rgba(62, 149, 96, 0.3);
}

/* Preview */
.widget-preview {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wp-width-control {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 6px;
  outline: none;
}

.wf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sky);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.4);
}

.wp-preview-frame {
  min-height: 200px;
  background: #f8fafc;
  border: 2px dashed var(--border);
  border-radius: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
  padding: 20px;
}

.wp-preview-frame iframe {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.wp-placeholder {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}

.wp-placeholder svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.wp-placeholder p {
  font-size: 14px;
  line-height: 1.6;
}

.wf-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--text);
  resize: vertical;
  outline: none;
}

.wf-textarea:focus {
  border-color: var(--sky);
}

/* Responsive */
@media (max-width: 768px) {
  .widget-builder-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .widget-builder-title {
    font-size: 22px;
  }

  .wf-options-grid {
    grid-template-columns: 1fr 1fr;
  }

  .wp-preview-frame iframe {
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  .wf-options-grid {
    grid-template-columns: 1fr;
  }
}

/* --- FINAL MOBILE FIXES --- */
@media (max-width: 768px) {

  .hero-section,
  .home-body,
  .detail-body,
  .home-hero-layout {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .sidebar-col,
  .home-sidebar,
  .hero-aside {
    width: 100% !important;
    max-width: 100% !important;
  }

  .main-col,
  .home-main-col {
    width: 100% !important;
    max-width: 100% !important;
  }

  main {
    padding: 20px 15px !important;
  }

  .single-post-card {
    padding: 15px !important;
  }

  .single-post-title {
    font-size: 22px !important;
  }

  /* Force all images and their containers again */
  img,
  figure,
  .wp-caption,
  .wp-block-image,
  div[style] {
    /* max-width: 100% !important; */
  }

  .post-content table th,
  .post-content table td {
    border: 1px solid var(--border);
    padding: 8px 8px;
    text-align: left;
    vertical-align: top;
  }

  .content-section {
    padding: 25px 20px 20px;
  }
}

.single-post-card {
  background: white;
}

.wp-caption-text {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  margin-top: 5px;
  font-style: italic;
}

/* 30-day calendar forecast */
.monthly-forecast-card {
  overflow: visible;
}

.monthly-forecast-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.monthly-weekday {
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--night3);
  text-align: center;
  padding: 12px 4px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.monthly-day-cell {
  position: relative;
  min-height: 92px;
  padding: 12px 6px 10px;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: transparent;
  color: var(--night3);
  font: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
  overflow: visible;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.monthly-day-cell:not(.monthly-day-empty):hover,
.monthly-day-cell:not(.monthly-day-empty):focus-visible,
.monthly-day-cell.is-active {
  background: rgb(230 242 232 / 55%);
  z-index: 8;
}

.monthly-day-cell:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: -2px;
}

.monthly-day-empty {
  cursor: default;
  pointer-events: none;
}

.monthly-day-date {
  font-size: 14px;
  color: var(--night3);
  line-height: 1;
}

.monthly-day-icon {
  width: 55px;
  height: 55px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.monthly-day-icon img {
  width: 55px;
  height: 55px;
  object-fit: contain;
  display: block;
}

.monthly-day-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  transform: translateX(-50%) translateY(8px);
  width: max-content;
  max-width: 190px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.monthly-day-tooltip::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid rgba(15, 23, 42, 0.16);
  border-bottom: 1px solid rgba(15, 23, 42, 0.16);
  transform: translateX(-50%) rotate(45deg);
}

.monthly-day-tooltip span {
  display: block;
  white-space: nowrap;
}

.monthly-day-tooltip strong {
  color: var(--night3);
}

.monthly-day-cell:hover .monthly-day-tooltip,
.monthly-day-cell:focus-visible .monthly-day-tooltip,
.monthly-day-cell.is-active .monthly-day-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.monthly-day-cell.tooltip-left .monthly-day-tooltip {
  left: 0;
  transform: translateY(8px);
}

.monthly-day-cell.tooltip-left:hover .monthly-day-tooltip,
.monthly-day-cell.tooltip-left:focus-visible .monthly-day-tooltip,
.monthly-day-cell.tooltip-left.is-active .monthly-day-tooltip {
  transform: translateY(0);
}

.monthly-day-cell.tooltip-left .monthly-day-tooltip::before {
  left: 24px;
  transform: rotate(45deg);
}

.monthly-day-cell.tooltip-right .monthly-day-tooltip {
  left: auto;
  right: 0;
  transform: translateY(8px);
}

.monthly-day-cell.tooltip-right:hover .monthly-day-tooltip,
.monthly-day-cell.tooltip-right:focus-visible .monthly-day-tooltip,
.monthly-day-cell.tooltip-right.is-active .monthly-day-tooltip {
  transform: translateY(0);
}

.monthly-day-cell.tooltip-right .monthly-day-tooltip::before {
  left: auto;
  right: 24px;
  transform: rotate(45deg);
}

@media (max-width: 720px) {
  .monthly-forecast-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .monthly-weekday {
    font-size: 13px;
    padding: 10px 2px 9px;
  }

  .monthly-day-cell {
    min-height: 72px;
    padding: 10px 2px 8px;
    gap: 5px;
  }

  .monthly-day-date {
    font-size: 13px;
  }

  .monthly-day-icon {
    width: 32px;
    height: 32px;
  }

  .monthly-day-icon img {
    width: 30px;
    height: 30px;
  }

  .monthly-day-tooltip {
    max-width: 170px;
    padding: 12px 14px;
    font-size: 11.5px;
  }
}

@media (max-width: 420px) {
  .monthly-forecast-card {
    padding-left: 10px;
    padding-right: 10px;
  }

  .monthly-day-cell {
    min-height: 66px;
  }

  .monthly-day-date {
    font-size: 12px;
  }

  .monthly-weekday {
    font-size: 12px;
  }
}

.news-pagination ul {
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.news-pagination li {
  list-style: none;
}

.see-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px auto 0;
  padding: 10px 28px;
  border: 1.5px solid rgb(59 130 246 / 40%);
  border-radius: 99px;
  background: rgb(59 130 246 / 70%);
  color: #fff;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.see-more:hover {
  background: rgb(33 116 251 / 80%);
  border-color: rgb(25 109 247);
  transform: translateY(-1px);
}

a.see-more-text {
  text-decoration: none;
  color: #fff;
}

/* ========== HOURLY OVERVIEW CHART ========== */
.hourly-overview {
  position: relative;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: linear-gradient(180deg, rgb(248 250 252 / 98%), rgb(239 246 255 / 72%));
  overflow: hidden;
}

.hourly-overview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 12px 14px 0;
}

.hourly-overview-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hourly-overview-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: 1px solid rgb(148 163 184 / 30%);
  border-radius: 0px;
  background: rgb(255 255 255 / 86%);
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 10px rgb(15 23 42 / 7%);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.hourly-overview-arrow:hover:not(:disabled) {
  border-color: rgb(14 165 233 / 50%);
  background: rgb(224 242 254 / 92%);
  transform: translateY(-1px);
}

.hourly-overview-arrow:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.hourly-overview-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.hourly-overview-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hourly-toggle-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: inset 0 1px 3px rgb(15 23 42 / 18%);
  transition: background 0.2s ease;
}

.hourly-toggle-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgb(15 23 42 / 25%);
  transition: transform 0.2s ease;
}

.hourly-overview-toggle input:checked+.hourly-toggle-track {
  background: var(--sky);
}

.hourly-overview-toggle input:checked+.hourly-toggle-track::after {
  transform: translateX(20px);
}

.hourly-overview-scroll {
  overflow-x: hidden;
  overflow-y: hidden;
  padding: 10px 12px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgb(14 165 233 / 35%) transparent;
}

.hourly-overview-scroll::-webkit-scrollbar {
  height: 7px;
}

.hourly-overview-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgb(14 165 233 / 35%);
}

.hourly-overview-stage {
  position: relative;
  margin: 0 auto;
  cursor: crosshair;
  transform: translateX(0);
  opacity: 1;
  will-change: transform, opacity;
}

.hourly-overview-stage.hourly-slide-from-right {
  animation: hourlySlideFromRight 0.32s ease both;
}

.hourly-overview-stage.hourly-slide-from-left {
  animation: hourlySlideFromLeft 0.32s ease both;
}

@keyframes hourlySlideFromRight {
  from {
    transform: translateX(34px);
    opacity: 0.35;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes hourlySlideFromLeft {
  from {
    transform: translateX(-34px);
    opacity: 0.35;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.hourly-overview-svg {
  display: block;
  max-width: none;
}

.hov-frame {
  fill: rgb(255 255 255 / 76%);
  stroke: rgb(148 163 184 / 22%);
}

.hov-plot-bg {
  fill: rgb(239 246 255 / 50%);
}

.hov-grid-line,
.hov-grid-v {
  stroke: rgb(148 163 184 / 18%);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.hov-grid-v {
  stroke: rgb(148 163 184 / 14%);
}

.hov-axis {
  stroke: rgb(148 163 184 / 42%);
  stroke-width: 1;
}

.hov-y-label {
  fill: #64748b;
  font: 600 11px "Be Vietnam Pro", sans-serif;
  text-anchor: end;
}

.hov-time {
  fill: #64748b;
  font: 500 12px "Be Vietnam Pro", sans-serif;
  text-anchor: middle;
}

.hov-head-temp {
  fill: #334155;
  font: 600 12px "Be Vietnam Pro", sans-serif;
  text-anchor: middle;
}

.hov-temp-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hov-feels-path {
  fill: none;
  stroke: #8b949e;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.hov-rain-text {
  fill: #0f172a;
  font: 700 11px "Be Vietnam Pro", sans-serif;
  text-anchor: middle;
}

.hov-rain-zero {
  fill: #64748b;
}

.hov-active-col {
  fill: rgb(14 165 233 / 12%);
}

.hov-active-line {
  stroke: #0f172a;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.hov-active-dot {
  fill: #0f172a;
  stroke: #fff;
  stroke-width: 2;
}

.hourly-overview-tooltip {
  position: absolute;
  z-index: 5;
  width: 104px;
  padding: 10px 10px 9px;
  border: 1px solid rgb(148 163 184 / 35%);
  border-radius: 12px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 10px 26px rgb(15 23 42 / 16%);
  text-align: center;
  pointer-events: none;
  color: #0f172a;
  transition: left 0.16s ease, top 0.16s ease, opacity 0.16s ease;
  will-change: left, top;
}

.hourly-overview-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgb(148 163 184 / 35%);
  border-bottom: 1px solid rgb(148 163 184 / 35%);
  background: rgb(255 255 255 / 96%);
  transform: translateX(-50%) rotate(45deg);
}

.hov-tip-time {
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
}

.hourly-overview-tooltip img {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 3px;
}

.hov-tip-temp {
  font-family: "Lexend", sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.hov-tip-line,
.hov-tip-rain,
.hov-tip-desc {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
}

.hov-tip-rain {
  color: #0f172a;
  font-weight: 700;
}

.hourly-overview-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 0 16px 14px;
  color: #64748b;
  font-size: 13px;
}

.hourly-overview-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hourly-overview-legend i {
  display: inline-block;
  width: 16px;
  height: 4px;
  border-radius: 999px;
}

.legend-temp {
  background: linear-gradient(90deg, #38bdf8, #fbbf24, #ef4444);
}

.legend-feels {
  background: #8b949e;
}

.legend-rain {
  background: #7dd3fc;
}

@media (max-width: 720px) {
  .hourly-overview {
    margin-top: 16px;
    border-radius: 12px;
  }

  .hourly-overview-actions {
    gap: 8px;
    padding: 10px 12px 0;
  }

  .hourly-overview-arrow {
    width: 30px;
    height: 26px;
    border-radius: 8px;
    font-size: 18px;
  }

  .hourly-overview-scroll {
    padding: 8px 10px 5px;
  }

  .hourly-overview-toggle {
    font-size: 12px;
  }

  .hourly-overview-legend {
    gap: 12px;
    padding: 0 12px 12px;
    font-size: 12px;
  }

  .hourly-overview-legend span:has(.legend-rain) {
    display: none;
  }

  .hourly-overview-tooltip {
    width: 96px;
  }
}

/* ───────── Page hero (FAQ, Liên hệ…) ───────── */
.page-hero {
  background: linear-gradient(135deg, var(--brand-soft) 0%, #ddeee0 100%);
  border-bottom: 1px solid rgba(62, 149, 96, 0.25);
  border-radius: 5px 5px 0 0;
  padding: 30px 20px;
  margin: -24px -24px 32px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 12px;
}

.page-hero p {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  color: #334155;
}

.btn-brand {
  display: inline-block;
  background: var(--brand-strong);
  color: #fff !important;
  padding: 10px 24px;
  border: 0;
  border-radius: 5px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}

.btn-brand:hover {
  background: #24573a;
}

@media (max-width: 768px) {
  .page-hero {
    margin: -20px -20px 24px;
    padding: 24px 16px;
  }
}

/* ===== Menu "Công cụ" ===== */
.dropdown-menu.tools-menu {
  min-width: 230px;
  grid-template-columns: 1fr;
  padding: 10px;
}

.tools-menu .region-group a {
  font-size: 14px;
  padding: 8px 12px;
}

.tools-menu .region-group a.is-current {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

/* ===== Footer: cột Công cụ ===== */
.footer-tools {
  flex: 0 1 220px;
  min-width: 0;
  margin-left: auto;
}

.footer-tools+.footer-widgets-area {
  margin-left: 0;
}

.footer-top>.footer-tools:last-child {
  margin-right: auto;
}

/* ===== Footer: nút tải ứng dụng ===== */
.footer-apps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0 0 10px;
  padding: 11px 0 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-apps-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-apps-text strong {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.footer-apps-text span {
  color: var(--muted);
  font-size: 13px;
}

.footer-apps-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-badge {
  position: relative;
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
  transition: transform .2s, box-shadow .2s;
}

.app-badge img {
  height: 44px;
  width: auto;
  display: block;
}

a.app-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

.app-badge.is-soon {
  cursor: default;
}

.app-badge.is-soon img {
  opacity: .35;
  filter: grayscale(1);
}

.app-badge .app-soon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(1px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
}

@media (max-width: 720px) {
  .footer-tools {
    flex: none;
    width: 100%;
    margin: 0;
  }

  .footer-tools ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
  }

  .footer-apps {
    flex-direction: column;
    align-items: flex-start;
    margin: 0 0 20px;
    padding: 20px 0 0;
  }

  .app-badge img {
    height: 40px;
  }
}

body::before {
  content: none;
  display: none;
}

main::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100vw;
  height: 420px;
  transform: translateX(-50%);
  /* Ảnh banner (99 KB, ở cuối trang) chỉ nạp sau khi trang tải xong: class .tt-late do inc/speed.php thêm. */
  background: center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  z-index: -1;
  pointer-events: none;
}

.tt-late main::after {
  background-image: url(./banner.svg);
}

/* Hero trang chủ + trang tỉnh/xã: nền trắng, phong cảnh rõ dần sang phải */
.home-hero-main,
.detail-hero {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.home-hero-main::before,
.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1100 520' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='sky' x1='550' y1='0' x2='550' y2='340' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23E8F6E9' stop-opacity='.12'/%3E%3Cstop offset='1' stop-color='%23D4ECD7' stop-opacity='.36'/%3E%3C/linearGradient%3E%3ClinearGradient id='hillBack' x1='520' y1='236' x2='520' y2='482' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23A9D6AC'/%3E%3Cstop offset='1' stop-color='%2377B982'/%3E%3C/linearGradient%3E%3ClinearGradient id='hillFront' x1='580' y1='324' x2='580' y2='520' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%236DB47B'/%3E%3Cstop offset='1' stop-color='%233E9560'/%3E%3C/linearGradient%3E%3ClinearGradient id='house' x1='824' y1='285' x2='824' y2='431' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23FFFDF5'/%3E%3Cstop offset='1' stop-color='%23EAF4E8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 0H1100V520H0V0Z' fill='url(%23sky)'/%3E%3Ccircle cx='843' cy='114' r='47' fill='%23F8D979' fill-opacity='.72'/%3E%3Cpath d='M470 150C486 129 517 128 536 145C546 115 581 102 609 116C634 87 685 95 699 130C728 130 749 149 749 172H472C458 172 455 159 470 150Z' fill='white' fill-opacity='.7'/%3E%3Cpath d='M812 185C824 169 849 169 862 183C872 162 900 155 919 166C939 144 978 151 989 178C1012 177 1027 192 1027 209H814C802 209 801 194 812 185Z' fill='white' fill-opacity='.58'/%3E%3Cpath d='M0 346L151 223L255 306L374 182L516 334L642 234L767 347L889 250L1100 382V520H0V346Z' fill='%23B8D9BC' fill-opacity='.7'/%3E%3Cpath d='M0 387L173 276L294 364L431 229L568 370L714 263L866 398L1010 304L1100 354V520H0V387Z' fill='%2391C69A' fill-opacity='.86'/%3E%3Cpath d='M0 403C127 351 205 371 316 396C435 423 526 384 647 377C792 368 881 417 1100 371V520H0V403Z' fill='url(%23hillBack)'/%3E%3Cpath d='M0 452C143 402 242 424 357 449C495 478 610 428 728 424C860 420 960 466 1100 427V520H0V452Z' fill='url(%23hillFront)'/%3E%3Cpath d='M711 316L816 240L925 316V435H711V316Z' fill='url(%23house)'/%3E%3Cpath d='M687 319L816 223L949 319L936 333L816 249L700 334L687 319Z' fill='%239A6045'/%3E%3Cpath d='M789 435V354C789 336 801 324 817 324C834 324 846 337 846 354V435H789Z' fill='%237BAE83'/%3E%3Crect x='736' y='344' width='35' height='33' rx='4' fill='%23A9D8D9' stroke='%23D3E8D6' stroke-width='5'/%3E%3Crect x='866' y='344' width='35' height='33' rx='4' fill='%23A9D8D9' stroke='%23D3E8D6' stroke-width='5'/%3E%3Cpath d='M754 344V377M736 360H771M883 344V377M866 360H901' stroke='%23F7FBF4' stroke-width='3'/%3E%3Cpath d='M948 430V355M970 430V372' stroke='%236C8D58' stroke-width='7' stroke-linecap='round'/%3E%3Ccircle cx='948' cy='345' r='24' fill='%234F9A66'/%3E%3Ccircle cx='934' cy='357' r='18' fill='%235CA870'/%3E%3Ccircle cx='962' cy='360' r='19' fill='%2375B87B'/%3E%3Cpath d='M683 449V388M660 449V405' stroke='%235E8D50' stroke-width='6' stroke-linecap='round'/%3E%3Ccircle cx='683' cy='380' r='22' fill='%234F9A66'/%3E%3Ccircle cx='665' cy='393' r='16' fill='%2371B87A'/%3E%3Ccircle cx='698' cy='397' r='17' fill='%235CA66D'/%3E%3Cpath d='M100 470L118 440L136 470M150 477L169 446L188 477M420 475L438 444L456 475' stroke='%23D9F0D7' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' opacity='.8'/%3E%3Cpath d='M0 489C140 464 235 480 352 497C465 514 584 480 694 479C831 478 962 504 1100 478V520H0V489Z' fill='%23398B59' fill-opacity='.55'/%3E%3C/svg%3E") right bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .12) 30%, rgba(0, 0, 0, .65) 65%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .12) 30%, rgba(0, 0, 0, .65) 65%, #000 100%);
  z-index: 0;
  pointer-events: none;
}

.home-hero-main::after,
.detail-hero::after {
  content: none;
  display: none;
}

/* Ô chỉ số trên nền phong cảnh: trắng mờ để chữ luôn rõ */
.home-hero-main .meta-item,
.detail-hero .meta-item {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

@media (max-width: 768px) {
  main {
    padding-bottom: 130px;
  }

  main::after {
    height: 240px;
  }

  .home-hero-main::before,
  .detail-hero::before {
    background-size: auto 70%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .25) 40%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .25) 40%, #000 100%);
  }
}

/* ===== Bảng trong nội dung bài trên mobile ===== */
@media (max-width: 720px) {
  .content-section { padding: 20px 14px 16px; }

  /* Bảng thường: gọn hơn, cuộn ngang khi quá rộng, cột không bị bóp quá hẹp */
  .post-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13.5px;
    line-height: 1.45;
    margin: 16px 0;
  }
  .post-content table th,
  .post-content table td { padding: 7px 9px; min-width: 88px; }

  /* Bảng khí hậu: số không xuống dòng, cột "Tháng" cố định khi vuốt ngang */
  .post-content table.bang-khi-hau { font-size: 13px; }
  .post-content table.bang-khi-hau th,
  .post-content table.bang-khi-hau td { min-width: 0; white-space: nowrap; padding: 7px 10px; }
  .post-content table.bang-khi-hau thead th { white-space: normal; min-width: 76px; vertical-align: bottom; }
  .post-content table.bang-khi-hau th:first-child,
  .post-content table.bang-khi-hau td:first-child {
    position: sticky; left: 0; z-index: 1;
    background: #fff; min-width: 0;
    box-shadow: 6px 0 8px -6px rgba(15, 23, 42, .18);
  }
  .post-content table.bang-khi-hau thead th:first-child { background: #f4f7f4; }
}
@media (max-width: 720px) {
  /* Cột nhãn đầu bảng được xuống dòng, không chiếm hết màn hình */
  .post-content table.bang-khi-hau th:first-child,
  .post-content table.bang-khi-hau td:first-child { white-space: normal; max-width: 120px; }
}
@media (max-width: 720px) {
  .post-content table.bang-khi-hau th:first-child,
  .post-content table.bang-khi-hau td:first-child { min-width: 86px; }
}
