/**
* Base stylesheet. Mobile-first: unprefixed rules are the mobile
* layout, @media (min-width: …) layers up for larger screens — never
* the reverse (master.md §5).
*
* Utility-class names (width--theme, mx--auto, gap--40, block--column,
* rounded--sm, button--primary/secondary/donation) reuse the live
* site's own naming, kept for visual continuity, not reinvented.
*/

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }


ul.default li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}


ul.default li::before {
  content: "";
  min-width: 24px;
  min-height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 12h16m-7-7l7 7l-7 7'/%3E%3C/svg%3E");
}


body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--bg-white);
  line-height: 1.6;
}

h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; }

h1, h2, h3, h4, h5, h6 {margin: 0px;}

/* --- Layout utilities --- */
.width--theme { max-width: var(--container-max-width); width: 100%; }
.width--theme-post {max-width: var(--post-max-width); width: 100%;}
.mx--auto { margin-left: auto; margin-right: auto; }
.gap--5 {gap: 0.25rem;}
.gap--20 {gap: 1.5rem;}
.gap--40 { gap: 2.5rem; }
.block--column { display: flex; flex-direction: column; gap: 1rem; }
.align--start {align-items: flex-start;}
.rounded--sm { border-radius: 8px; }
.d-flex {display: flex}
.flex-column {flex-direction: column;}
.align-center {align-items: center;}
.align-start {align-items: flex-start;}
.justify-center {justify-content: center;}
.justify-between {justify-content: space-between;}

.section { padding: 3rem 1.25rem; }
.section__inner { padding: 0 1.25rem; }
.bg--washed-1 { background: var(--bg-washed-1); }
.bg--washed-2 { background: var(--bg-washed-2); }
.d-none {
  display: none!important;
}

/* --- Buttons ---
 Padding differs by variant on the live site (sampled 2026-10-31):
 primary/donation 15px 20px, secondary 15px 30px. Not a typo. */
 .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.button--primary {
  background: var(--button-tertiary-color);
  color: var(--bg-white);
  padding: 15px 20px;
}

.button--primary.active {
  background: var(--button-primary-color-hover);
}

.button--primary:hover { background: var(--button-primary-color-hover); }

.button--secondary {
  background: var(--button-secondary-color);
  color: var(--button-tertiary-color);
  padding: 15px 30px;
}

.button--secondary:hover { background: var(--button-secondary-color-hover); }
.button--donation {
  color: var(--button-primary-color);
}

.button--donation:hover { color: var(--button-primary-color-hover); }

.buttons--duo {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Header / nav ---
 1280px is the live site's own nav breakpoint (sampled 2026-11-01,
 .gb-menu-toggle / .gb-menu-container) — distinct from the 768px
 tablet breakpoint below and the 1024px hero breakpoint above.
 Below 1280px the nav is a hamburger-toggled dropdown; at and above
 it the nav is always visible and the toggle button is hidden. */

.site-header {
  border-bottom: 1px solid var(--bg-washed-2);
  position: relative;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0rem 1.25rem;
}
.site-logo img { height: 100px; width: auto; }

.site-nav {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--bg-washed-2);
  padding: 0rem 1.25rem;
  order: 3;
}
.site-nav.is-open { display: flex; }

.site-nav :where(a, p) {
  font-weight: 600;
  margin: 0!important;
  cursor: pointer;
  padding: 1rem;
  color: var(--button-primary-color);
}

.site-nav :where(a:hover, p:hover) {
  color: var(--button-primary-color-hover);
}

.site-nav p {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.site-nav p::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M12 3L12 21M12 21L20.5 12.5M12 21L3.5 12.5" stroke="%23000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center / contain;
}

.site-nav .menu__inner_has.active p::after {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'><path d='M12 21L12 3M12 3L20.5 11.5M12 3L3.5 11.5' stroke='%23000000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}

.site-nav .menu__inner_has {
  position: relative;
}

.site-nav .menu__inner_has.active p {
  background: var(--bg-washed-2);
}

.site-nav .menu__inner_has ul.menu__inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
  justify-content: flex-start;
  background: var(--bg-washed-2);
  color: var(--color-text);
  padding: 1rem;
  border-top: 0.15rem solid var(--color-text);
}

.button--donation { order: 2; }

/* --- Footer --- 4 columns: 1/phone, 2/tablet (768px), 4/desktop (1025px) --- */
.site-footer {
  background: var(--bg-washed-1);
  margin-top: 3rem;
}
.site-footer__inner {
  padding: 2.5rem 1.25rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.footer-logo { height: 100px; width: auto; margin-bottom: 0.75rem; }
.footer-col p { margin: 0 0 0.5rem; }
.footer-col__heading {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.75rem;
}
.footer-col__heading--sub { margin-top: 1.5rem; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-nav a:hover { text-decoration: underline; }
.footer-cta { margin-top: 1rem; }
.footer-copyright {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-washed-2);
  text-align: center;
  opacity: 0.75;
}

/* --- Hero ---
 Values sampled directly from unfs.rs's computed styles (2026-10-31):
 logo 505x505, h1 56px/900, subheading 21px/600, radial-gradient bg
 using the secondary-button color pair, 2-col grid above 1024px
 (live site's own breakpoint for this block — flat color + single
 column below it). */
 .hero {
  background: var(--button-secondary-color-hover);
  padding: 2.5rem 1.5rem;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.hero__logo {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
}
.hero h1 {
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}
.hero__subheading {
  font-weight: 600;
  margin: 0;
}

/* --- Content header (post pages, prose pages — master.md 2026-10-31)
 Same visual pattern as .hero: image left, text right, falls back
 to the site logo when the content has no image of its own. Smaller
 image column than the homepage hero — it repeats on every page. */
 .content-header {
  background: var(--button-secondary-color-hover);
  padding: 2.5rem 1.5rem;
}
.content-header__inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.content-header__image {
  width: 100%;
  margin: 0 auto;
  height: 100%;
  object-fit: cover;
}
.content-header__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.content-header h1 {
  font-weight: 900;
  margin: 0;
}
.content-header__description {
  font-weight: 600;
  margin: 0;
}
.content-header__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.tag-pill {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  color: var(--bg-white);
  background: var(--button-primary-color);
  font-weight: 600;
}
.content-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;

}
.content-header__author {
  color: var(--button-primary-color);
  font-weight: 600;
}

/* --- Goals list --- */
.goals-list { display: flex; flex-direction: column; gap: 0.75rem; }
.goals-list li { padding-left: 1.25rem; position: relative; }
.goals-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* --- Article/post cards --- */
.grid { display: grid; gap: 1.5rem; }
.grid--cards { grid-template-columns: 1fr; }
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-text);
  border-radius: 8px;
  overflow: hidden;
  justify-content: space-between;
}
.card__image { width: 100%; height: 180px; object-fit: cover; }
.card__body { padding: 1.25rem; }

/* --- Svi Artikli pills (master.md 2026-11-01) --- */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--button-primary-color);
  background: var(--bg-white);
  color: var(--button-primary-color);
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
}
.pill--active {
  background: var(--button-primary-color);
  color: var(--bg-white);
}
.pills__status { color: var(--color-text); opacity: 0.75; }
.pills__browse { margin-top: 1.5rem; }
.card__category { align-self: flex-start; }

/* --- Accordion (Donacija page etc.) --- */
.accordion { border: 1px solid var(--bg-washed-2); border-radius: 8px; overflow: hidden; }
.accordion + .accordion { margin-top: 0.75rem; }
.accordion__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-text);
  border: none;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--bg-white);
}
.accordion__toggle::-webkit-details-marker { display: none; }
.accordion__toggle::marker { content: ""; }
.accordion__toggle::after {
  content: "+";
  line-height: 1;
  flex-shrink: 0;
}
.accordion[open] .accordion__toggle::after { content: "–"; }
.accordion__content { padding: 1.25rem; color: var(--bg-white); background: var(--color-text); border-top: 1px solid var(--bg-white); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.accordion__content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.accordion__content td { padding: 0.4rem 0; border-bottom: 1px solid var(--bg-washed-1); vertical-align: top; }
.accordion__content td:first-child { font-weight: 600; padding-right: 1rem; white-space: nowrap; }
.accordion__content td:last-child { word-break: break-word; overflow-wrap: anywhere; }

/* --- Prose pages (o-unfs etc.) --- */
.prose-page ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.prose-page li { margin-bottom: 0.4rem; }
.prose-page h3 { margin-top: 2rem; }

.table-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.prose-page table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; }
.prose-page th, .prose-page td { border: 1px solid var(--color-text); padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
.prose-page th { background: var(--color-text); color: var(--bg-white); font-weight: 600; }

/* --- Cookie consent banner --- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: var(--bg-white);
  border-top: 1px solid var(--bg-washed-2);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  padding: 1.25rem;
  padding-top: 2.5rem;
}

.cookie-banner__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
}

.cookie-banner__close:hover { opacity: 1; }

.cookie-banner__main {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-banner__main p { margin: 0; color: var(--color-text); }

.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.cookie-banner__settings {
  max-width: var(--container-max-width);
  margin: 0 auto 1rem;
  padding: 1rem;
  background: var(--bg-washed-1);
  border-radius: 8px;
}

.cookie-banner__settings-heading { font-weight: 600; margin: 0 0 0.75rem; }

.cookie-banner__toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
}

.cookie-banner__toggle input { margin-top: 0.2rem; }
.cookie-banner__toggle span { color: var(--color-text); opacity: 0.75; font-size: 0.9rem; }

.cookie-banner__subgroup { margin: -0.2rem 0 0.6rem 1.7rem; }
.cookie-banner__toggle--sub { margin-bottom: 0.4rem; }

@media (min-width: 768px) {
  .cookie-banner__main { flex-direction: row; justify-content: space-between; align-items: center; }
  .cookie-banner__main p { max-width: 60%; }
}

/* --- Blocked-embed overlay (cookie-consent.js promotes/hides it) --- */
.cookie-gate { position: relative; }
.cookie-gate iframe { width: 100%; display: block; }

.cookie-gate__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 1.5rem;
  background: var(--color-text);
  color: var(--bg-white);
}

.cookie-gate__overlay p { margin: 0; max-width: 32ch; }

/* ================= Tablet / desktop ================= */
@media (min-width: 768px) {
  .buttons--duo { flex-direction: row; }
  .grid--cards { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1025px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Nav breakpoint — matched to the live site's own 1280px, not the
 768px tablet breakpoint above (master.md 2026-11-01). */
 @media (min-width: 1281px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    position: static;
    border-bottom: none;
    padding: 0;
    order: 2;
  }

  .site-nav .menu__inner_has ul.menu__inner{
    position: absolute;
    top: 100%;
    width: 100%;
    left: 0%;
  }
  .button--donation { order: 3; }
}

/* 1024px is the live site's own breakpoint for the hero/content-header
 grid and gradient (not the 768px one above) — matched exactly
 rather than folded into the block above. */
 @media (min-width: 1025px) {
  .hero {
    background: radial-gradient(var(--button-secondary-color-hover) 40%, var(--button-secondary-color) 60%);
    padding: 100px 24px;
  }
  .hero__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    text-align: left;
  }
  .hero__logo { max-width: 505px; margin: 0; }
  .hero__text { align-items: flex-start; }

  .content-header {
    background: radial-gradient(var(--button-secondary-color-hover) 40%, var(--button-secondary-color) 60%);
    padding: 3rem 24px;
  }
  .content-header__inner {
    grid-template-columns: 30% 1fr;
    gap: 2.5rem;
    text-align: left;
  }
  .content-header__image { margin: 0; }
  .content-header__text { align-items: flex-start; }
  .content-header__tags, .content-header__meta { justify-content: flex-start; }
}


.grid--2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .grid--2col { grid-template-columns: 1fr 1fr; }
}

@media(min-width: 1280px) {
  .position-reverse .grid--2col img {
    order: 1;
  }
}
/* --- Forms (registration/login) — master.md, forms layer, 2026-11-04 --- */
.form-page { max-width: 480px; }
.form-page form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; }

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field__label { font-weight: 600; }
.form-field__input {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-text);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.form-field__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
}

/* Category selector etc. — styled as a segmented button group rather
   than plain radios. Native <input type="radio"> stays in the DOM
   (visually hidden, not display:none) so keyboard nav, focus and
   form submission all still work; the <label> itself is the button
   face, toggled via :has() on its checked state (2026-11-14). */
.form-field__radio-group { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.form-field__radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border: 2px solid var(--button-primary-color);
  border-radius: 8px;
  background: var(--bg-white);
  color: var(--button-primary-color);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.form-field__radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.form-field__radio:hover { background: var(--button-secondary-color-hover); }
.form-field__radio:has(input:checked) {
  background: var(--button-primary-color);
  color: var(--bg-white);
}
.form-field__radio:has(input:checked):hover { background: var(--button-primary-color-hover); }
.form-field__radio:has(input:focus-visible) {
  outline: 2px solid var(--button-primary-color-hover);
  outline-offset: 2px;
}
.form-field__textarea { width: 100%; resize: vertical; min-height: 120px; }
.form-field--error .form-field__input { border-color: var(--color-danger); }
.form-field__error { color: var(--color-danger); font-size: 0.9rem; margin: 0; }

/* --- Toast (one-shot flash messages) — 2026-11-04 --- */
.toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  background: var(--bg-white);
  border: 1px solid var(--bg-washed-2);
  border-left: 4px solid var(--button-primary-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 0.9rem 2.5rem 0.9rem 1rem;
  max-width: 360px;
  font-size: 0.95rem;
  color: var(--color-text);
  animation: toast-in 0.2s ease-out;
}
.toast--error { border-left-color: var(--color-danger); }
.toast__close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
  opacity: 0.5;
}
.toast__close:hover { opacity: 1; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
