:root {
  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --ink: #1c1f3c;
  --ink-muted: #454544;
  --line: #d3d3d3;
  --line-strong: #b5b4b4;
  --brand: #3f7ec0;
  --brand-deep: #1c1f3c;
  --accent: #feb37a;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 10px 26px rgba(28, 31, 60, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 300;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(63, 126, 192, 0.12), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(242, 112, 155, 0.12), transparent 24%),
    var(--bg);
}

.container {
  width: min(1200px, 100% - 2.4rem);
  margin: 0 auto;
}

.header {
  margin: 1rem auto 0;
  width: min(1200px, 100% - 2.4rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.hero {
  min-height: 38vh;
  padding: 2.4rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.4rem 2.2rem;
  flex-wrap: wrap;
}

.hero-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  width: 100%;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand-logo {
  display: block;
  width: clamp(140px, 17vw, 220px);
  max-width: 100%;
  height: auto;
}

h2,
h3 {
  margin: 0;
  color: var(--ink);
}

.hero h1 {
  margin: 0 0 0 auto;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  line-height: 1.03;
  max-width: 14ch;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--ink);
  text-align: right;
}

.hero p {
  margin: 1rem 0 0;
  max-width: 62ch;
  color: var(--ink-muted);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.lang-switcher {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 0.5rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  min-width: 120px;
}

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  align-items: start;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.filters,
.results-panel,
.cta-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.filters {
  position: sticky;
  top: 1rem;
  padding: 1rem;
}

.filters-header,
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
}

.results-tools {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 900;
  text-transform: uppercase;
}

label,
.filter-label {
  display: block;
  margin: 0;
  font-size: 0.79rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.filter-group {
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.filters input[type="search"],
.filters select {
  width: 100%;
  margin-top: 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 0.65rem 0.7rem;
  font: inherit;
  font-size: 0.94rem;
  color: var(--ink);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.46rem;
}

.checkbox-row label {
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-muted);
  font-weight: 400;
}

input[type="checkbox"] {
  margin: 0;
  accent-color: var(--brand);
}

.results-panel {
  padding: 1rem;
}

.print-brand {
  display: none;
}

.results-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

#resultCount {
  font-weight: 700;
  color: var(--brand);
}

.grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  padding: 0.95rem;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card h3 {
  font-size: 1.03rem;
  line-height: 1.24;
  text-transform: uppercase;
  font-weight: 700;
}

.card p {
  margin: 0.55rem 0 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.meta {
  margin-top: 0.6rem;
  font-size: 0.84rem;
  color: #4f6679;
}

.meta p {
  margin: 0.18rem 0;
}

.card-actions {
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.56rem 1rem;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 140ms ease, filter 140ms ease;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(110deg, var(--brand), var(--brand-deep));
}

.btn.outline {
  color: var(--brand-deep);
  border-color: #9ab0c6;
  background: #fff;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.empty {
  margin-top: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px dashed #a8b7c7;
  background: linear-gradient(120deg, rgba(63, 126, 192, 0.08), rgba(242, 112, 155, 0.1));
  padding: 1rem;
}

.empty p {
  margin: 0.4rem 0;
}

.strong {
  font-weight: 700;
}

.hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.cta-section {
  margin-bottom: 2rem;
  padding: 1.4rem;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(110deg, rgba(63, 126, 192, 0.36), rgba(242, 112, 155, 0.36)) border-box;
  border: 1px solid transparent;
}

.cta-section h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
}

.cta-section p {
  margin: 0.66rem 0 1rem;
  max-width: 70ch;
  color: var(--ink-muted);
}

.detail-hero {
  min-height: 0;
  align-items: center;
  padding: 1.4rem 2.4rem;
}

.detail-main {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 1.2rem;
}

.detail-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 900;
  text-transform: uppercase;
}

.detail-tagline {
  margin: 0.7rem 0 1rem;
  color: var(--ink-muted);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.detail-meta p {
  margin: 0;
  font-size: 0.92rem;
}

.detail-meta-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  margin-top: 0.6rem;
}

.detail-meta-extra p {
  margin: 0;
  font-size: 0.92rem;
}

.detail-section {
  margin-top: 1.2rem;
}

.detail-section h2 {
  margin-bottom: 0.4rem;
}

.detail-section p,
.detail-section li {
  color: var(--ink-muted);
}

.detail-section ul {
  margin: 0;
  padding-left: 1.1rem;
}

.detail-cta {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
}

.agenda-module {
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.6rem;
  list-style: none;
  margin-left: -1.1rem;
}

.agenda-items {
  margin-top: 0.2rem;
  padding-left: 1.3rem;
}

.agenda-items li {
  font-weight: 400;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .hero {
    min-height: 0;
    padding: 1.7rem;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(1200px, 100% - 1.4rem);
  }

  .hero-cta,
  .hero-cta .btn,
  .lang-switcher {
    width: 100%;
  }

  .detail-hero {
    padding: 1rem;
  }

  .brand-logo {
    width: 160px;
  }

  .hero-title-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .detail-actions {
    width: 100%;
    justify-content: stretch;
  }

  .detail-actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero h1 {
    margin-left: 0;
    text-align: left;
  }

  .hero-cta .btn {
    text-align: center;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-tools {
    width: 100%;
    justify-content: stretch;
  }

  .results-tools p,
  .results-tools .btn {
    width: 100%;
  }

  .results-tools .btn {
    text-align: center;
  }

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

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body {
    background: #fff;
    font-size: 12pt;
    color: #000;
  }

  .header,
  #detailEmpty,
  .filters,
  .cta-section,
  .card-actions,
  #printResultsBtn {
    display: none !important;
  }

  .container,
  .detail-main {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .detail-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .detail-meta {
    border-color: #aaa;
    background: #fff;
  }

  .detail-section {
    break-inside: avoid;
  }

  .layout {
    display: block;
    margin: 0;
  }

  .results-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .results-header {
    margin-bottom: 0.8rem;
  }

  .print-brand {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0.7rem;
  }

  .print-brand-logo {
    width: 180px;
    max-width: 100%;
    height: auto;
  }

  .grid {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    break-inside: avoid;
    min-height: 0;
    background: #fff;
  }
}

#detailOverview {
  white-space: pre-line;
}
