@font-face {
  font-family: "ambile";
  src: url("../assets/fonts/ambile-webfont.woff2") format("woff2"),
    url("../assets/fonts/ambile-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Modern Color Palette - Minimal & Professional */
  --bg: #0a0e14;
  --surface: #151a23;
  --surface-elevated: #1c222e;
  --ink: #e6edf3;
  --ink-secondary: #8b949e;
  --ink-tertiary: #6e7681;

  /* Accent Colors - Solid, not saturated */
  --accent-primary: #4a9eff;
  --accent-secondary: #7b61ff;
  --accent-success: #3fb950;
  --accent-warning: #f0883e;
  --accent-error: #f85149;

  /* Functional Colors */
  --border: #30363d;
  --border-subtle: #21262d;
  --hover-bg: rgba(74, 158, 255, 0.08);
  --active-bg: rgba(74, 158, 255, 0.15);

  /* Patterns & Accents */
  --pattern-1: #2ea043;
  --pattern-2: #bf3989;
  --pattern-3: #d29922;

  /* Shadows - Subtle depth */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);

  /* Spacing System - Reduced for better viewport fit */
  --space-xs: 4px;
  --space-sm: 6px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 28px;
  --space-3xl: 36px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* font sizes configuration */
  --Desktop-font-xs: 1rem; /*(8px)*/
  --Desktop-font-sm: 1.2rem; /*(16px)*/
  --Desktop-font-md: 1.7rem; /*(19.2px)*/
  --Desktop-font-lg: 2.5rem; /*(40px)*/
  --Desktop-font-xl: 3rem; /*(48px)*/

  --Tablet-font-xs: 1rem; /*(12px)*/
  --Tablet-font-sm: 1.2rem; /*(19.2px)*/
  --Tablet-font-md: 1.5rem; /*(24px)*/
  --Tablet-font-lg: 2rem; /*(40px)*/
  --Tablet-font-xl: 2.5rem; /*(48px)*/

  --Mobile-font-xs: 1rem; /*(12px)*/
  --Mobile-font-sm: 1.2rem; /*(19.2px)*/
  --Mobile-font-md: 1.5rem; /*(24px)*/
  --Mobile-font-lg: 1.7rem; /*(40px)*/
  --Mobile-font-xl: 2rem; /*(48px)*/

  /* Responsive font size variables - defaults to desktop */
  --font-xs: var(--Desktop-font-xs);
  --font-sm: var(--Desktop-font-sm);
  --font-md: var(--Desktop-font-md);
  --font-lg: var(--Desktop-font-lg);
  --font-xl: var(--Desktop-font-xl);
  
  /* FAQ Card Heights - responsive */
  --faq-card-min-height: 200px;
}

/* Tablet font sizes */
@media (max-width: 1024px) and (min-width: 768px) {
  :root {
    --font-xs: var(--Tablet-font-xs);
    --font-sm: var(--Tablet-font-sm);
    --font-md: var(--Tablet-font-md);
    --font-lg: var(--Tablet-font-lg);
    --font-xl: var(--Tablet-font-xl);
    --faq-card-min-height: 180px;
  }
}

/* Mobile font sizes */
@media (max-width: 767px) {
  :root {
    --font-xs: var(--Mobile-font-xs);
    --font-sm: var(--Mobile-font-sm);
    --font-md: var(--Mobile-font-md);
    --font-lg: var(--Mobile-font-lg);
    --font-xl: var(--Mobile-font-xl);
    --faq-card-min-height: 160px;
  }
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f6f8fa;
  --surface-elevated: #ffffff;
  --ink: #1f2328;
  --ink-secondary: #57606a;
  --ink-tertiary: #6e7781;

  --accent-primary: #0969da;
  --accent-secondary: #6639ba;
  --accent-success: #1a7f37;
  --accent-warning: #d97917;
  --accent-error: #d1242f;

  --border: #d0d7de;
  --border-subtle: #eaeef2;
  --hover-bg: rgba(9, 105, 218, 0.08);
  --active-bg: rgba(9, 105, 218, 0.15);

  --pattern-1: #1f883d;
  --pattern-2: #a0267c;
  --pattern-3: #bf8700;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ====================== */
/* GLOBAL STYLES */
/* ====================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
button {
  font-family: "ambile", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: var(--font-xs);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Selection color */
::selection {
  background: var(--accent-primary);
  color: #ffffff;
}

::-moz-selection {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-md);
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Three.js Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
}

/* Decorative gradient overlays */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    var(--accent-primary) 0%,
    transparent 70%
  );
  opacity: 0.03;
  z-index: -1;
  animation: floatGradient 20s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  bottom: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    var(--accent-secondary) 0%,
    transparent 70%
  );
  opacity: 0.03;
  z-index: -1;
  animation: floatGradient 25s ease-in-out infinite reverse;
}

@keyframes floatGradient {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(10%, -10%) scale(1.1);
  }
  66% {
    transform: translate(-10%, 10%) scale(0.9);
  }
}

/* Subtle geometric pattern overlay (optional) */
.wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: 100%;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 100px,
    var(--border-subtle) 100px,
    var(--border-subtle) 101px
  );
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

.wrap > * {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-secondary);
}

/* ====================== */
/* LAYOUT & CONTAINERS */
/* ====================== */

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md);
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .wrap {
    padding: var(--space-sm);
  }
}

.text-center {
  text-align: center;
}

/* ====================== */
/* TOPBAR */
/* ====================== */

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  animation: slideDown 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-5px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.page-title {
  font-size: var(--font-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-xs);
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(30deg);
  }
}

.subtle {
  color: var(--ink-secondary);
  font-size: var(--font-sm);
  line-height: 1.5;
  max-width: 600px;
}

.row {
  display: flex;
  gap: 0.75rem; /* 12px spacing between cards in same section */
  flex-wrap: wrap;
  align-items: center;
}

/* ====================== */
/* BUTTONS */
/* ====================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: var(--font-xs);
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hover-bg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn > * {
  position: relative;
  z-index: 1;
}

.align-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.icon-sm {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.btn:hover .icon-sm {
  transform: scale(1.1);
}

/* ====================== */
/* BANNER */
/* ====================== */

.banner {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  animation: fadeInScale 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
  box-shadow: var(--shadow-md);
  position: relative;
}

/* Force left-to-right for time values so numeric times and AM/PM render LTR while keeping overall RTL layout */
#nowTime,
#pahar-clock,
#pahar-time-range,
#now,
#sunrise,
#sunset,
#solarNoon,
#moonriseTxt,
#moonsetTxt,
#widgetNow,
#widgetSunrise,
#widgetSolarNoon,
#widgetSunset,
#widgetMoonriseTxt,
#widgetMoonsetTxt,
#wxTemp {
  direction: ltr !important;
  unicode-bidi: isolate-override !important;
  text-align: left; /* keep numbers left-aligned */
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.95) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(74, 158, 255, 0.1),
    rgba(123, 97, 255, 0.1)
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.banner:hover::before {
  opacity: 1;
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.banner:hover img {
  transform: scale(1.02);
}

/* ====================== */
/* CARDS */
/* ====================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: 4rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Lighter box styles (no heavy backgrounds/borders) */
.widget-half,
.widget-third,
.half,
.third,
.conv-box,
.faq-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  background: var(--surface-elevated);
  transition: all 0.2s ease;
}

.third {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.widget-half:hover,
.widget-third:hover,
.half:hover,
.third:hover,
.conv-box:hover,
.faq-box:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.conv-box .h,
.faq-box .h {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  font-size: 16px;
  font-weight: 600;
}

/* Unique accent for each section */
#today-card::before {
  background: linear-gradient(90deg, var(--accent-primary), var(--pattern-1));
}

#weather-card::before {
  background: linear-gradient(90deg, var(--pattern-1), var(--accent-secondary));
}

#season-card::before {
  background: linear-gradient(90deg, var(--accent-secondary), var(--pattern-2));
}

#widget-card::before {
  background: linear-gradient(90deg, var(--pattern-2), var(--pattern-3));
}

#solar-card::before {
  background: linear-gradient(90deg, var(--pattern-3), var(--accent-primary));
}

#year-card::before {
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
}

#compare-card::before {
  background: linear-gradient(90deg, var(--pattern-1), var(--pattern-2));
}

#faq-card::before {
  background: linear-gradient(90deg, var(--pattern-2), var(--accent-primary));
}

.card.full {
  grid-column: 1/-1;
}

/* Staggered Animation for Cards */
.card {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card:nth-child(1) {
  animation-delay: 0.2s;
}
.card:nth-child(2) {
  animation-delay: 0.4s;
}
.card:nth-child(3) {
  animation-delay: 0.6s;
}
.card:nth-child(4) {
  animation-delay: 0.8s;
}
.card:nth-child(5) {
  animation-delay: 1s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: var(--font-md);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-title h3 {
  font-size: var(--font-md);
}


.aeo-section article p{
  margin-top: 0;
  font-size: calc(var(--font-md)*0.8);
}

.aeo-section article h3{
  margin-bottom: var(--space-sm);
  font-size: calc(var(--font-md)*0.90);
}

/* ====================== */
/* TODAY GRID */
/* ====================== */

.today-grid {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.today-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  background: var(--surface-elevated);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.today-box::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.today-box:hover::before {
  transform: scaleX(1);
}

.today-box:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.today-box:nth-child(1)::before {
  background: var(--accent-primary);
}
.today-box:nth-child(2)::before {
  background: var(--pattern-1);
}
.today-box:nth-child(3)::before {
  background: var(--accent-secondary);
}
.today-box:nth-child(4)::before {
  background: var(--pattern-2);
}
.today-box:nth-child(5)::before {
  background: var(--pattern-3);
}

.today-h {
  font-size: var(--font-xs);
  color: var(--ink-secondary);
  margin-bottom: var(--space-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.today-v {
  font-size: var(--font-sm);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.share-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.spacer {
  height: var(--space-lg);
}

/* ====================== */
/* TABS */
/* ====================== */

.tabs {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.tab {
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: var(--font-sm);
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tab:hover {
  border-color: var(--accent-primary);
  background: var(--hover-bg);
}

.tab.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ====================== */
/* GLOBAL DISTRICT SELECTOR */
/* ====================== */

.global-district-selector {
  background: var(--surface-elevated);
  /* border: 2px solid var(--accent-primary); */
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  /* box-shadow: var(--shadow-md); */
}

.district-selector-header {
  margin-bottom: var(--space-md);
}

.district-selector-header h3 {
  color: var(--accent-primary);
  font-size: var(--font-md);
  font-weight: 700;
  margin: 0 0 var(--space-xs) 0;
  gap: var(--space-sm);
}

/* .district-selector-header h3::before {
  content: '';
  font-size: 20px;
} */

.district-selector-header .muted {
  font-size: var(--font-sm);
  line-height: 1.5;
}

#global-district-tabs {
  margin-bottom: 0;
}

#global-district-tabs .tab {
  font-size: var(--font-xs);
  padding: var(--space-xs) var(--space-md);
}

#global-district-tabs .tab:first-child {
  background: var(--surface);
  border: 2px solid var(--accent-success);
  font-weight: 600;
}

#global-district-tabs .tab:first-child:hover {
  border-color: var(--accent-success);
  background: rgba(63, 185, 80, 0.1);
}

#global-district-tabs .tab:first-child.active {
  background: var(--accent-success);
  color: #ffffff;
  border-color: var(--accent-success);
}

/* ====================== */
/* WEATHER SECTION */
/* ====================== */

.weather-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.weather-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  background: var(--surface-elevated);
  position: relative;
  overflow: hidden;
}

.weather-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    var(--accent-primary) 0%,
    transparent 70%
  );
  opacity: 0.03;
  animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.03;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.06;
  }
}

.wx-main {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: var(--space-lg);
  position: relative;
  z-index: 1;
}

.wx-temp {
  font-size: var(--font-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Removed: now using more specific selector in climate grid section */

.wx-meta {
  font-size: var(--font-sm);
  color: var(--ink-secondary);
  line-height: 1.5;
}

.wx-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wx-note {
  margin-top: var(--space-sm);
}

.wx-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-sm);
  font-size: var(--font-sm);
}

.wx-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  background: var(--surface);
  transition: all 0.2s ease;
}

.wx-chip:hover {
  border-color: var(--accent-primary);
  background: var(--hover-bg);
}

.wx-chip div:first-child {
  color: var(--ink-tertiary);
  font-size: var(--font-xs);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wx-chip div:last-child {
  color: var(--ink);
  font-weight: 700;
}

/* ====================== */
/* CLIMATE (Weather + Season) LAYOUT */
/* ====================== */

.climate-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 2fr 1fr; /* Left: Weather+Season (2) | Right: Pahar (1) */
  align-items: start;
  margin-bottom: 4rem;
}

.climate-col {
  min-width: 0;
}

/* Left column stacks weather and season */
.climate-col-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Right column: Pahar at full height */
.climate-col-pahar {
  display: flex;
  flex-direction: column;
  height: 91%;
}

.pahar-time{
  font-size: var(--font-xs);
  direction: ltr !important;
  unicode-bidi: isolate-override !important;
}

.climate-col-pahar {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  background: var(--surface-elevated);
  /* margin-top: 3.75rem; */
}

/* Season section under weather */
.season-section {
  height: auto;
}

/* Make weather temperature larger without affecting season title */
.climate-col-left .wx-temp#wxTemp {
  font-size: calc(var(--font-xl) * 2);
  line-height: 1.05;
}

@media (max-width: 900px) {
  .climate-grid {
    grid-template-columns: 1fr; /* stack on small screens */
  }
}

/* Ensure pahar card fits nicely in right column */
#climate-card .pahar-card {
  margin-top: var(--space-lg);
}

/* Align icon size consistency */
#climate-card .icon {
  width: 64px;
  height: 64px;
}

/* Weather Icons */
.icon {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.sun circle {
  transform-origin: center;
  animation: spin 12s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.cloud {
  animation: drift 4s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translateX(-2px);
  }
  to {
    transform: translateX(2px);
  }
}

.rain line {
  animation: drop 900ms linear infinite;
}

@keyframes drop {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(10px);
    opacity: 0;
  }
}
@keyframes drop {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* ====================== */
/* CALENDAR */
/* ====================== */

.calendar {
  display: grid;
  gap: var(--space-md);
}

.week-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-sm);
}

.week-head div {
  background: var(--surface-elevated);
  color: var(--ink-secondary);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-sm);
}

.day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.day::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.day:hover::before {
  opacity: 0.05;
}

.day:hover {
  border-color: var(--accent-primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

.day .n {
  font-size: var(--font-lg);
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.day.today {
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 0 3px var(--active-bg), var(--shadow-md);
  background: var(--active-bg);
}

.day.today .n {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 640px) {
  .month-grid .day {
    min-height: 72px;
  }
  .day .n {
    font-size: var(--font-md);
  }
  .week-head div {
    font-size: var(--font-md);
    padding: var(--space-sm) var(--space-xs);
  }
  .calendar {
    gap: var(--space-sm);
  }
}

.month-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block: var(--space-md);
}

.month-title h3 {
  margin: 0;
  font-size: var(--font-md);
  font-weight: 700;
}

.year-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ====================== */
/* MONTH NAVIGATOR */
/* ====================== */

.month-navigator {
  margin-top: var(--space-lg);
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  gap: var(--space-lg);
}

.nav-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover:not(:disabled)::before {
  opacity: 0.1;
  transform: scale(1);
}

.nav-btn:hover:not(:disabled) {
  border-color: var(--accent-primary);
  transform: scale(1.1);
  box-shadow: var(--shadow-sm);
}

.nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.nav-btn:disabled {
  opacity: 0;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-btn svg {
  position: relative;
  z-index: 1;
}

.nav-month-info {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.nav-month-info h3 {
  margin: 0;
  font-size: var(--font-lg);
  font-weight: 700;
  transition: all 0.3s ease;
}

.nav-month-info .muted {
  font-size: var(--font-md);
  margin-top: var(--space-xs);
  opacity: 0.8;
}

.month-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-lg);
}

.month-slider {
  display: flex;
  transition: none;
  will-change: transform;
  position: relative;
}

.month-slider.slide-left {
  animation: slideLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.month-slider.slide-right {
  animation: slideRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideLeft {
  from {
    transform: translateX(100%);
    opacity: 0.5;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideRight {
  from {
    transform: translateX(-100%);
    opacity: 0.5;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.month-slide {
  width: 100%;
  flex-shrink: 0;
}

.month-slide .calendar {
  animation: fadeIn 0.3s ease-in-out 0.2s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.month-progress {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-lg);
}

.month-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.month-progress-dot.active {
  background: var(--accent-primary);
  transform: scale(1.4);
}

.month-progress-dot:hover {
  background: var(--accent-secondary);
  transform: scale(1.2);
}

.month-progress-dot:hover {
  background: var(--accent-secondary);
  transform: scale(1.2);
}

/* ====================== */
/* PILLS & BADGES */
/* ====================== */

.pill {
  display: inline-flex;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--ink-secondary);
  font-size: var(--font-sm);
  font-weight: 500;
  background: var(--surface);
  transition: all 0.2s ease;
}

#season-range{
  font-size: var(--font-xs);
}

.pill:hover {
  border-color: var(--accent-primary);
  background: var(--hover-bg);
}

.kbd {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-sm);
  font-weight: 600;
  color: var(--accent-primary);
}

.badge {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  font-size: var(--font-sm);
  display: inline-block;
  transition: all 0.2s ease;
}

.badge:hover {
  border-color: var(--accent-primary);
  background: var(--hover-bg);
}

.muted {
  color: var(--ink-secondary);
  line-height: 1.6;
  font-size: var(--font-sm);
}

/* ====================== */
/* PAHAR CARD */
/* ====================== */

.pahar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: var(--space-md);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.pahar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pattern-1), var(--pattern-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.pahar-card:hover::before {
  transform: scaleX(1);
}

.pahar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.pahar-head h2 {
  margin: 0;
  font-size: var(--font-md);
  font-weight: 700;
}

.pahar-pill {
  display: inline-flex;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  color: var(--ink-secondary);
}

.pahar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.pahar-now {
  font-size: var(--font-lg);
  font-weight: 800;
  background: linear-gradient(135deg, var(--pattern-1), var(--pattern-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pahar-note {
  font-size: var(--font-sm);
  color: var(--ink-secondary);
}

.pahar-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.pahar-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  font-size: var(--font-xs);
  background: var(--surface-elevated);
  transition: all 0.2s ease;
}

.pahar-chip:hover {
  border-color: var(--accent-primary);
  background: var(--hover-bg);
}

.pahar-chip.active {
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 0 3px var(--active-bg);
  font-weight: 800;
  background: var(--active-bg);
}

/* ====================== */
/* SOLAR DIAL STYLES */
/* ====================== */

.dial {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--surface-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 470px;
  overflow: hidden;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.dial svg {
  position: absolute;
  inset: var(--space-md);
}

.ring {
  fill: none;
  stroke: var(--border);
  stroke-width: 10;
  opacity: 0.8;
}

.center {
  fill: var(--bg);
  stroke: var(--accent-primary);
  stroke-width: 2;
}

.tick {
  stroke: var(--ink-tertiary);
  stroke-width: 2;
  opacity: 0.6;
}

.label {
  fill: var(--ink-secondary);
  font-size: var(--font-xs);
}

.dotSun {
  fill: var(--accent-warning);
  stroke: var(--ink);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px rgba(240, 136, 62, 0.4));
}

.dotMoon {
  fill: var(--pattern-3);
  stroke: var(--ink);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 6px rgba(210, 153, 34, 0.4));
}


.riseMark {
  fill: var(--accent-primary);
}

.setMark {
  fill: var(--accent-error);
}

.bigCompass {
  font-size: var(--font-md);
  fill: var(--accent-primary);
  font-weight: 800;
  opacity: 0.8;
}

.smallNum {
  fill: var(--ink-tertiary);
  font-size: var(--font-xs);
  opacity: 0.9;
}

.legend {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  font-size: var(--font-sm);
  width: fit-content;
  margin: auto;
}

.kv div:nth-child(odd) {
  color: var(--ink-secondary);
}

.h {
  font-weight: 700;
  margin: 0 0 var(--space-md);
  font-size: var(--font-md);
}

/* ====================== */
/* WIDGET STYLES */
/* ====================== */

.widget-grid {
  display: grid;
  gap: 0.75rem; /* 12px spacing between cards in same section */
  grid-template-columns: repeat(12, 1fr);
}

.widget-half {
  grid-column: span 12;
}

@media (min-width: 900px) {
  .widget-half {
    grid-column: span 6;
  }
}

.widget-third {
  grid-column: span 12;
}

@media (min-width: 900px) {
  .widget-third {
    grid-column: span 6;
  }
}

.widget-panel {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--surface-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 420px;
  overflow: hidden;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.widget-panel svg {
  position: absolute;
  inset: var(--space-md);
}

.widget-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
  opacity: 0.6;
}

.widgetSunDot {
  fill: var(--accent-warning);
  stroke: var(--ink);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px rgba(240, 136, 62, 0.4));
}

.widgetMoonDot {
  fill: var(--pattern-3);
  stroke: var(--ink);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 6px rgba(210, 153, 34, 0.4));
}

.widget-fade {
  opacity: 0.35;
}

.widget-axis text {
  fill: var(--ink-secondary);
  font-size: var(--font-md);
}

.widget-label {
  fill: var(--ink-secondary);
  font-size: var(--font-md);
}

.widget-bigdir {
  font-size: var(--font-lg);
  fill: var(--accent-primary);
  opacity: 0.7;
  font-weight: 700;
}

.widget-smallcomp {
  font-size: var(--font-md);
  fill: var(--ink-secondary);
  opacity: 0.85;
}

.widget-icon {
  fill: var(--ink-secondary);
  opacity: 0.85;
}

.widget-trail {
  fill: none;
  stroke: var(--accent-secondary);
  stroke-width: 2.4;
  opacity: 0.75;
}

.widget-trailSun {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2;
  opacity: 0.65;
}

.widget-trailDot {
  fill: var(--accent-secondary);
  opacity: 0.85;
}

.widget-trailDotSun {
  fill: var(--accent-primary);
  opacity: 0.85;
}

.widget-footer {
  margin-top: var(--space-sm);
  color: var(--ink-secondary);
  font-size: var(--font-md);
}

.widget-legend {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.widget-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.widget-legend-sun {
  background: var(--accent-warning);
}

.widget-legend-moon {
  background: var(--pattern-3);
}

/* ====================== */
/* GRID LAYOUTS */
/* ====================== */

.grid {
  display: grid;
  gap: 0.75rem; /* 12px spacing between cards in same section */
  grid-template-columns: repeat(12, 1fr);
}

.half {
  grid-column: span 12;
}

.third {
  grid-column: span 12;
}

@media (min-width: 900px) {
  .half {
    grid-column: span 6;
  }
  .third {
    grid-column: span 12;
  }
}

.two-col-wrap {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.two-col-wrap > .card {
  flex: 1 1 0;
  min-width: 320px;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .two-col-wrap {
    flex-direction: column;
  }
}

/* ====================== */
/* FOOTER */
/* ====================== */

footer {
  margin: var(--space-3xl) 0 var(--space-lg);
  color: var(--ink-secondary);
  font-size: var(--font-md);
  text-align: center;
  padding: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  animation: fadeIn 1s ease 1s both;
}

/* ====================== */
/* UTILITIES */
/* ====================== */

/* Font size utility classes */
.text-xs { font-size: var(--font-md); }
.text-sm { font-size: var(--font-sm); }
.text-md { font-size: var(--font-md); }
.text-lg { font-size: var(--font-lg); }
.text-xl { font-size: var(--font-xl); }

.time {
  font-weight: 600;
  color: var(--accent-primary);
}

/* Form elements */
input[type="number"],
input[type="date"],
select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  transition: all 0.2s ease;
  font-family: inherit;
}

input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--active-bg);
}

input[type="number"]:hover,
input[type="date"]:hover,
select:hover {
  border-color: var(--accent-primary);
}

label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 500;
}

/* Loading states */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.loading {
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-elevated) 50%,
    var(--surface) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: #ffffff;
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 100;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* ====================== */
/* ENTRANCE ANIMATIONS */
/* ====================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animated class applied by JS */
.animated {
  animation-fill-mode: both;
}

/* Add subtle pulse to interactive elements */
.btn:hover,
.tab:hover {
  animation: subtlePulse 0.4s ease;
}

@keyframes subtlePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* Enhance card hover effects */
.card:hover,
.pahar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Add bounce to today boxes on hover */
.today-box:hover {
  animation: gentleBounce 0.5s ease;
}

@keyframes gentleBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Glow effect on focus */
.btn:focus-visible,
.tab:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.2);
  animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(74, 158, 255, 0.1);
  }
}

/* ====================== */
/* RESPONSIVE ADJUSTMENTS */
/* ====================== */

@media (max-width: 768px) {
  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .weather-grid {
    grid-template-columns: 1fr;
  }

  .wx-mini {
    grid-template-columns: repeat(2, 1fr);
  }

  .weather-hero {
    flex-direction: column;
    text-align: center;
  }

  .wx-main {
    flex-direction: column;
  }
}

/*
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
*/

/* FAQ Cards: Equal Height */
.row > .card.faq-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  flex: 1 1 320px;
  height: auto;
  min-height: var(--faq-card-min-height); /* Responsive minimum height */
}

.row > .card.faq-item .h {
  flex-shrink: 0; /* Prevent title from shrinking */
  margin-bottom: var(--space-sm);
  font-size: calc(var(--font-md) * 0.9);
}

.row > .card.faq-item .muted {
  flex-grow: 1; /* Take up remaining space */
  display: flex;
  align-items: flex-start;
  font-size: calc(var(--font-md) * 0.8);
  line-height: 1.6;
}

/* Ensure parent row uses proper flex alignment */
.row {
  align-items: stretch; /* Make all flex items same height */
}

/* Mobile adjustments for FAQ cards */
@media (max-width: 768px) {
  .row > .card.faq-item {
    flex: 1 1 100%; /* Full width on mobile */
    min-height: var(--faq-card-min-height);
    margin-bottom: var(--space-md);
  }
  
  /* Ensure row still maintains equal heights even in mobile layout */
  .row {
    flex-direction: column;
    align-items: stretch;
  }
}

.weather-svg-icon {
  width: 128px;
  height: 128px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  /* background: var(--surface-elevated, #fff); */
  background-color: transparent;
  /* border-radius: 50%;
  border: 2px solid var(--border, #ccc);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08); */
}

#wxIcon svg,
#wxIcon g,
#wxIcon line,
#wxIcon ellipse,
#wxIcon circle,
#wxIcon text {
  display: none !important;
}

#seasonIcon img.weather-svg-icon {
  width: 64px;
  height: 64px;
}
