/* Additions for Umbraco pages that the static redesign did not have. */

/* Fotogalerija */
.gallery-wrap { padding: 0 var(--gutter) clamp(6rem, 11vw, 10rem); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.gallery__item { display: block; overflow: hidden; border-radius: 22px; aspect-ratio: 4 / 3; background: rgba(21,23,45,.06); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
@media (max-width: 960px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

/* Fotogalerija – albums */
.albums { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 3vw, 3rem) clamp(14px, 1.8vw, 28px); }
.album { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.album__media { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: rgba(21,23,45,.06); }
.album__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.album:hover .album__media img { transform: scale(1.05); }
.album__count { position: absolute; left: 14px; bottom: 14px; padding: .4em .9em; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: .78rem; }
.album__body { padding-top: 1.1rem; }
.album__meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-family: var(--f-display); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); }
.album__meta span + time::before { content: "·"; margin-right: .9rem; }
.album__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.3rem, 1.7vw, 1.6rem); line-height: 1.15; letter-spacing: -.02em; margin-top: .6rem; }
.album__more { display: inline-flex; align-items: center; gap: .5rem; margin-top: .9rem; font-family: var(--f-display); font-weight: 700; font-size: .9rem; color: var(--red); }
.album__more i { font-style: normal; transition: transform .5s var(--ease); }
.album:hover .album__more i { transform: translateX(6px); }
.albums__empty { color: var(--slate); font-size: 1.1rem; }
@media (max-width: 960px) { .albums { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .albums { grid-template-columns: 1fr; } }

/* Novosti: paginacija */
.paging { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: clamp(3rem, 6vw, 5rem); font-family: var(--f-display); font-weight: 700; }
.paging a, .paging span { min-width: 2.6rem; padding: .6rem .9rem; border-radius: 999px; text-align: center; border: 1.5px solid rgba(21,23,45,.15); }
.paging a:hover { border-color: var(--ink); }
.paging span[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Tekstne stranice: naslovi u tekstu */
.prose h2, .prose h3 { font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); margin-top: 2em; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.prose h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 18px; }
.prose img { max-width: 100%; height: auto; border-radius: 18px; }

/* Novosti: infinite scroll loader */
.nlist-more { display: flex; justify-content: center; gap: .5rem; padding: clamp(2.5rem, 5vw, 4rem) 0 0; }
.nlist-more[hidden] { display: none; }
.nlist-more__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: nlist-dot 1s var(--ease, ease) infinite; }
.nlist-more__dot:nth-child(2) { animation-delay: .15s; }
.nlist-more__dot:nth-child(3) { animation-delay: .3s; }
@keyframes nlist-dot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.ncard[id^="stranica-"] { scroll-margin-top: 7rem; }

/* Logo: colour version on light backgrounds, white version when the nav sits on a dark section or the menu is open */
.nav__logo--dual { position: relative; display: inline-block; }
.nav__logo--dual .nav__logo-white { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .3s; }
.nav__logo--dual .nav__logo-color { transition: opacity .3s; }
.nav.is-dark .nav__logo--dual .nav__logo-color,
.nav.is-dark-hero .nav__logo--dual .nav__logo-color,
body.menu-open .nav__logo--dual .nav__logo-color { opacity: 0; }
.nav.is-dark .nav__logo--dual .nav__logo-white,
.nav.is-dark-hero .nav__logo--dual .nav__logo-white,
body.menu-open .nav__logo--dual .nav__logo-white { opacity: 1; filter: none; }
body.menu-open .nav__logo--dual .nav__logo-color { filter: none; }
.loader__logo[src$=".svg"] { width: min(240px, 50vw); height: auto; }

/* Naslovnica, česta pitanja: razmak između naslova i teksta (u redesignu pravilo gađa p:last-child, a iza teksta dolazi link) */
.faq__intro > .h2 + p { color: var(--slate); margin-top: 1.6rem; max-width: 44ch; }

/* Page transition: white PKU mark instead of the heart, with a soft heartbeat
   (two short beats, then a rest), like the original heart icon but gentler. */
.pt__mark { width: clamp(84px, 9vw, 120px); height: auto; overflow: visible; transform-origin: 50% 55%; animation: pt-beat 1.4s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes pt-beat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.07); }
  28%      { transform: scale(.99); }
  42%      { transform: scale(1.04); }
  60%      { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .pt__mark { animation: none; } }

/* Novosti: paging links only without JavaScript (or if infinite scroll fails to load a page) */
.js .paging:not(.is-fallback) { display: none; }


/* O nama: "Fenilketonurija u medijima" */
.press { padding: clamp(5rem, 10vw, 9rem) 0 clamp(4rem, 8vw, 7rem); }
.press__tags { margin-top: 1.2rem; font-family: var(--f-display); font-weight: 700; letter-spacing: .02em; color: var(--red); }
.press__list { list-style: none; margin: clamp(2rem, 4vw, 3rem) var(--gutter) 0; padding: 0; border-top: 1.5px solid var(--ink); }
.press__list li { border-bottom: 1px solid rgba(21,23,45,.15); }
.press__item {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: baseline;
  padding: 1.4rem .2rem; color: var(--ink); text-decoration: none; transition: color .4s var(--ease), padding .4s var(--ease);
}
.press__item::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); border-radius: 4px; }
.press__item:hover { color: #fff; padding-left: 1.2rem; padding-right: 1.2rem; }
.press__item:hover::before { transform: scaleY(1); }
.press__source { font-family: var(--f-display); font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.press__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.25; letter-spacing: -.01em; }
.press__meta { display: inline-flex; gap: 1rem; align-items: baseline; white-space: nowrap; font-size: .9rem; color: var(--mist); }
.press__item:hover .press__meta { color: rgba(255,255,255,.7); }
.press__meta i { font-style: normal; color: var(--red); }
@media (max-width: 760px) {
  .press__item { grid-template-columns: 1fr; gap: .4rem; }
  .press__meta { white-space: normal; }
}

/* ==========================================================================
   One vertical rhythm for all content sections.
   Every section gets half the gap above and half below, so the distance between
   any two neighbouring sections is the same everywhere (--section-gap).
   Dark / boxed sections get the full gap inside so their text doesn't touch the edge.
   Pinned scroll scenes (hero, 3D explainer, photo reveal, news strip) are left as designed.
   ========================================================================== */
:root { --section-gap: clamp(4rem, 8vw, 7rem); --section-half: calc(var(--section-gap) / 2); }

/* light flow sections */
.about, .about--page, .about--quote, .topics, .join, .faq, .contact,
.split, .video, .team-wrap, .press,
.steps3-wrap, .tax, .cards3-wrap,
.nlist-wrap, .faqp, .gallery-wrap, .article__wrap, .related {
  padding-top: var(--section-half);
  padding-bottom: var(--section-half);
}

/* page hero: keep the room for the fixed nav on top, regular half gap below */
.page-hero { padding-bottom: var(--section-half); }

/* full-bleed dark sections */
.timeline, .donate { padding-top: var(--section-gap); padding-bottom: var(--section-gap); margin-top: var(--section-half); margin-bottom: var(--section-half); }

/* boxed / inset blocks: same breathing room inside, half gap around */
.paybox { padding-top: var(--section-gap); padding-bottom: var(--section-gap); margin-top: var(--section-half); margin-bottom: var(--section-half); }
.ask { padding-top: var(--section-half); }
.ask__inner, .cta-band { padding-top: var(--section-gap); padding-bottom: var(--section-gap); }
.cta-band { margin-top: var(--section-half); }

/* the pager under an article is a thin bar, no extra space around it */
.pager { margin: 0; }


/* News images: fill the frame instead of letterboxing narrower/taller photos */
.ncard__media img,
.card__img img,
.article__media img { object-fit: cover; object-position: center; }
.article__media { overflow: hidden; }
/* article image: show the whole frame (no parallax overscan, which hid the bottom edge) */
.article__media img { height: 100%; transform: none !important; }

/* "Prati novosti" push button (news list hero) */
.push-btn { display: inline-flex; align-items: center; gap: .6em; }
.push-btn[hidden] { display: none; }
.push-btn__icon { width: 1.15em; height: 1.15em; fill: currentColor; position: relative; z-index: 1; }
.push-btn > span { position: relative; z-index: 1; }
.push-btn[data-state="on"] { background: var(--red); }
.push-btn[data-state="on"]::before { background: var(--ink); }
.push-btn[data-state="busy"] { opacity: .7; pointer-events: none; }
.push-btn[data-state="blocked"] { background: #8a8f98; }
.page-hero__actions:has(.push-btn) { position: relative; margin-left: auto; align-self: center; }
.push-btn { margin-left: auto; }
/* only for iPhone/blocked instructions; floats under the button so the layout never shifts */
.push-hint { position: absolute; right: 0; top: 100%; margin: .6rem 0 0; width: max-content; max-width: min(24rem, 80vw); text-align: right; font-size: .85rem; color: var(--muted, #5a6070); }

/* "Prati novosti" soft-ask dialog (shown before the browser's own permission prompt) */
.push-dialog { width: min(30rem, calc(100vw - 2rem)); border: 0; border-radius: 24px; padding: clamp(1.5rem, 4vw, 2.25rem); background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(21, 23, 45, .25); opacity: 0; transform: translateY(12px) scale(.98); animation: pushIn .28s cubic-bezier(.2,.8,.2,1) forwards; }
.push-dialog::backdrop { background: rgba(21, 23, 45, .55); backdrop-filter: blur(3px); }
.push-dialog.is-closing { animation: pushOut .2s ease forwards; }
@keyframes pushIn { to { opacity: 1; transform: none; } }
@keyframes pushOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }
.push-dialog__icon { width: 64px; height: 64px; border-radius: 18px; background: var(--paper); display: grid; place-items: center; margin-bottom: 1.1rem; }
.push-dialog__icon img { width: 52px; height: 52px; }
.push-dialog__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.35rem, 3vw, 1.65rem); line-height: 1.15; margin: 0 0 .75rem; }
.push-dialog__text { margin: 0 0 1rem; line-height: 1.55; }
.push-dialog__list { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; gap: .4rem; }
.push-dialog__list li { position: relative; padding-left: 1.6rem; line-height: 1.45; }
.push-dialog__list li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.push-dialog__note { font-size: .85rem; color: #5a6070; margin: 0 0 1.5rem; }
.push-dialog__actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.push-dialog__actions .btn > span { position: relative; z-index: 1; }
.push-dialog__no { background: none; border: 0; border-bottom: 1.5px solid currentColor; cursor: pointer; color: var(--ink); font-size: 1rem; padding: 0 0 2px; }
@media (prefers-reduced-motion: reduce) { .push-dialog, .push-dialog.is-closing { animation: none; opacity: 1; transform: none; } }
/* mobile: full-width "Prati novosti" button */
@media (max-width: 640px) {
  .page-hero__actions:has(.push-btn) { width: 100%; margin-left: 0; }
  .push-btn { width: 100%; justify-content: center; margin-left: 0; }
  .push-hint { position: static; width: auto; max-width: none; text-align: left; flex-basis: 100%; }
}

/* Donacije – thanks to sponsors */
.sponsors { padding: 0 var(--gutter) clamp(6rem, 11vw, 10rem); max-width: 1100px; }
.sponsors__text { margin-top: 1rem; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.3rem, 2.2vw, 2rem); line-height: 1.3; letter-spacing: -.02em; color: var(--ink); }
.sponsors__text p + p { margin-top: .8em; }
.sponsors__text a { color: var(--red); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.sponsors__text strong { font-weight: 800; }

/* photo grid inside a news article (old v8 media-folder macro) */
.prose .gallery--inline { grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 2em 0; }
.prose .gallery--inline .gallery__item { border-radius: 14px; }
@media (max-width: 560px) { .prose .gallery--inline { grid-template-columns: repeat(2, 1fr); } }

/* hero with actions under the lead, left aligned (album: "← Svi albumi" under place/date) */
.page-hero--stacked .page-hero__row { flex-direction: column; align-items: flex-start; gap: 1.2rem; }

/* Česta pitanja – Poveži se sa zajednicom */
.community { padding: clamp(4rem, 8vw, 7rem) 0 clamp(4rem, 8vw, 7rem); }
.community__lead { margin-top: 1rem; max-width: 60ch; color: var(--slate); font-size: 1.08rem; }
.community__list { list-style: none; margin: 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.community__item { display: flex; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.1rem; border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.community__item:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(21,23,45,.45); }
.community__icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: #1877f2; }
.community__icon svg { width: 20px; height: 20px; }
.community__item--instagram .community__icon { background: linear-gradient(45deg, #f9a43a, #e1306c 55%, #833ab4); }
.community__item--web .community__icon, .community__item--youtube .community__icon { background: var(--red); }
.community__body { display: grid; gap: .15rem; min-width: 0; }
.community__name { font-family: var(--f-display); font-weight: 700; font-size: 1rem; line-height: 1.25; }
.community__type { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mist); font-family: var(--f-display); font-weight: 700; }
.community__item i { margin-left: auto; flex: none; font-style: normal; color: var(--red); transition: transform .4s var(--ease); }
.community__item:hover i { transform: rotate(-45deg); }
@media (max-width: 960px) { .community__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .community__list { grid-template-columns: 1fr; } }
