/* STEM.LV publiskais frontends — tokeni un pamatstils. Bez build soļa. */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --blue-900: #0E2A66;
  --blue-700: #163B93;
  --blue-600: #1E4FD8;
  --blue-100: #E4ECFB;
  --blue-50: #F0F4FC;
  --paper: #F5F7FC;
  --white: #FFFFFF;
  --coral: #FF6B57;
  --coral-ink: #C8392B;
  --coral-50: #FFEEEA;
  --ink: #16213A;
  --ink-2: #4A5673;
  --line: #D6DDEC;
  --focus: #FF6B57;

  --font: "Manrope", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --fs-0: 0.9375rem;  /* 15 */
  --fs-1: 1.0625rem;  /* 17 */
  --fs-2: 1.3125rem;  /* 21 */
  --fs-3: 1.625rem;   /* 26 */
  --fs-4: 2.0625rem;  /* 33 */
  --fs-5: 2.5625rem;  /* 41 */
  --fs-6: 3.25rem;    /* 52 */

  --radius: 6px;
  --radius-lg: 12px;
  --gap: 1rem;
  --container: 1180px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-1);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(var(--fs-4), 5vw, var(--fs-6)); }
h2 { font-size: clamp(var(--fs-3), 3vw, var(--fs-4)); }
h3 { font-size: var(--fs-2); letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-900); }
button { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hero :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--coral); color: #fff; padding: 8px 12px; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

/* Galvene */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--blue-900); text-decoration: none; font-weight: 700; letter-spacing: 0.02em;
  font-size: var(--fs-2);
}
.brand__mark { width: 32px; height: 32px; }
.site-nav { display: flex; gap: 1.25rem; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--fs-0); padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--coral); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--blue-600); border-bottom-color: var(--coral); }
.site-nav__login { color: var(--blue-600) !important; }
.nav-toggle { display: none; }

/* Hero */
.hero {
  background: var(--blue-900);
  color: #fff;
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem);
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  grid-template-areas: "copy card" "track track";
  gap: 2rem 3rem;
  align-items: start;
}
.hero__copy { grid-area: copy; max-width: 34ch; }
.hero__lede { margin-top: 1rem; font-size: var(--fs-2); color: #C9D6F5; max-width: 40ch; }
.hero__season { margin-top: 1.25rem; font-weight: 700; color: #fff; }
.hero__season span { color: var(--coral); }

.next-card {
  grid-area: card;
  background: var(--white); color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 6px solid var(--coral);
}
.next-card__heading { font-size: var(--fs-0); font-weight: 700; color: var(--coral-ink); letter-spacing: 0; }
.next-card__date { font-size: var(--fs-4); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-top: 0.4rem; }
.next-card__title { font-size: var(--fs-2); font-weight: 700; margin-top: 0.5rem; line-height: 1.25; }
.next-card__place { margin-top: 0.4rem; color: var(--ink-2); }
.next-card__countdown { margin-top: 0.75rem; font-weight: 700; }
.next-card__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.next-card__loading, .next-card__empty { color: var(--ink-2); }

/* Sezonas trase — vienīgais uzsvērtais elements */
.track { grid-area: track; min-width: 0; }
.track__hint { font-size: var(--fs-0); color: #C9D6F5; margin-bottom: 0.25rem; }
.track__scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.track__inner { position: relative; min-width: 720px; }
.track__svg { display: block; width: 100%; height: 120px; }
.track__svg .track__line { stroke: var(--coral); stroke-width: 4; fill: none; stroke-linecap: round; }
.track__svg .track__month { fill: #C9D6F5; font-size: 14px; font-family: var(--font); }
.track__svg .track__tick { stroke: rgba(255,255,255,0.25); stroke-width: 1; }
.track__list { position: relative; height: 0; }
.track__dot {
  position: absolute; top: -69px; transform: translateX(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--coral); padding: 0; cursor: pointer;
}
.track__dot--past { background: var(--coral); border-color: var(--coral); opacity: 0.7; }
.track__dot--next { width: 26px; height: 26px; top: -73px; background: var(--coral); border-color: #fff; }
.track__dot--next::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--coral); animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(0.7); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .track__dot--next::after { animation: none; opacity: 0.6; } }
.track__dot:hover, .track__dot:focus-visible { background: #fff; border-color: #fff; }
.track__dot .track__tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
  background: #fff; color: var(--ink); padding: 4px 8px; border-radius: 4px; font-size: 13px;
  white-space: nowrap; display: none; pointer-events: none; font-weight: 700;
}
.track__dot:hover .track__tip, .track__dot:focus-visible .track__tip { display: block; }

/* Sekcijas */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--tint { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; margin-bottom: 1.25rem; }
.section__count { color: var(--ink-2); }
.section__note { flex-basis: 100%; color: var(--ink-2); max-width: 70ch; }
.section__more { margin-left: auto; font-weight: 700; }
.section--list { padding-top: 2rem; }
.section--archive .event-card { border-left: 4px solid var(--blue-100); }

/* Iekšlapu ievads — kompaktāks par sākumlapas sezonas hero. */
.page-head { background: var(--blue-900); color: #fff; padding: clamp(1.75rem, 4vw, 3rem) 0; }
.page-head__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: end; }
.page-head__copy { max-width: 68ch; }
.page-head h1 { font-size: clamp(var(--fs-4), 5vw, var(--fs-5)); }
.page-head__note { margin-top: 0.75rem; color: #D8E2FA; }
.page-head__note a { color: #fff; }
.page-head__count { color: #fff; font-weight: 700; white-space: nowrap; padding-bottom: 0.15rem; }

/* Sākumlapas trīs skaidrie ceļi uz atsevišķajām sadaļām. */
.cta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cta { border-bottom: 1px solid var(--line); }
.cta + .cta { border-left: 1px solid var(--line); }
.cta__link { display: flex; min-height: 100%; flex-direction: column; padding: 1.4rem; color: var(--ink); text-decoration: none; }
.cta__link:hover { background: var(--blue-50); color: var(--ink); }
.cta__kicker { color: var(--coral-ink); font-size: var(--fs-0); font-weight: 700; }
.cta__title { margin-top: 0.3rem; font-size: var(--fs-3); font-weight: 700; letter-spacing: -0.02em; }
.cta__text { margin-top: 0.65rem; color: var(--ink-2); }
.cta__go { margin-top: auto; padding-top: 1.25rem; color: var(--blue-600); font-weight: 700; }

/* Pogas */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--blue-600); color: #fff; border: 2px solid var(--blue-600);
  padding: 0.55rem 1rem; border-radius: var(--radius); font-weight: 700; cursor: pointer;
  text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--blue-900); border-color: var(--blue-900); color: #fff; }
.btn--ghost { background: transparent; color: var(--blue-600); }
.btn--ghost:hover { background: var(--blue-100); color: var(--blue-900); border-color: var(--blue-100); }
.btn--coral { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn--coral:hover { background: var(--coral-ink); border-color: var(--coral-ink); }
.btn--small { padding: 0.35rem 0.7rem; font-size: var(--fs-0); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white);
  font-size: 1.5rem; line-height: 1; cursor: pointer; display: inline-grid; place-items: center; color: var(--ink);
}
.icon-btn:hover { background: var(--blue-100); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }

/* Rīkjosla */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin-bottom: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field--grow { flex: 1 1 260px; }
.field label { font-size: var(--fs-0); font-weight: 700; color: var(--ink-2); }
.field input, .field select {
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.55rem 0.75rem; min-height: 44px;
}
.field input:focus, .field select:focus { border-color: var(--blue-600); outline: 3px solid var(--blue-100); }
.field input[type="search"] { -webkit-appearance: none; appearance: none; }
.type-filter { position: relative; flex: 1 0 100%; min-width: 0; border: 0; padding: 0; margin: .25rem 0 0; }
.type-filter legend { font-weight: 700; font-size: var(--fs-0); color: var(--ink-2); padding: 0; }
.type-filter__hint { color: var(--ink-2); font-size: var(--fs-0); margin: .25rem 0 .6rem; }
.type-filter__options { display: flex; flex-wrap: wrap; gap: .5rem; }
.type-option { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; font-weight: 700; }
.type-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue-600); }
.type-option:has(input:checked) { background: var(--blue-100); border-color: var(--blue-600); color: var(--blue-700); }
.type-option:focus-within { outline: 3px solid var(--blue-100); outline-offset: 2px; }
.type-option__info { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--blue-100); color: var(--blue-700); font-size: .75rem; font-weight: 800; line-height: 1; }
.type-option__tooltip { position: absolute; z-index: 30; left: 0; top: calc(100% + .45rem); width: min(460px, 100%); padding: .7rem .85rem; border-radius: var(--radius); background: var(--blue-900); color: var(--white); box-shadow: var(--shadow); font-size: var(--fs-0); font-weight: 500; line-height: 1.45; opacity: 0; visibility: hidden; pointer-events: none; }
.type-option:hover .type-option__tooltip, .type-option:focus-within .type-option__tooltip { opacity: 1; visibility: visible; }

/* Datumu diapazons */
.range { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.25rem 0.75rem; margin-bottom: 1.5rem; }
.range__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.range__head h3 { font-size: var(--fs-1); }
.range__label { color: var(--ink-2); flex: 1 1 auto; }
.range__sliders { position: relative; height: 44px; margin-top: 0.5rem; }
.range__track { position: absolute; left: 0; right: 0; top: 50%; height: 6px; transform: translateY(-50%); background: var(--blue-100); border-radius: 3px; }
.range__fill { position: absolute; top: 0; bottom: 0; background: var(--coral); border-radius: 3px; }
.range__sliders input[type="range"] {
  position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 44px; margin: 0;
  background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none;
}
.range__sliders input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: 44px; }
.range__sliders input[type="range"]::-moz-range-track { background: transparent; height: 44px; }
.range__sliders input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: grab;
  width: 26px; height: 26px; margin-top: 9px; border-radius: 50%; background: #fff; border: 3px solid var(--coral);
  box-shadow: 0 1px 3px rgba(14,42,102,0.3);
}
.range__sliders input[type="range"]::-moz-range-thumb {
  pointer-events: auto; cursor: grab;
  width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--coral);
  box-shadow: 0 1px 3px rgba(14,42,102,0.3);
}
.range__sliders input[type="range"]:focus-visible { outline: none; }
.range__sliders input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--blue-600); outline-offset: 2px; }
.range__sliders input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid var(--blue-600); outline-offset: 2px; }
.range__ends { display: flex; justify-content: space-between; font-size: var(--fs-0); color: var(--ink-2); }

/* STEM pasākumu kartītes — aizpilda visu kopīgās rindas augstumu. */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.events > li { display: grid; min-width: 0; }
.event-card {
  display: grid; grid-template-columns: 72px 1fr; gap: 0 1rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1rem; text-align: left; width: 100%; cursor: pointer; color: var(--ink);
  align-items: start;
}
.event-card:hover { border-color: var(--blue-600); }
.event-card--past { background: var(--blue-50); }
.event-card__date { text-align: center; background: var(--blue-100); border-radius: var(--radius); padding: 0.4rem 0.2rem; color: var(--blue-900); }
.event-card--next .event-card__date { background: var(--coral); color: #fff; }
.event-card--past .event-card__date { background: var(--white); border: 1px solid var(--line); }
.event-card__day { display: block; font-size: var(--fs-4); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.event-card__month { display: block; font-size: 0.8rem; font-weight: 700; margin-top: 0.2rem; }
.event-card__span { display: block; font-size: 0.75rem; margin-top: 0.15rem; opacity: 0.85; }
.event-card__title { display: block; font-size: var(--fs-1); font-weight: 700; line-height: 1.3; }
.event-card__meta { display: block; color: var(--ink-2); font-size: var(--fs-0); margin-top: 0.3rem; }
.event-card__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.tag { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--blue-100); color: var(--blue-900); }
.tag--pending { background: var(--coral-50); color: var(--coral-ink); }
.tag--live { background: var(--coral); color: #fff; }
.tag--soon { background: var(--blue-600); color: #fff; }
.tag--past { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

.empty { text-align: left; background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 60ch; }
.empty__title { font-weight: 700; font-size: var(--fs-2); margin-bottom: 0.25rem; }
.empty .btn { margin-top: 1rem; }
.notice { background: var(--coral-50); color: var(--coral-ink); padding: 0.75rem 1rem; border-radius: var(--radius); margin-top: 1rem; }

/* Karte + kalendārs */
.map-cal { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 1.5rem; align-items: start; }
.map-wrap { min-width: 0; }
.map { height: 480px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--blue-50); z-index: 0; }
.map__legend { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; font-size: var(--fs-0); color: var(--ink-2); margin-top: 0.5rem; }
.legend { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.legend--venue { background: var(--blue-600); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--blue-600); }
.legend--city { background: #fff; border: 2px dashed var(--coral-ink); margin-left: 0.8rem; }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content { font-size: 15px; line-height: 1.4; margin: 12px 14px; }
.leaflet-popup-content .popup__title { font-weight: 700; display: block; margin-bottom: 2px; }
.leaflet-popup-content .popup__meta { color: var(--ink-2); display: block; }
.leaflet-popup-content button { margin-top: 6px; }
.marker-city { background: transparent !important; border: none !important; }

.calendar { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem; }
.calendar__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.calendar__title { font-size: var(--fs-2); text-transform: capitalize; }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar__dow { text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--ink-2); padding: 0.2rem 0; }
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius); background: var(--white); border: 1px solid transparent; font-size: var(--fs-0);
  padding: 0; cursor: default; color: var(--ink); position: relative;
}
.cal-day--out { opacity: 0.35; }
.cal-day--today { border-color: var(--blue-600); font-weight: 700; }
.cal-day--event { background: var(--coral); color: #fff; font-weight: 700; cursor: pointer; }
.cal-day--event:hover { background: var(--coral-ink); }
.cal-day--event.cal-day--past { background: var(--blue-100); color: var(--blue-900); }
.cal-day--event.cal-day--past:hover { background: var(--blue-600); color: #fff; }
.cal-day--selected { outline: 3px solid var(--blue-900); outline-offset: -3px; }
.cal-day__n { display: block; }
.cal-day__c { position: absolute; top: 2px; right: 4px; font-size: 0.65rem; font-weight: 700; }
.calendar__day { margin-top: 0.75rem; min-height: 1.5rem; font-size: var(--fs-0); }
.calendar__day p { color: var(--ink-2); }
.calendar__day ul { display: grid; gap: 0.35rem; margin-top: 0.4rem; }
.calendar__day button {
  width: 100%; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.5rem 0.65rem; cursor: pointer; font-weight: 700;
}
.calendar__day button:hover { border-color: var(--blue-600); }
.calendar__day button span { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.85rem; }

/* Materiāli */
.resources { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.resource__link {
  display: flex; gap: 1rem; align-items: center; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1rem; text-decoration: none; color: var(--ink);
}
.resource__link:hover { border-color: var(--blue-600); color: var(--ink); }
.resource__type { flex: 0 0 auto; background: var(--blue-900); color: #fff; font-weight: 700; font-size: 0.8rem; padding: 0.6rem 0.5rem; border-radius: var(--radius); }
.resource__title { display: block; font-weight: 700; }
.resource__meta { display: block; color: var(--ink-2); font-size: var(--fs-0); margin-top: 0.15rem; }

/* Kājene */
.site-footer { background: var(--blue-900); color: #C9D6F5; padding: 2rem 0; margin-top: 2rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; font-size: var(--fs-0); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.site-footer strong { color: #fff; }
.site-footer a { color: #fff; }

/* Dialogs */
.dialog { border: none; padding: 0; background: transparent; max-width: min(720px, 100vw - 2rem); width: 100%; max-height: calc(100vh - 2rem); overflow: visible; }
.dialog::backdrop { background: rgba(14, 42, 102, 0.55); }
.dialog__frame { background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(14,42,102,0.35); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; overflow: hidden; }
.dialog__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.dialog__nav { display: flex; align-items: center; gap: 0.5rem; }
.dialog__pos { color: var(--ink-2); font-size: var(--fs-0); min-width: 5ch; text-align: center; }
.dialog__content { padding: 1.25rem 1.5rem 1.75rem; overflow-y: auto; }
.dialog__content h2 { font-size: var(--fs-3); }
.dialog__date { font-size: var(--fs-2); font-weight: 700; color: var(--coral-ink); margin-top: 0.4rem; }
.dialog__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.dialog__image { margin-top: 1rem; border-radius: var(--radius); }
.dialog__place { margin-top: 1rem; padding: 0.9rem 1rem; background: var(--blue-50); border-radius: var(--radius); display: grid; gap: 0.25rem; }
.dialog__place--pending { background: var(--coral-50); }
.dialog__place strong { display: block; }
.dialog__place .dialog__note { color: var(--coral-ink); font-weight: 700; }
.dialog__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.dialog__desc { margin-top: 1.25rem; display: grid; gap: 0.75rem; max-width: 65ch; }
.dialog__desc p { white-space: pre-line; }
.dialog__desc a { overflow-wrap: anywhere; }
.dialog__details { margin-top: 1rem; padding-left: 0.9rem; border-left: 3px solid var(--line); color: var(--ink-2); font-size: var(--fs-0); max-width: 65ch; display: grid; gap: 0.5rem; }
.dialog__details p { white-space: pre-line; }
.dialog__section { margin-top: 1.25rem; }
.dialog__section h3 { font-size: var(--fs-1); margin-bottom: 0.4rem; }
.dialog__links { display: grid; gap: 0.35rem; }
.dialog__links a { display: block; padding: 0.5rem 0.75rem; background: var(--blue-50); border-radius: var(--radius); text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.dialog__links a:hover { background: var(--blue-100); }
.dialog__source { margin-top: 1.25rem; font-size: 0.85rem; color: var(--ink-2); }

/* Responsīvs */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; grid-template-areas: "copy" "card" "track"; gap: 1.5rem; }
  .map-cal { grid-template-columns: 1fr; }
  .map { height: 360px; }
  .cta-grid { grid-template-columns: 1fr; }
  .cta + .cta { border-left: 0; }
}

@media (max-width: 680px) {
  :root { --header-h: 56px; }
  .site-header__inner { flex-wrap: wrap; gap: 0.5rem 1rem; }
  .nav-toggle {
    display: inline-grid; place-items: center; margin-left: auto; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; position: relative;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    display: block; width: 20px; height: 2px; background: var(--blue-900); border-radius: 2px; content: ""; position: absolute; left: 11px;
  }
  .nav-toggle__bar { top: 21px; }
  .nav-toggle__bar::before { left: 0; top: -6px; }
  .nav-toggle__bar::after { left: 0; top: 6px; }
  .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 0.5rem; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.7rem 0.25rem; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom-color: var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--coral); }

  .page-head__inner { grid-template-columns: 1fr; gap: 0.75rem; }
  .page-head__count { white-space: normal; }
  .section__more { flex-basis: 100%; margin-left: 0; }

  .next-card { padding: 1rem 1.1rem 1.25rem; }
  .events { grid-template-columns: 1fr; }
  .event-card { grid-template-columns: 60px 1fr; }
  .event-card__day { font-size: var(--fs-3); }
  .map { height: 320px; }
  .calendar { padding: 0.75rem; }
  .calendar__grid { gap: 2px; }
  .cal-day { font-size: 0.85rem; }
  .range { padding: 0.75rem 0.9rem 0.5rem; }
  .range__head .btn { margin-left: auto; }

  .dialog { max-width: 100vw; max-height: 100vh; margin: 0; align-self: end; }
  .dialog__frame { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 94vh; }
  .dialog__content { padding: 1rem 1rem 1.5rem; }
}

/* The shared date filter stays directly with the map and calendar. */
.planner{margin:2rem 0 2.5rem;scroll-margin-top:80px}.planner>.planner__inner>.section__head{margin-bottom:1rem}.planner .range{margin-bottom:1.25rem}.list-heading{font-size:var(--fs-2);margin:0 0 1rem}

/* Plakāta proporcijas saglabātas: arī vertikālu afišu teksts netiek nogriezts. */
.dialog__poster { display: block; margin-top: 1.5rem; text-align: center; cursor: zoom-in; }
.dialog__poster .dialog__image { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; margin: 0; }
.dialog__poster span { display: inline-block; margin-top: .5rem; font-size: var(--fs-0); }
