/* Atlas 1.6.0 — editorial data-product layer.
   Loaded after the stable 1.4 stylesheet so Maps and runtime contracts stay intact. */

:root {
  --atlas-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --atlas-forest: #032f20;
  --atlas-forest-deep: #001f16;
  --atlas-cream: #f7f7f1;
  --atlas-hairline: rgba(7, 47, 32, .14);
}

body { background: var(--atlas-cream); }
body.is-filter-open { overflow: hidden; }

.atlas-hero {
  min-height: 452px;
  color: #fff;
  border-bottom: 0;
  background:
    radial-gradient(circle at 80% 36%, rgba(156,228,59,.12), transparent 24%),
    linear-gradient(92deg, rgba(0,28,19,.99) 0%, rgba(2,51,34,.96) 52%, rgba(4,66,43,.9) 100%),
    url("../images/atlas-terrain.webp") center 48% / cover;
}

.atlas-hero::before {
  width: 760px;
  height: 520px;
  top: -80px;
  right: 4%;
  border: 0;
  border-radius: 0;
  opacity: .13;
  background: url("../images/croatia-map.svg") center / contain no-repeat;
  filter: grayscale(1) brightness(2.3);
  transform: rotate(-3deg);
}

.atlas-hero::after {
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  opacity: .36;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  transform: none;
}

.atlas-hero__inner {
  min-height: 452px;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .55fr);
  align-items: center;
  gap: clamp(42px, 6vw, 100px);
  padding-block: 42px 58px;
}

.atlas-hero__copy { min-width: 0; }
.atlas-hero__copy .eyebrow { margin-bottom: 15px; color: var(--lime); }
.atlas-hero h1 {
  max-width: 980px;
  color: #fff;
  font-family: var(--atlas-serif);
  font-size: clamp(62px, 6.7vw, 104px);
  font-weight: 600;
  line-height: .86;
  letter-spacing: -.064em;
}
.atlas-hero h1 span { display: block; }
.atlas-hero h1 span:last-child { color: var(--lime); }

.atlas-hero__copy > .atlas-hero__promise {
  max-width: 740px;
  margin-top: 23px;
  color: #fff;
  font-family: var(--atlas-serif);
  font-size: clamp(20px, 1.55vw, 28px);
  line-height: 1.14;
}

.atlas-hero__copy > .atlas-hero__lead {
  max-width: 720px;
  margin-top: 9px;
  color: rgba(255,255,255,.72);
  font-size: 15px;
}

.atlas-hero .hero-actions { margin-top: 20px; }
.atlas-hero .button--outline { color: #fff; border-color: rgba(255,255,255,.46); background: rgba(255,255,255,.06); }
.atlas-hero .button--outline:hover { border-color: #fff; background: rgba(255,255,255,.12); }

.atlas-stats {
  width: min(100%, 650px);
  margin-top: 22px;
  padding: 0;
  color: #fff;
  border-color: rgba(255,255,255,.15);
  border-radius: 10px;
  background: rgba(0,25,17,.38);
  box-shadow: none;
}
.atlas-stats div { min-height: 58px; border-color: rgba(255,255,255,.14); }
.atlas-stats dt { color: rgba(255,255,255,.57); }
.atlas-stats dd { color: #fff; font-size: 25px; }
.atlas-stats-note { display: block; margin: 8px 0 0 !important; color: rgba(255,255,255,.55) !important; font-size: 11px !important; }

.atlas-hero__partner { align-self: center; }
.detail-sponsor--hero {
  padding: 24px;
  color: #fff;
  border-color: rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(0,29,19,.72);
  box-shadow: 0 24px 70px rgba(0,20,13,.28);
  backdrop-filter: blur(16px);
}
.detail-sponsor--hero::before { background: var(--lime); }
.detail-sponsor--hero .detail-sponsor__label { color: var(--lime); }
.detail-sponsor--hero .detail-sponsor__mark { color: var(--forest-900); background: var(--lime); }
.detail-sponsor--hero .detail-sponsor__copy strong { color: #fff; }
.detail-sponsor--hero .detail-sponsor__copy p,
.detail-sponsor--hero .detail-sponsor__disclosure { color: rgba(255,255,255,.65); }
.detail-sponsor--hero .detail-sponsor__disclosure { border-color: rgba(255,255,255,.14); }
.detail-sponsor--hero .detail-sponsor__link { color: var(--lime); }

.atlas-section {
  position: relative;
  z-index: 5;
  margin-top: -24px;
  padding-block: 0 54px;
}

.atlas-commandbar {
  min-height: 66px;
  padding: 8px 12px 8px 20px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(115deg, #001f16, #06462f);
  box-shadow: 0 20px 46px rgba(1,38,25,.16);
}
.atlas-commandbar__identity strong { font-family: var(--atlas-serif); font-size: 17px; font-weight: 600; }
.atlas-commandbar__identity small { letter-spacing: .12em; }
.atlas-commandbar__actions button { border-radius: 9px; }

.atlas-filterbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(270px, 430px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  background: rgba(255,255,255,.97);
}
.atlas-filterbar .search-field input { min-height: 44px; background: #f7faf7; }
.active-filter-chips { min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.active-filter-chips:empty::before { content: "Svi provjereni zapisi"; color: var(--muted); font-size: 12px; }
.active-filter-chips button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #c9d8cb;
  border-radius: 999px;
  color: var(--forest-800);
  background: #f5faf4;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.active-filter-chips button > span { font-size: 15px; line-height: 1; }
.all-filters-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #b9cbbd;
  border-radius: 9px;
  color: var(--forest-900);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.all-filters-button svg { width: 18px; height: 18px; }
.all-filters-button span { min-width: 21px; padding: 2px 6px; border-radius: 99px; color: var(--forest-950); background: var(--lime); font-size: 11px; text-align: center; }

.atlas-layout,
.atlas-layout.is-list-view {
  height: clamp(690px, calc(100dvh - 104px), 830px);
  min-height: 690px;
  grid-template-columns: 300px minmax(540px, 1fr);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 18px 45px rgba(1,39,25,.12);
}
.atlas-layout.has-detail,
.atlas-layout.is-list-view.has-detail { grid-template-columns: 300px minmax(480px, 1fr) 350px; }
.detail-panel[hidden] { display: none !important; }

.results-panel { position: relative; }
.results-summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfb;
  font-size: 12px;
}
.results-summary > span { color: var(--ink); white-space: nowrap; }
.results-summary small { max-width: 125px; color: var(--muted); line-height: 1.25; text-align: right; }
.filter-form {
  position: absolute;
  z-index: 20;
  inset: 0;
  padding: 15px;
  border: 0;
  background: rgba(255,255,255,.99);
  box-shadow: 18px 0 40px rgba(2,47,31,.13);
  overflow-y: auto;
}
.filter-form[hidden] { display: none; }
.filter-form.is-open { display: block; }
.filter-heading { margin: 0 0 13px; }
.filter-heading__actions { display: flex; align-items: center; gap: 10px; }
.filter-heading__actions #filterClose { width: 44px; height: 44px; border-radius: 50%; color: var(--ink); background: #edf4ed; font-size: 22px; text-decoration: none; }
.filter-review-note { margin: 8px 0 0; padding: 10px; border-radius: 8px; color: var(--muted); background: #f4f7f2; font-size: 11px; }

.result-list { gap: 8px; padding: 10px; }
.result-card {
  min-height: 88px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 9px;
  border-color: #dce5dd;
  border-radius: 9px;
  box-shadow: 0 2px 0 rgba(7,47,32,.02);
}
.result-card__theme { width: 48px; height: 48px; border-radius: 8px; }
.result-card .verification-badge { min-height: 24px; padding-inline: 6px; font-size: 10px; }
.result-card__source { min-width: 0; display: flex; align-items: center; gap: 4px; margin-top: 3px; overflow: hidden; color: #718078; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.result-card__source svg { width: 12px; height: 12px; flex: 0 0 auto; }
.results-foot { min-height: 38px; display: flex; align-items: center; }

.map-toolbar { min-height: 50px; padding-inline: 14px; background: #fff; }
.map-stage { background: #dbe9db; }
.map-intro[hidden] { display: none !important; }
.map-legend {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  bottom: auto;
  display: block;
  width: 164px;
  padding: 0;
  border: 1px solid rgba(0,57,35,.18);
  border-radius: 9px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.map-legend summary { min-height: 42px; display: flex; align-items: center; padding: 0 12px; color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.map-legend summary::-webkit-details-marker { display: none; }
.map-legend summary::after { content: "+"; margin-left: auto; font-size: 17px; }
.map-legend[open] summary::after { content: "−"; }
.map-legend > div { display: grid; gap: 7px; padding: 0 12px 12px; }
.map-legend span { display: flex; align-items: center; gap: 7px; color: #455b50; font-size: 11px; }
.map-stage.is-google .map-legend { display: block; }

.detail-panel { border-left: 1px solid var(--line); }
.detail-hero { min-height: 188px; background: linear-gradient(135deg, #013522, #07583a); }
.detail-hero h2 { font-family: var(--atlas-serif); font-weight: 600; }
.detail-scroll { padding: 20px; }
.detail-primary-link { border-radius: 8px; }

.support-section { padding-block: 4px 64px; }
.support-section .section-heading { margin-bottom: 20px; }
.support-section .section-heading h2 { font-family: var(--atlas-serif); font-size: clamp(34px, 3vw, 48px); font-weight: 600; }
.call-grid { gap: 12px; }
.call-card {
  min-height: 330px;
  padding: 20px;
  border-top-width: 1px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(4,48,31,.06);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.call-card:hover { transform: none; box-shadow: 0 12px 32px rgba(4,48,31,.1); }
.call-card__category { width: 42px; height: 42px; justify-content: center; border-radius: 50%; color: #fff; background: var(--call-accent); font-size: 0; }
.call-card__category svg { width: 20px; height: 20px; }
.call-card__institution { margin-top: 14px; }
.call-card h3 { font-family: var(--atlas-serif); font-size: 21px; font-weight: 600; }

.methodology { padding-block: 38px 32px; background: linear-gradient(120deg, #00271a, #064a32); }
.methodology .section-heading { align-items: center; margin-bottom: 16px; }
.methodology .section-heading h2 { font-family: var(--atlas-serif); font-size: clamp(30px, 2.6vw, 43px); font-weight: 600; }
.text-link--light { color: var(--lime); text-decoration: none; }
.method-grid { border-radius: 10px; }
.method-grid article { position: relative; min-height: 132px; padding: 20px; }
.method-grid article:not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: -9px; z-index: 2; color: var(--lime); font-size: 17px; transform: translateY(-50%); }
.method-grid h3 { margin: 11px 0 5px; font-family: var(--atlas-serif); font-size: 19px; font-weight: 600; }
.method-grid p { font-size: 12px; }
.source-note { margin-top: 12px; padding-block: 11px; }

.contribution-cta { padding-block: 32px; background: #eef3ec; }
.contribution-cta__inner {
  min-height: 142px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 26px 30px;
  border: 1px solid var(--atlas-hairline);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(3,46,30,.07);
}
.contribution-cta__icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; color: var(--forest-900); background: var(--lime-soft); }
.contribution-cta__icon svg { width: 28px; height: 28px; }
.contribution-cta .eyebrow { margin-bottom: 4px; }
.contribution-cta h2 { margin: 0; color: var(--ink); font-family: var(--atlas-serif); font-size: clamp(25px, 2.2vw, 36px); font-weight: 600; line-height: 1.08; }
.contribution-cta p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 1320px) {
  .atlas-hero h1 { font-size: clamp(60px, 7vw, 88px); }
  .atlas-layout,
  .atlas-layout.is-list-view { grid-template-columns: 285px minmax(430px, 1fr); }
  .atlas-layout.has-detail,
  .atlas-layout.is-list-view.has-detail { grid-template-columns: 285px minmax(410px, 1fr) 330px; }
}

@media (max-width: 1180px) {
  .atlas-hero__inner { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); }
  .atlas-layout,
  .atlas-layout.is-list-view,
  .atlas-layout.has-detail,
  .atlas-layout.is-list-view.has-detail { grid-template-columns: 295px minmax(0, 1fr); }
  .detail-panel {
    position: fixed;
    z-index: 210;
    right: 0;
    bottom: 0;
    left: 0;
    width: min(720px, 100%);
    height: min(80dvh, 780px);
    margin: auto;
    border: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 60px rgba(0,35,21,.29);
    transform: translateY(105%);
    transition: transform .25s ease;
  }
  .detail-panel.is-open { transform: translateY(0); }
  .detail-panel::before { content: ""; width: 48px; height: 4px; flex: 0 0 auto; align-self: center; margin: 8px 0 0; border-radius: 99px; background: #c7d1ca; }
  .sheet-backdrop { position: fixed; z-index: 200; inset: 0; display: block; background: rgba(0,25,15,.52); }
  .sheet-backdrop[hidden] { display: none; }
}

@media (max-width: 960px) {
  .atlas-hero { min-height: 0; }
  .atlas-hero__inner { min-height: 0; grid-template-columns: 1fr; gap: 26px; padding-block: 42px 54px; }
  .atlas-hero__copy { max-width: 780px; }
  .atlas-hero__partner { max-width: 620px; }
  .atlas-filterbar { grid-template-columns: minmax(260px, 1fr) auto; }
  .active-filter-chips { grid-column: 1 / -1; grid-row: 2; }
  .call-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .atlas-hero::before { width: 520px; right: -22%; opacity: .08; }
  .atlas-hero h1 { font-size: clamp(52px, 13vw, 76px); }
  .atlas-hero__copy > .atlas-hero__promise { font-size: 21px; }
  .atlas-section { margin-top: -14px; }
  .atlas-commandbar { border-radius: 0; }
  .atlas-filterbar { grid-template-columns: minmax(0, 1fr) auto; border-inline: 0; }
  .atlas-filterbar__search input { font-size: 14px; }
  .active-filter-chips { display: none; }
  .all-filters-button { padding-inline: 12px; }
  .all-filters-button > svg { display: none; }
  .atlas-layout,
  .atlas-layout.is-list-view,
  .atlas-layout.has-detail,
  .atlas-layout.is-list-view.has-detail { height: min(76dvh, 760px); min-height: 590px; grid-template-columns: 1fr; }
  .map-stage { min-height: 0; }
  .results-summary { position: sticky; z-index: 2; top: 0; }
  body.is-filter-open .atlas-section::before { content: ""; position: fixed; z-index: 220; inset: 0; background: rgba(0,25,15,.52); }
  body.is-filter-open .atlas-layout .results-panel { display: flex !important; }
  body.is-filter-open .atlas-layout .map-panel { display: none !important; }
  .filter-form {
    position: fixed;
    z-index: 230;
    inset: auto 0 0;
    width: min(620px, 100%);
    max-height: min(86dvh, 760px);
    margin: auto;
    padding: 18px 18px max(22px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 60px rgba(0,35,21,.29);
  }
  .mobile-atlas-bar { margin-top: -71px; }
  .support-section { padding-top: 48px; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .method-grid article:not(:last-child)::after { display: none; }
  .contribution-cta__inner { grid-template-columns: auto 1fr; }
  .contribution-cta .button { grid-column: 2; justify-self: start; }
}

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

@media (max-width: 570px) {
  .atlas-hero h1 { font-size: clamp(47px, 14.5vw, 64px); }
  .atlas-hero__inner { padding-block: 34px 46px; }
  .atlas-hero .hero-actions { grid-template-columns: 1fr; }
  .atlas-stats { grid-template-columns: 1fr 1fr; }
  .atlas-stats div { min-height: 56px; }
  .atlas-stats div:nth-child(-n+2) { border-bottom-color: rgba(255,255,255,.14); }
  .atlas-filterbar { padding-inline: 10px; }
  .all-filters-button { font-size: 0; }
  .all-filters-button::before { content: "Filtri"; font-size: 12px; }
  .all-filters-button span { font-size: 10px; }
  .map-legend { width: 142px; max-height: none; }
  .map-legend > div { max-height: 180px; overflow-y: auto; }
  .mobile-atlas-bar { grid-template-columns: 1fr auto auto; }
  .mobile-atlas-bar strong { display: none; }
  .mobile-atlas-bar { grid-template-columns: 1fr 1fr; }
  .mobile-atlas-bar button { justify-content: center; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article { min-height: 112px; }
  .contribution-cta__inner { grid-template-columns: 1fr; padding: 24px 20px; text-align: left; }
  .contribution-cta__icon { width: 52px; height: 52px; }
  .contribution-cta .button { grid-column: auto; width: 100%; justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-panel { transition: none; }
}

@media (forced-colors: active) {
  .atlas-hero h1 span:last-child { color: CanvasText; }
  .detail-sponsor--hero { border: 1px solid CanvasText; }
}
