/* TOKENS & RESET */
:root {
  --bg-main: #F9FAFB;
  --bg-surface: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --accent: #FF4F00;
  --accent-soft: #FFF0EA;
  --border-light: #E2E8F0;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-xxl: 4rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -4px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  
  --max-width-content: 1120px;
  --card-padding: 1.5rem;
  
  --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* TYPOGRAPHY */
h1, h2, h3, .nav-brand, .about-title, .form-title, .success-text {
  font-family: 'Bricolage Grotesque', sans-serif;
}

/* ACCESSIBILITY & FOCUS */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* NAV & BRAND */
.site-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav__container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-brand-sub {
  color: var(--accent);
  font-weight: 500;
}

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

.site-nav__link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap; /* "Zgłoś event" nie łamie się na dwie linie na mobile */
  transition: var(--transition-smooth);
}

.site-nav__link:hover,
.site-nav__link--active {
  color: var(--accent);
}

/* HERO SECTION */
.hero-section {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}

.hero-section__container {
  max-width: 800px;
  margin: 0 auto;
}

.hero-section__title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.hero-section__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* FILTERS BAR */
.filters-bar {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-md);
}

.filters-bar__container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.filters-bar__selects {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.filter-group {
  flex: 1 1 200px;
}

.filter-select {
  width: 100%;
  padding: 0.75rem var(--space-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-main);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-select:hover {
  border-color: var(--accent);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--bg-surface);
}

.filter-select--active {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.filters-subhead {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* MAIN CONTENT LAYOUT */
.section-container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: calc(-1 * var(--space-sm));
  margin-bottom: var(--space-lg);
}

/* GRIDS */
.grid-events {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.grid-scouts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

/* EVENT CARD */
.event-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.event-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--border-light);
  overflow: hidden;
}

.event-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card__content {
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex-grow: 1;
}

.event-card__meta {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.event-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

.event-card__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.event-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

/* SCOUT BLOCK (INSIDE CARD) */
.scout-block {
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.scout-block__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.scout-block__avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 1.5px solid var(--accent);
}

.scout-block__meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.scout-block__name {
  font-weight: 700;
  color: var(--text-primary);
}

.scout-block__quote {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.4;
}

.scout-block__quote::before {
  content: "„";
}

.scout-block__quote::after {
  content: "”";
}

.scout-block__label {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.scout-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--accent);
}

.scout-profile-card__avatar.scout-avatar-fallback {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
  border-width: 2px;
}

/* Badges & status inside cards */
.event-card__badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.event-card__badges .badge {
  white-space: normal;
  text-align: left;
}

.event-card--cancelled {
  opacity: 0.75;
}

.event-card--cancelled .event-card__title {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #DC2626;
}

.badge--format {
  background: var(--bg-main);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.archive-card__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ARCHIVE CARD */
.archive-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  opacity: 0.85;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.archive-card .event-card__title {
  font-size: 1.25rem;
}

.archive-card .scout-block {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
}

/* SCOUT PROFILE CARD */
.scout-profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
}

.scout-profile-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.scout-profile-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-bottom: var(--space-sm);
  border: 2px solid var(--accent);
}

.scout-profile-card__name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

.scout-profile-card__role {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.scout-profile-card__link {
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge--past {
  background-color: #F1F5F9;
  color: #64748B;
}

.badge--cancelled {
  background-color: #FEE2E2;
  color: #DC2626;
}

.badge--changed {
  background-color: #FEF3C7;
  color: #D97706;
}

.badge--appears {
  background-color: #EEF2FF;
  color: #4F46E5;
}

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: var(--bg-surface);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem var(--space-lg);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #E04600;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--accent);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--border-light); /* consistent for <a> AND <button> */
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  color: #E04600;
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.btn-calendar {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: var(--transition-smooth);
}

.btn-calendar:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--bg-main);
}

/* POPOVER CALENDAR */
.popover-calendar {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10;
  min-width: 160px;
}

.popover-calendar {
  bottom: calc(100% + 6px);
  left: 0;
}

.popover-option {
  padding: 0.5rem var(--space-sm);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary);
  background: transparent;
  border: none;
  text-align: left;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.popover-option:hover {
  background-color: var(--accent-soft);
  color: var(--accent);
}

/* TOAST NOTIFICATION */
.toast-notification {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--text-primary);
  color: var(--bg-surface);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 3000; /* above modals (2000) — e.g. "Link skopiowany" from inside a modal */
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* SECTION CTA */
.section-cta {
  background-color: var(--text-primary);
  color: var(--bg-surface);
}

.cta-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.cta-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
}

.cta-desc {
  color: #94A3B8;
  max-width: 600px;
}

.badge-preview-block {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.badge-preview-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #94A3B8;
}

/* FOOTER */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: var(--space-xl) var(--space-md);
}

.footer-container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-brand {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-collab { font-size: 0.9rem; color: var(--text-secondary); }
.footer-disclaimer {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--border-light);
  padding-left: var(--space-md);
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-lg);
}
.footer-links { display: flex; gap: var(--space-md); }
.footer-link { color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.footer-link:hover { color: var(--accent); }
.footer-contact { font-size: 0.9rem; color: var(--text-secondary); }
.footer-contact a { color: var(--accent); text-decoration: none; }

/* ========================================================================== */
/* ===================  GTM WEEK REBUILD — new components  ================== */
/* ========================================================================== */

[hidden] { display: none !important; }

/* Theme tokens (per day of GTM Week) */
[data-theme="strategy"]    { --th: #4F46E5; --th-soft: #EEF0FF; }
[data-theme="engineering"] { --th: #0D9488; --th-soft: #E5FAF6; }
[data-theme="tactics"]     { --th: #FF4F00; --th-soft: #FFF0EA; }
[data-theme="execution"]   { --th: #DB2777; --th-soft: #FCE7F3; }

/* ---------- HERO additions ---------- */
.hero-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.hero-chip {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.9rem;
}
.hero-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.hero-link:hover { text-decoration: underline; }

/* ---------- FEATURED RAIL (Wybór Scoutów) ---------- */
.section-featured { background: var(--bg-surface); border-bottom: 1px solid var(--border-light); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-lg); }
.section-head .section-title { margin-bottom: var(--space-xs); }
.section-head .section-subtitle { margin: 0; }

.featured-rail {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.feat-card {
  scroll-snap-align: start;
  flex: 0 0 300px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--th, var(--accent));
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--th, var(--accent)); }
.feat-card:focus-visible { outline: 3px solid var(--th, var(--accent)); outline-offset: 2px; }
.feat-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.feat-card__star { color: #F59E0B; font-size: 1rem; }
.feat-card__day { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.feat-card__title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.feat-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.feat-card__desc { font-size: 0.875rem; color: var(--text-secondary); }
.feat-card__quote { font-size: 0.875rem; font-style: italic; color: var(--text-primary); background: var(--th-soft, var(--accent-soft)); border-radius: var(--radius-md); padding: var(--space-sm); }
.feat-card__actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding-top: var(--space-sm); }
.feat-card__more { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.feat-card:hover .feat-card__more { color: var(--th, var(--accent)); }

/* ---------- CONTROLS BAR (view switcher + filters) ---------- */
.controls-bar { position: sticky; top: 72px; z-index: 50; background: var(--bg-main); border-bottom: 1px solid var(--border-light); padding: var(--space-md); }
.controls-bar__container { max-width: var(--max-width-content); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); }
.view-switcher { display: inline-flex; background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-full); padding: 4px; gap: 2px; }
.view-tab {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.view-tab:hover { color: var(--text-primary); }
.view-tab--active { background: var(--accent); color: #fff; }
.filters-inline { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
/* base .filter-select ma width:100% — tu nadpisujemy, żeby selecty stały w rzędzie */
.filters-inline .filter-select { width: auto; }
.filter-select--sm { padding: 0.55rem 0.75rem; font-size: 0.875rem; flex: 0 1 auto; min-width: 150px; max-width: 230px; }

/* ---------- CALENDAR (week time-grid) ---------- */
:root { --cal-gutter: 56px; }
.view-panel { padding: 0; }
.section-container--wide { max-width: 1280px; }

.calendar { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--space-sm); }
.calendar__grid { display: grid; min-width: 720px; }
.calendar__corner { border-bottom: 2px solid var(--border-light); }
.calendar__dayhead {
  border-bottom: 2px solid var(--th, var(--border-light));
  border-left: 1px solid var(--border-light);
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  background: var(--th-soft, var(--bg-surface));
}
.calendar__dayhead-date { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1rem; color: var(--text-primary); }
.calendar__dayhead-theme { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--th, var(--text-secondary)); }
.calendar__times { position: relative; }
.calendar__time { position: absolute; right: 6px; transform: translateY(-50%); font-size: 0.7rem; font-weight: 600; color: var(--text-secondary); }
.calendar__col { position: relative; border-left: 1px solid var(--border-light); }
.calendar__line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border-light); }

.cal-event {
  position: absolute;
  overflow: hidden;
  text-align: left;
  border: none;
  border-left: 3px solid var(--th, var(--accent));
  background: var(--th-soft, var(--accent-soft));
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: filter 0.15s ease, transform 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.cal-event:hover { filter: brightness(0.97); transform: translateY(-1px); z-index: 5; box-shadow: var(--shadow-md); }
.cal-event:focus-visible { outline: 2px solid var(--th, var(--accent)); outline-offset: 1px; z-index: 6; }
.cal-event--feat { box-shadow: inset 0 0 0 1.5px var(--th, var(--accent)), var(--shadow-sm); }
.cal-event__time { font-size: 0.68rem; font-weight: 800; color: var(--th, var(--text-secondary)); }
.cal-event__cont { font-weight: 600; opacity: 0.8; }
.cal-event__title { font-size: 0.78rem; font-weight: 700; line-height: 1.15; white-space: normal; }
.cal-event__star { color: #F59E0B; }
.cal-event__venue { font-size: 0.68rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-hint, .map-note { font-size: 0.8125rem; color: var(--text-secondary); margin-top: var(--space-md); }

/* ---------- CALENDAR (mobile agenda) ---------- */
.calendar--agenda { overflow: visible; min-width: 0; }
.agenda-day { margin-bottom: var(--space-lg); }
.agenda-day__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); padding: var(--space-sm) 0; border-bottom: 2px solid var(--th, var(--border-light)); margin-bottom: var(--space-sm); }
.agenda-day__head > span:first-child { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.05rem; }
.agenda-day__theme { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--th, var(--text-secondary)); }
.agenda-row { width: 100%; display: flex; gap: var(--space-md); align-items: stretch; text-align: left; background: var(--bg-surface); border: 1px solid var(--border-light); border-left: 4px solid var(--th, var(--accent)); border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md); margin-bottom: var(--space-sm); cursor: pointer; font-family: inherit; transition: var(--transition-smooth); }
.agenda-row:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.agenda-row__time { flex: 0 0 48px; font-size: 0.85rem; font-weight: 800; color: var(--th, var(--text-secondary)); }
.agenda-row__end { font-weight: 600; color: var(--text-secondary); font-size: 0.75rem; }
.agenda-row__body { display: flex; flex-direction: column; gap: 2px; }
.agenda-row__title { font-weight: 700; font-size: 0.95rem; }
.agenda-row__meta { font-size: 0.8rem; color: var(--text-secondary); }

/* ---------- LIST VIEW ---------- */
.list-day { margin-bottom: var(--space-xl); }
.list-day__head { display: flex; align-items: baseline; gap: var(--space-md); margin-bottom: var(--space-md); }
.list-day__date { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.25rem; font-weight: 800; }
.list-day__theme { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--th, var(--text-secondary)); background: var(--th-soft, var(--bg-main)); padding: 0.2rem 0.6rem; border-radius: var(--radius-full); }
.list-day__cards { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }

/* event card override → left theme bar */
.event-card { flex-direction: row; align-items: stretch; }
.event-card__bar { flex: 0 0 6px; background: var(--th, var(--accent)); }
.event-card__topline:empty { display: none; }
.card-star { display: inline-block; font-size: 0.72rem; font-weight: 800; color: #B45309; background: #FEF3C7; padding: 0.15rem 0.5rem; border-radius: var(--radius-full); margin-bottom: var(--space-xs); }
.event-card__meta .dot { color: var(--border-light); }
.event-card__meta em { font-style: normal; color: #B45309; font-weight: 600; }
.event-card__actions-right { display: inline-flex; align-items: center; gap: var(--space-sm); }

/* badges */
.badge--cat { background: var(--th-soft, var(--bg-main)); color: var(--th, var(--text-secondary)); border: 1px solid color-mix(in srgb, var(--th, #888) 25%, transparent); text-transform: none; letter-spacing: 0; }
.badge--access { background: var(--bg-main); color: var(--text-secondary); border: 1px solid var(--border-light); text-transform: none; letter-spacing: 0; }
.badge--lang { background: #EEF2FF; color: #4F46E5; text-transform: none; letter-spacing: 0; }
.badge--plain { background: var(--bg-main); color: var(--text-primary); border: 1px solid var(--border-light); text-transform: none; letter-spacing: 0; }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.85rem; }

/* ---------- MAP VIEW ---------- */
.map-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-md); }
.map-canvas { height: 560px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-light); background: #e8eef3; position: relative; z-index: 0; }
.map-loading, .map-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-weight: 600; padding: var(--space-lg); text-align: center; }
.map-side { height: 560px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-sm); padding-right: 4px; }
.map-item { display: flex; gap: var(--space-sm); align-items: flex-start; text-align: left; background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: var(--space-sm); cursor: pointer; font-family: inherit; transition: var(--transition-smooth); }
.map-item:hover { border-color: var(--th, var(--accent)); box-shadow: var(--shadow-sm); }
.map-item__pin { flex: 0 0 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #fff; font-weight: 800; background: var(--th, var(--accent)); border: 2px solid var(--text-primary); }
.map-item__body { display: flex; flex-direction: column; gap: 2px; }
.map-item__title { font-weight: 700; font-size: 0.9rem; }
.map-item__meta { font-size: 0.78rem; color: var(--text-secondary); }

/* Leaflet custom pins */
.pin-wrap { background: transparent; border: none; }
.pin { position: relative; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 800; border: 2px solid #0F172A; box-shadow: 0 2px 5px rgba(15,23,42,0.35); }
.pin::after { content: ""; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid #0F172A; }
.pin--strategy { background: #4F46E5; } .pin--engineering { background: #0D9488; } .pin--tactics { background: #FF4F00; } .pin--execution { background: #DB2777; }
.pin--feat { width: 28px; height: 28px; box-shadow: 0 0 0 3px rgba(245,158,11,0.55), 0 2px 5px rgba(15,23,42,0.4); }
.pin--tba { opacity: 0.7; border-style: dashed; }

/* Leaflet popup branding */
.map-pop-wrap .leaflet-popup-content-wrapper { border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.map-pop-wrap .leaflet-popup-content { margin: 0; }
.map-pop { padding: var(--space-md); border-top: 4px solid var(--th, var(--accent)); border-radius: var(--radius-md); min-width: 220px; font-family: 'Plus Jakarta Sans', sans-serif; }
.map-pop__day { font-size: 0.75rem; font-weight: 800; color: var(--th, var(--text-secondary)); text-transform: uppercase; letter-spacing: 0.03em; }
.map-pop__title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.05rem; font-weight: 800; margin: 4px 0; line-height: 1.2; }
.map-pop__venue { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: var(--space-sm); }
.map-pop__actions { display: flex; gap: var(--space-sm); }
.map-pop__btn { font-size: 0.82rem; font-weight: 700; padding: 0.4rem 0.7rem; border-radius: var(--radius-sm); cursor: pointer; border: none; text-decoration: none; }
.map-pop__btn--more { background: var(--bg-main); color: var(--text-primary); border: 1px solid var(--border-light); }
.map-pop__btn--go { background: var(--accent); color: #fff; }

/* ---------- EVENT DETAIL MODAL ---------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: var(--space-md); }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.55); backdrop-filter: blur(3px); }
.modal__dialog { position: relative; z-index: 1; width: 100%; max-width: 640px; max-height: 90vh; background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); display: flex; flex-direction: column; overflow: hidden; animation: modalIn 0.25s cubic-bezier(0.16,1,0.3,1); }
@keyframes modalIn {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal__close { position: absolute; top: 10px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,0.85); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--text-primary); }
.modal__close:hover { background: #fff; color: var(--accent); }
.modal__body { display: flex; flex-direction: column; min-height: 0; }
.modal-head { padding: var(--space-lg) var(--space-lg) var(--space-md); border-top: 6px solid var(--th, var(--accent)); background: var(--th-soft, var(--bg-main)); }
.modal-star { display: inline-block; font-size: 0.72rem; font-weight: 800; color: #B45309; background: #FEF3C7; padding: 0.2rem 0.6rem; border-radius: var(--radius-full); margin-bottom: var(--space-sm); }
.modal-day { display: block; font-size: 0.8rem; font-weight: 700; color: var(--th, var(--text-secondary)); text-transform: uppercase; letter-spacing: 0.03em; }
.modal-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.6rem; font-weight: 800; line-height: 1.15; margin: var(--space-xs) 0 var(--space-sm); }
.modal-meta { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.modal-venue { font-size: 0.9rem; color: var(--text-primary); }
.modal-loc-note { display: inline-block; font-size: 0.78rem; color: #B45309; font-weight: 600; }
.modal-scroll { padding: var(--space-lg); overflow-y: auto; }
.modal-desc { color: var(--text-secondary); white-space: pre-line; margin-bottom: var(--space-md); }
.modal-price { font-weight: 700; margin-bottom: var(--space-md); }
.modal-sec { margin-bottom: var(--space-md); }
.modal-sec__h { font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.95rem; font-weight: 800; margin-bottom: var(--space-xs); }
.modal-agenda, .modal-speakers { list-style: none; display: flex; flex-direction: column; gap: var(--space-xs); }
.modal-agenda li { font-size: 0.875rem; color: var(--text-secondary); padding-left: var(--space-md); position: relative; }
.modal-agenda li::before { content: "•"; position: absolute; left: 0; color: var(--th, var(--accent)); font-weight: 800; }
.modal-speakers li { font-size: 0.9rem; }
.modal-speakers span { color: var(--text-secondary); }
.modal-note { font-size: 0.875rem; color: var(--text-secondary); font-style: italic; }
.modal-tags { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.tag { font-size: 0.78rem; font-weight: 600; background: var(--bg-main); border: 1px solid var(--border-light); border-radius: var(--radius-full); padding: 0.2rem 0.65rem; }
.modal-hosts { font-size: 0.8rem; color: var(--text-secondary); margin-top: var(--space-sm); }
.modal-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--border-light); background: var(--bg-surface); }
.modal-actions .btn-primary { flex: 1 1 auto; }
.modal .popover-calendar { bottom: auto; top: calc(100% + 6px); left: auto; right: 0; }

/* ---------- RESPONSIVE ---------- */
@media (min-width: 640px) {
  .list-day__cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-side { height: auto; max-height: 320px; }
  .map-canvas { height: 420px; }
}
@media (max-width: 767px) {
  .hero-section__title { font-size: 1.9rem; }
  .nav-brand { font-size: 1.15rem; white-space: nowrap; }
  .logo-mark { width: 34px; height: 34px; }
  .controls-bar { position: static; }
  .controls-bar__container { flex-direction: column; align-items: stretch; }
  .view-switcher { justify-content: center; }
  .filters-inline { justify-content: stretch; }
  .filter-select--sm { flex: 1 1 30%; min-width: 0; }
  .list-day__cards { grid-template-columns: 1fr; }
  .modal__dialog { max-height: 94vh; }
  .modal-title { font-size: 1.35rem; }
}

/* ============================================================================
   V3 ADDITIONS — share, permalinks, subscribe, newsletter, badge embed
============================================================================ */

/* "Idę 🎯" share button */
.btn-share {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  background: var(--bg-surface);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-share:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-copylink {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600; font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-copylink:hover { color: var(--text-primary); border-color: var(--text-secondary); }

/* Share modal */
.modal__dialog--share { max-width: 760px; }
.share-body { display: flex; flex-direction: column; gap: var(--space-md); padding: var(--space-lg); overflow-y: auto; min-height: 0; }
.share-body .modal-title { padding-right: 44px; /* room for the ✕ button */ }
.share-preview {
  width: 100%; height: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
}
.share-hint { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.share-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* Subscribe modal */
.modal__dialog--narrow { max-width: 480px; }
.subscribe-body { display: flex; flex-direction: column; gap: var(--space-md); padding: var(--space-lg); }
.subscribe-body .modal-title { padding-right: 44px; }
.subscribe-desc { color: var(--text-secondary); margin: 0; }
.subscribe-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.subscribe-hint { font-size: 0.8rem; color: var(--text-secondary); margin: 0; }
.hero-link--btn, .footer-link--btn {
  background: none; border: none; cursor: pointer;
  font: inherit; padding: 0;
}
/* font:inherit wipes weight/size — restore to match sibling links exactly */
.hero-link--btn { color: var(--accent); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.hero-link--btn:hover { text-decoration: underline; }
.footer-link--btn { color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; }
.footer-link--btn:hover { color: var(--accent); }

/* Footer newsletter */
.footer-newsletter { margin-top: var(--space-lg); }
.footer-newsletter__label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: var(--space-sm); }
.footer-newsletter__row { display: flex; gap: var(--space-sm); max-width: 420px; }
.footer-newsletter__row input[type="email"] {
  flex: 1; min-width: 0;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
}
.footer-newsletter__row input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.footer-newsletter__note { font-size: 0.78rem; color: var(--text-secondary); margin: var(--space-sm) 0 0; }
.footer-newsletter__ok { font-weight: 600; color: var(--text-primary); }

/* Organizer badge embed (zglos.html) */
.badge-embed { margin-top: var(--space-xl); padding: var(--space-lg); background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); }
.badge-embed__title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.15rem; margin-bottom: var(--space-sm); }
.badge-embed__preview { display: flex; align-items: center; gap: var(--space-md); margin: var(--space-md) 0; }
.badge-embed__code {
  width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.75rem;
  padding: var(--space-md); border: 1px solid var(--border-light); border-radius: var(--radius-md);
  background: var(--bg-main); color: var(--text-primary); resize: vertical; min-height: 86px;
}
.badge-embed__note { font-size: 0.8rem; color: var(--text-secondary); margin-top: var(--space-sm); }

@media (max-width: 640px) {
  .share-actions .btn-primary, .share-actions .btn-secondary,
  .subscribe-actions .btn-primary, .subscribe-actions .btn-secondary { flex: 1 1 100%; }
  .footer-newsletter__row { flex-direction: column; }
  /* event modal: primary action full width, helpers share a row beneath */
  .modal-actions .btn-primary { flex: 1 1 100%; }
  .modal-actions .btn-calendar, .modal-actions .btn-share, .modal-actions .btn-copylink { flex: 1 1 auto; justify-content: center; text-align: center; }
  /* comfortable tap targets */
  .btn-share, .btn-copylink, .btn-calendar { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .share-body, .subscribe-body { padding: var(--space-md); }
}
