/* Calm Clinical — tokeni templata, scopovani na .sec-calm-parallax. */

/* ============================================================
   DESIGN TOKENS — Template 1 "Calm Clinical"
   Niche variant: A — General / Family practice
   Source of truth for color, spacing, radius, type, motion.
   Change ONLY this file to re-skin the whole template.
   ============================================================ */

.sec-calm-parallax {
  /* ---------- Color ---------- */
  --c-bg:            #FAFBFC;
  --c-bg-alt:        #F7F9FA;
  --c-surface:       #E8F1F5;
  --c-surface-soft:  #F1F7FA;
  --c-white:         #FFFFFF;

  --c-primary:       #2C5F7C;
  --c-primary-dk:    #1B4B66;
  --c-primary-lt:    #4A8AAD;
  --c-primary-05:    rgba(44, 95, 124, 0.05);
  --c-primary-10:    rgba(44, 95, 124, 0.10);
  --c-primary-20:    rgba(44, 95, 124, 0.20);

  --c-accent:        #E8A87C;   /* warm coral — CTAs / small highlights only */
  --c-accent-dk:     #CE8657;
  --c-accent-soft:   #FBEDE2;

  --c-text:          #1F2937;
  --c-text-muted:    #566573;   /* 5.6:1 on --c-bg */
  --c-text-invert:   #FFFFFF;

  --c-border:        rgba(44, 95, 124, 0.14);
  --c-border-strong: rgba(44, 95, 124, 0.26);

  --c-whatsapp:      #128C7E;   /* AA-safe WhatsApp teal-green */
  --c-whatsapp-dk:   #0E6F63;
  --c-whatsapp-vivid:#25D366;   /* icon / glow only, never behind text */
  --c-star:          #E5A32B;
  --c-google-blue:   #4285F4;

  /* ---------- Elevation ---------- */
  --sh-xs: 0 1px 2px rgba(27, 75, 102, 0.06);
  --sh-sm: 0 2px 8px rgba(27, 75, 102, 0.07);
  --sh-md: 0 8px 24px -6px rgba(27, 75, 102, 0.12), 0 2px 6px rgba(27, 75, 102, 0.05);
  --sh-lg: 0 20px 48px -12px rgba(27, 75, 102, 0.18), 0 4px 12px rgba(27, 75, 102, 0.06);
  --sh-xl: 0 32px 72px -16px rgba(27, 75, 102, 0.24);
  --sh-focus: 0 0 0 3px var(--c-bg), 0 0 0 6px var(--c-primary-lt);

  /* ---------- Radius (soft curves are the motif) ---------- */
  --r-xs:   8px;
  --r-sm:  12px;
  --r-md:  16px;
  --r-lg:  24px;
  --r-xl:  32px;
  --r-2xl: 40px;
  --r-pill: 999px;
  --r-circle: 50%;

  /* ---------- Spacing — 8px base ---------- */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:  16px;
  --sp-4:  24px;
  --sp-5:  32px;
  --sp-6:  48px;
  --sp-7:  64px;
  --sp-8:  96px;
  --sp-9: 128px;

  --section-y: clamp(64px, 9vw, 128px);
  --gutter:    clamp(20px, 5vw, 48px);
  --maxw:      1200px;
  --maxw-text: 68ch;

  /* ---------- Typography ---------- */
  --ff-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --ff-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-xs:   0.8125rem;                          /* 13px — labels only */
  --fs-sm:   0.9375rem;                          /* 15px */
  --fs-base: 1rem;                               /* 16px minimum body */
  --fs-md:   1.0625rem;                          /* 17px */
  --fs-lg:   clamp(1.125rem, 0.4vw + 1.05rem, 1.25rem);
  --fs-h4:   clamp(1.25rem, 0.6vw + 1.1rem, 1.4rem);
  --fs-h3:   clamp(1.5rem, 1vw + 1.25rem, 1.875rem);
  --fs-h2:   clamp(2rem, 2.4vw + 1.35rem, 3rem);
  --fs-h1:   clamp(2.5rem, 4.4vw + 1.25rem, 4.25rem);

  --lh-tight: 1.12;
  --lh-snug:  1.28;
  --lh-body:  1.65;

  --ls-tight: -0.02em;
  --ls-label:  0.12em;

  /* ---------- Motion ---------- */
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-fast: 160ms;
  --t-base: 260ms;
  --t-slow: 620ms;

  /* ---------- Layout ---------- */
  --header-h: 76px;
  --z-header: 100;
  --z-mobilebar: 90;
  --z-menu: 95;    /* BELOW the header, so the burger stays clickable while open */
}

@media (max-width: 700px) {
  .sec-calm-parallax { --header-h: 64px; }
}

/* Calm Clinical — reset i zajedničke primitive (base.css). */

/* ============================================================
   BASE — reset, typography, shared primitives (buttons,
   section headers, eyebrows, smile-arc device, reveal states)
   Loaded once, before any section stylesheet.
   ============================================================ */

.sec-calm-parallax *, .sec-calm-parallax *::before, .sec-calm-parallax *::after { box-sizing: border-box; }

.sec-calm-parallax {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

.sec-calm-parallax {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.sec-calm-parallax img, .sec-calm-parallax svg, .sec-calm-parallax video { display: block; max-width: 100%; }
.sec-calm-parallax img, .sec-calm-parallax video { height: auto; }

.sec-calm-parallax h1, .sec-calm-parallax h2, .sec-calm-parallax h3, .sec-calm-parallax h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--c-primary-dk);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  margin: 0;
  text-wrap: balance;
}
.sec-calm-parallax h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
.sec-calm-parallax h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); }
.sec-calm-parallax h3 { font-size: var(--fs-h3); }
.sec-calm-parallax h4 { font-size: var(--fs-h4); }

.sec-calm-parallax p { margin: 0; text-wrap: pretty; }
.sec-calm-parallax ul, .sec-calm-parallax ol { margin: 0; padding: 0; list-style: none; }

.sec-calm-parallax a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

.sec-calm-parallax button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.sec-calm-parallax :focus-visible {
  outline: 3px solid var(--c-primary-lt);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
.sec-calm-parallax :focus:not(:focus-visible) { outline: none; }

.sec-calm-parallax ::selection { background: var(--c-accent); color: var(--c-text); }

/* ---------- Layout primitives ---------- */

.sec-calm-parallax .u-container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sec-calm-parallax .u-section { position: relative; padding-block: var(--section-y); }

.sec-calm-parallax .u-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.sec-calm-parallax .u-skip-link {
  position: absolute; top: 8px; left: 8px;
  transform: translateY(-160%);
  z-index: 999;
  background: var(--c-primary-dk); color: var(--c-white);
  padding: 12px 20px; border-radius: var(--r-sm);
  font-weight: 600; font-size: var(--fs-sm);
}
.sec-calm-parallax .u-skip-link:focus { transform: translateY(0); }

/* ---------- Section header block ---------- */

.sec-calm-parallax .u-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-body);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-primary);
}
.sec-calm-parallax .u-eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: var(--c-accent); flex: none;
}
.sec-calm-parallax .u-eyebrow--center::after {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: var(--c-accent); flex: none;
}

.sec-calm-parallax .u-head { max-width: 60ch; }
.sec-calm-parallax .u-head--center { margin-inline: auto; text-align: center; }
.sec-calm-parallax .u-head > * + * { margin-top: var(--sp-3); }
.sec-calm-parallax .u-head p {
  color: var(--c-text-muted);
  font-size: var(--fs-lg);
  max-width: 56ch;
}
.sec-calm-parallax .u-head--center p { margin-inline: auto; }

/* Signature device: soft upward smile arc under a word */
.sec-calm-parallax .u-arc { position: relative; white-space: nowrap; color: var(--c-primary); }
.sec-calm-parallax .u-arc::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: -0.24em;
  height: 0.34em;
  background:
    radial-gradient(120% 190% at 50% -85%, transparent 63%, var(--c-accent) 64%, var(--c-accent) 78%, transparent 79%);
  pointer-events: none;
}

/* ---------- Buttons ---------- */

.sec-calm-parallax .u-btn {
  --btn-bg: var(--c-primary);
  --btn-fg: var(--c-white);
  --btn-bd: transparent;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 14px 26px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--ff-display);
  font-size: var(--fs-md); font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  isolation: isolate;
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.sec-calm-parallax .u-btn svg { flex: none; }
.sec-calm-parallax .u-btn:hover { transform: translateY(-2px); }
.sec-calm-parallax .u-btn:active { transform: translateY(0); transition-duration: 60ms; }

.sec-calm-parallax .u-btn--primary { box-shadow: var(--sh-md); }
.sec-calm-parallax .u-btn--primary:hover { --btn-bg: var(--c-primary-dk); box-shadow: var(--sh-lg); }

.sec-calm-parallax .u-btn--accent { --btn-bg: var(--c-accent); --btn-fg: var(--c-text); box-shadow: var(--sh-sm); }
.sec-calm-parallax .u-btn--accent:hover { --btn-bg: var(--c-accent-dk); box-shadow: var(--sh-md); }

.sec-calm-parallax .u-btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-primary-dk); --btn-bd: var(--c-border-strong); }
.sec-calm-parallax .u-btn--ghost:hover { --btn-bg: var(--c-white); --btn-bd: var(--c-primary); box-shadow: var(--sh-sm); }

.sec-calm-parallax .u-btn--white { --btn-bg: var(--c-white); --btn-fg: var(--c-primary-dk); box-shadow: var(--sh-md); }
.sec-calm-parallax .u-btn--white:hover { --btn-bg: var(--c-surface); box-shadow: var(--sh-lg); }

.sec-calm-parallax .u-btn--wa { --btn-bg: var(--c-whatsapp); --btn-fg: var(--c-white); box-shadow: var(--sh-md); }
.sec-calm-parallax .u-btn--wa:hover { --btn-bg: var(--c-whatsapp-dk); box-shadow: var(--sh-lg); }

.sec-calm-parallax .u-btn--lg { min-height: 60px; padding: 18px 34px; font-size: var(--fs-lg); border-radius: var(--r-md); }
.sec-calm-parallax .u-btn--block { width: 100%; }

/* ---------- Soft organic background blob (max one per section) ---------- */

.sec-calm-parallax .u-blob {
  position: absolute;
  border-radius: 50% 42% 58% 46% / 48% 54% 44% 56%;
  filter: blur(2px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Scroll reveal ---------- */

/* The hidden start state is scoped to .has-js (set by app.js). If the
   script never runs, content renders normally instead of staying blank. */
.sec-calm-parallax.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.sec-calm-parallax.has-js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .sec-calm-parallax { scroll-behavior: auto; }
  .sec-calm-parallax *, .sec-calm-parallax *::before, .sec-calm-parallax *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .sec-calm-parallax.has-js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .sec-calm-parallax .site-header, .sec-calm-parallax .mobile-bar, .sec-calm-parallax .cta, .sec-calm-parallax .parallax { display: none !important; }
  .sec-calm-parallax { background: #fff; }
}

/* ============================================================
   MEDIA SLOTS — every image slot also takes a <video>

   Each slot rule is written as `:is(img,video)`, so swapping the
   tag is the whole job — sizing, crop and radius stay identical:

     <img   src="_shared/img/hero.svg" width="900" height="1120" alt="…">
     <video src="_shared/video/hero.mp4" poster="_shared/img/hero.svg"
            width="900" height="1120" data-inline muted loop playsinline
            aria-label="…"></video>

   `data-inline` hands the element to app.js, which plays it only
   while it is on screen, pauses it when the tab is hidden, adds a
   pause control (WCAG 2.2.2) and skips autoplay entirely under
   prefers-reduced-motion — the poster stays in that case.

   Keep width/height (or let the slot's aspect-ratio do it) so the
   layout does not shift while the file loads.
   ============================================================ */

/* Baseline for slots that never sized their <img> explicitly. */
.sec-calm-parallax video { width: 100%; height: auto; }

/* Parent of an inline video: only promoted when it is static, so a
   slot that already positions itself is left alone. */
.sec-calm-parallax .has-inline-video { position: relative; }

.sec-calm-parallax .u-mediactl {
  position: absolute;
  right: 10px; bottom: 10px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--sh-sm);
  color: var(--c-text);
  font-family: var(--ff-display);
  font-size: var(--fs-xs); font-weight: 600;
  cursor: pointer;
  transition: background-color var(--t-base) var(--ease);
}
.sec-calm-parallax .u-mediactl:hover { background: #fff; }
.sec-calm-parallax .u-mediactl__ic { position: relative; width: 12px; height: 12px; flex: none; }
.sec-calm-parallax .u-mediactl__ic::before, 
.sec-calm-parallax .u-mediactl__ic::after {
  content: "";
  position: absolute; top: 0;
  width: 4px; height: 12px;
  border-radius: 1px;
  background: currentColor;
}
.sec-calm-parallax .u-mediactl__ic::before { left: 0; }
.sec-calm-parallax .u-mediactl__ic::after { right: 0; }

/* paused -> the icon becomes a play triangle */
.sec-calm-parallax .u-mediactl[aria-pressed="true"] .u-mediactl__ic::before {
  left: 1px;
  width: 0; height: 0;
  border-radius: 0;
  background: none;
  border-left: 11px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.sec-calm-parallax .u-mediactl[aria-pressed="true"] .u-mediactl__ic::after { opacity: 0; }

/* Small slots (avatars, thumbnails) do not get room for a label. */
.sec-calm-parallax .u-mediactl--compact { padding: 0; width: 44px; justify-content: center; }
.sec-calm-parallax .u-mediactl--compact .u-mediactl__tx { display: none; }

/* Sekcija parallax. */

/* ============================================================
   SECTION: PARALLAX — statement band with key figures
   The moving layer is oversized (120% height) and translated
   by JS, so no gap can ever appear at the edges.
   ============================================================ */

.sec-calm-parallax .plx {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(96px, 13vw, 176px);
  color: var(--c-white);
  text-align: center;
  background: var(--c-primary-dk);
}

.sec-calm-parallax .plx__bg {
  position: absolute;
  inset: -12% 0;
  z-index: -2;
  will-change: transform;
}
.sec-calm-parallax .plx__bg :is(img,video) {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}

.sec-calm-parallax .plx__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 90% at 50% 45%, rgba(27, 75, 102, 0.62), rgba(27, 75, 102, 0.86)),
    linear-gradient(180deg, rgba(27, 75, 102, 0.72), rgba(20, 56, 76, 0.88));
}

/* ---------- Curved edges into the neighbouring sections ---------- */

.sec-calm-parallax .plx__edge {
  position: absolute;
  left: 0; right: 0;
  width: 100%;
  height: clamp(40px, 5vw, 80px);
  z-index: 1;
}
.sec-calm-parallax .plx__edge--top { top: -1px; }
.sec-calm-parallax .plx__edge--bottom { bottom: -1px; }

/* ---------- Content ---------- */

.sec-calm-parallax .plx__inner { position: relative; z-index: 2; }

.sec-calm-parallax .plx__eyebrow {
  display: inline-block;
  padding: 8px 20px;
  margin-bottom: var(--sp-4);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.sec-calm-parallax .plx__title {
  color: var(--c-white);
  max-width: 20ch;
  margin-inline: auto;
  text-shadow: 0 2px 24px rgba(12, 40, 56, 0.35);
}

.sec-calm-parallax .plx__lead {
  max-width: 58ch;
  margin: var(--sp-4) auto 0;
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.86);
}

/* ---------- Stats ---------- */

.sec-calm-parallax .plx__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  max-width: 940px;
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding: var(--sp-5) var(--sp-4);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-xl);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.sec-calm-parallax .plx__stats li {
  display: flex; flex-direction: column; gap: 6px;
  padding-inline: var(--sp-2);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.sec-calm-parallax .plx__stats li:last-child { border-right: 0; }

.sec-calm-parallax .plx__num {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 600; line-height: 1;
  letter-spacing: var(--ls-tight);
  color: var(--c-white);
  font-variant-numeric: tabular-nums;
}
.sec-calm-parallax .plx__label {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.sec-calm-parallax .plx__cta { margin-top: clamp(32px, 4vw, 48px); }

/* ---------- Breakpoints ---------- */

@media (max-width: 860px) {
  .sec-calm-parallax .plx__stats { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5) var(--sp-3); }
  .sec-calm-parallax .plx__stats li:nth-child(2n) { border-right: 0; }
  .sec-calm-parallax .plx__br { display: none; }
}

@media (max-width: 520px) {
  .sec-calm-parallax .plx__stats { grid-template-columns: 1fr; padding: var(--sp-4); gap: var(--sp-4); }
  .sec-calm-parallax .plx__stats li { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); padding-bottom: var(--sp-4); }
  .sec-calm-parallax .plx__stats li:last-child { border-bottom: 0; padding-bottom: 0; }
  .sec-calm-parallax .plx__cta { width: 100%; }
}

/* On touch devices the JS parallax is disabled — keep the frame still. */
@media (hover: none) {
  .sec-calm-parallax .plx__bg { inset: 0; transform: none !important; }
}