/* The Dental House — tokeni templata, scopovani na .sec-dental-house-parallax. */

/* ============================================================
   DESIGN TOKENS — Template 16 "The Dental House"
   Niche variant: O — Praxisgemeinschaft / several practices in
   one building.
   >>> NEW variant, not in the original style guide. Rules and
       reasoning live in the BUILDER-LOG, §4l. <<<

   This template was ordered "simple". That is a constraint, not a
   shortcut: fewer devices, one shape rule, five scripts instead
   of eleven, and no section that needs JavaScript to be readable.

   Shape language: window cards — a large radius on the top two
   corners only, small on the bottom two.
   Change ONLY this file to re-skin the whole template.
   ============================================================ */

.sec-dental-house-parallax {
  /* ---------- Color ---------- */
  --c-bg:          #F7F7FA;   /* cool near-white */
  --c-bg-alt:      #EEEFF5;
  --c-white:       #FFFFFF;
  --c-surface:     #E7E9F2;   /* indigo tint for cards / fills */

  --c-primary:     #4C5B8C;   /* muted periwinkle indigo — 6.2:1 on --c-bg */
  --c-primary-dk:  #2F3A5E;   /* headings, dark sections */
  --c-primary-lt:  #8E97B8;
  --c-primary-08:  rgba(76, 91, 140, 0.08);
  --c-primary-14:  rgba(76, 91, 140, 0.14);

  /* Terracotta is the only warm colour and never covers a large
     surface. White on it clears 3.9:1 — fine for large text and UI,
     never for body copy. For terracotta TEXT use --c-accent-dk. */
  --c-accent:      #C7643F;
  --c-accent-dk:   #8E3F22;   /* 6.5:1 on --c-bg */
  --c-accent-soft: #F6E3DA;
  --c-accent-tint: rgba(199, 100, 63, 0.16);

  --c-text:        #23252E;
  --c-text-muted:  #5A5F73;   /* 5.8:1 on --c-bg */
  --c-on-dark:     #F2F3F8;
  --c-on-dark-mu:  rgba(242, 243, 248, 0.78);

  --c-line:        rgba(35, 37, 46, 0.12);
  --c-line-strong: rgba(35, 37, 46, 0.24);
  --c-line-dark:   rgba(242, 243, 248, 0.24);

  --c-whatsapp:    #128C7E;
  --c-whatsapp-dk: #0E6F63;
  --c-star:        #C98A22;

  /* ---------- Elevation ---------- */
  --sh-sm: 0 4px 14px -8px rgba(47, 58, 94, 0.20);
  --sh-md: 0 14px 32px -16px rgba(47, 58, 94, 0.28);
  --sh-lg: 0 26px 56px -22px rgba(47, 58, 94, 0.32);
  --sh-xl: 0 44px 90px -32px rgba(47, 58, 94, 0.36);

  /* ---------- Radius ----------
     The window shape is a single shorthand so a card only needs
     one class. Everything else uses the plain scale. */
  --r-xs:  8px;
  --r-sm:  12px;
  --r-md:  16px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-pill: 999px;
  --r-circle: 50%;

  --r-window:    28px 28px 10px 10px;
  --r-window-lg: 40px 40px 12px 12px;

  /* Gallery tiles are pinned at 12px: the brief asks for 10–15px
     there, and it keeps a grid of pictures from reading as arches. */
  --r-gallery: 12px;

  /* ---------- 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;

  --section-y: clamp(64px, 8vw, 112px);
  --gutter:    clamp(20px, 5vw, 48px);
  --maxw:      1200px;

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

  --fs-xs:   0.875rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1rem;
  --fs-md:   1.0625rem;
  --fs-lg:   clamp(1.125rem, 0.4vw + 1.05rem, 1.25rem);
  --fs-h4:   clamp(1.1875rem, 0.6vw + 1.05rem, 1.375rem);
  --fs-h3:   clamp(1.375rem, 0.9vw + 1.15rem, 1.75rem);
  --fs-h2:   clamp(1.875rem, 2.1vw + 1.35rem, 2.875rem);
  --fs-h1:   clamp(2.25rem, 3.2vw + 1.4rem, 3.75rem);

  --lh-tight: 1.1;
  --lh-snug:  1.22;
  --lh-body:  1.64;

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

  /* ---------- Motion ---------- */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t-base: 260ms;

  /* ---------- Layout ---------- */
  --header-h:  72px;
  --z-header: 100;
  --z-mobilebar: 90;
  --z-menu: 95;
  --z-lightbox: 200;

  --tap: 44px;
}

@media (max-width: 900px) {
  .sec-dental-house-parallax { --header-h: 62px; }
}

/* The Dental House — reset i zajedničke primitive (base.css). */

/* ============================================================
   BASE — Template 16 "The Dental House"
   Signature device: .u-window — a large radius on the top two
   corners only. One rule, used on every card on the page. That is
   the whole shape language, on purpose: this template was ordered
   simple and a second device would only compete with it.
   ============================================================ */

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

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

.sec-dental-house-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);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

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

.sec-dental-house-parallax h1, .sec-dental-house-parallax h2, .sec-dental-house-parallax h3, .sec-dental-house-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-dental-house-parallax h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 700; }
.sec-dental-house-parallax h2 { font-size: var(--fs-h2); line-height: 1.14; font-weight: 600; }
.sec-dental-house-parallax h3 { font-size: var(--fs-h3); }
.sec-dental-house-parallax h4 { font-size: var(--fs-h4); }

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

.sec-dental-house-parallax a { color: inherit; text-decoration: none; transition: color var(--t-fast) var(--ease); }
.sec-dental-house-parallax button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.sec-dental-house-parallax :focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: var(--r-xs); }
.sec-dental-house-parallax :focus:not(:focus-visible) { outline: none; }
.sec-dental-house-parallax ::selection { background: var(--c-accent-soft); color: var(--c-primary-dk); }

.sec-dental-house-parallax .u-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

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

.sec-dental-house-parallax .u-container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sec-dental-house-parallax .u-section { position: relative; padding-block: var(--section-y); }
.sec-dental-house-parallax .u-section--alt { background: var(--c-bg-alt); }

.sec-dental-house-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-dental-house-parallax .u-skip-link {
  position: absolute; top: 8px; left: 8px; z-index: 999;
  transform: translateY(-200%);
  background: var(--c-primary-dk); color: var(--c-white);
  padding: 12px 22px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 700;
}
.sec-dental-house-parallax .u-skip-link:focus { transform: translateY(0); }

/* ============================================================
   DARK SCOPE
   A section on a brand-coloured background inherits the wrong
   text colours: h2 defaults to --c-primary-dk and .u-label to
   --c-accent-dk, both tuned for light backgrounds. Put .u-dark on
   the section and the whole subtree is corrected in one place.
   (BUILDER-LOG section 4 — missed in T6, fixed from a screenshot.)
   ============================================================ */
.sec-dental-house-parallax .u-dark { color: var(--c-on-dark); }
.sec-dental-house-parallax .u-dark h1, .sec-dental-house-parallax .u-dark h2, .sec-dental-house-parallax .u-dark h3, .sec-dental-house-parallax .u-dark h4 { color: var(--c-on-dark); }
.sec-dental-house-parallax .u-dark p { color: var(--c-on-dark-mu); }
.sec-dental-house-parallax .u-dark .u-label { color: var(--c-accent-soft); }
.sec-dental-house-parallax .u-dark .u-head p { color: var(--c-on-dark-mu); }

/* ---------- Eyebrow + section head ---------- */

.sec-dental-house-parallax .u-label {
  display: inline-block;
  font-family: var(--ff-display);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-accent-dk);
}

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

/* The "smile arc" the style guide suggests, drawn as a soft curve
   under one word rather than a straight rule. */
.sec-dental-house-parallax .u-arc { position: relative; white-space: nowrap; }
.sec-dental-house-parallax .u-arc::after {
  content: "";
  position: absolute; left: -2%; right: -2%; bottom: -0.14em;
  height: 0.3em;
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  border-bottom: 5px solid var(--c-accent);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

/* ---------- Signature: the window card ---------- */

.sec-dental-house-parallax .u-window { border-radius: var(--r-window); }
.sec-dental-house-parallax .u-window--lg { border-radius: var(--r-window-lg); }

/* ---------- Pills ---------- */

.sec-dental-house-parallax .u-pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--pill-bg, var(--c-white));
  color: var(--pill-fg, var(--c-primary-dk));
  border: 1px solid var(--pill-bd, var(--c-line));
  font-family: var(--ff-display);
  font-size: var(--fs-sm); font-weight: 500;
  white-space: nowrap;
}
.sec-dental-house-parallax .u-pill--accent { --pill-bg: var(--c-accent-soft); --pill-bd: transparent; --pill-fg: var(--c-accent-dk); }
.sec-dental-house-parallax .u-pill--indigo { --pill-bg: var(--c-surface); --pill-bd: transparent; --pill-fg: var(--c-primary-dk); }

/* ---------- Stars ---------- */

.sec-dental-house-parallax .u-stars { display: inline-flex; gap: 2px; }
.sec-dental-house-parallax .u-stars svg { width: 17px; height: 17px; color: var(--c-star); }
.sec-dental-house-parallax .u-stars--lg svg { width: 21px; height: 21px; }

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

.sec-dental-house-parallax .u-btn {
  --btn-bg: var(--c-primary);
  --btn-fg: var(--c-white);
  --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px;
  padding: 13px 26px;
  border: 2px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--ff-display);
  font-size: var(--fs-md); font-weight: 600;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease-out),
              background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.sec-dental-house-parallax .u-btn svg { flex: none; width: 20px; height: 20px; }
.sec-dental-house-parallax .u-btn:hover { transform: translateY(-2px); }
.sec-dental-house-parallax .u-btn:active { transform: none; transition-duration: 60ms; }

.sec-dental-house-parallax .u-btn--solid:hover { --btn-bg: var(--c-primary-dk); }
.sec-dental-house-parallax .u-btn--line { --btn-bg: transparent; --btn-fg: var(--c-primary-dk); --btn-bd: var(--c-line-strong); }
.sec-dental-house-parallax .u-btn--line:hover { --btn-bd: var(--c-primary); --btn-bg: var(--c-white); }
.sec-dental-house-parallax .u-btn--white { --btn-bg: var(--c-white); --btn-fg: var(--c-primary-dk); }
.sec-dental-house-parallax .u-btn--white:hover { --btn-bg: var(--c-bg-alt); }
.sec-dental-house-parallax .u-btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-on-dark); --btn-bd: var(--c-line-dark); }
.sec-dental-house-parallax .u-btn--ghost:hover { --btn-bg: rgba(242, 243, 248, 0.14); --btn-bd: rgba(242, 243, 248, 0.5); }
.sec-dental-house-parallax .u-btn--wa { --btn-bg: var(--c-whatsapp); --btn-fg: #fff; }
.sec-dental-house-parallax .u-btn--wa:hover { --btn-bg: var(--c-whatsapp-dk); }
.sec-dental-house-parallax .u-btn--lg { min-height: 58px; padding: 17px 32px; font-size: var(--fs-lg); }
.sec-dental-house-parallax .u-btn--block { width: 100%; }

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

/* Hidden start state gated on .has-js (set by app.js) so a script
   failure can never leave a blank hole where content should be. */
.sec-dental-house-parallax.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.sec-dental-house-parallax.has-js [data-reveal].is-in { opacity: 1; transform: none; }

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

@media print {
  .sec-dental-house-parallax .site-head, .sec-dental-house-parallax .mobile-bar, .sec-dental-house-parallax .stage { display: none !important; }
  .sec-dental-house-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="1800" height="1100" alt="...">
     <video src="_shared/video/hero.mp4" poster="_shared/img/hero.svg"
            width="1800" height="1100" data-inline muted loop playsinline
            aria-label="..."></video>

   `data-inline` hands the element to app.js: it plays only while on
   screen, pauses when the tab is hidden, gets a pause control (WCAG
   2.2.2), and under prefers-reduced-motion the file is never
   fetched — the poster stays.

   NOTE: the parallax section is the one slot this does NOT cover.
   It uses a CSS background-image (that is what a fixed-attachment
   parallax is), and a background cannot be a video. To put a video
   there, rebuild that section as a positioned <video> — and you
   lose the fixed effect, because the two techniques are different
   things. See parallax/parallax.css.
   ============================================================ */

.sec-dental-house-parallax video { width: 100%; height: auto; }
.sec-dental-house-parallax .has-inline-video { position: relative; }

.sec-dental-house-parallax .u-mediactl {
  position: absolute;
  right: 12px; bottom: 12px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.94);
  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;
}
.sec-dental-house-parallax .u-mediactl:hover { background: #fff; }
.sec-dental-house-parallax .u-mediactl__ic { position: relative; width: 12px; height: 12px; flex: none; }
.sec-dental-house-parallax .u-mediactl__ic::before, 
.sec-dental-house-parallax .u-mediactl__ic::after {
  content: "";
  position: absolute; top: 0;
  width: 4px; height: 12px;
  border-radius: 1px;
  background: currentColor;
}
.sec-dental-house-parallax .u-mediactl__ic::before { left: 0; }
.sec-dental-house-parallax .u-mediactl__ic::after { right: 0; }
.sec-dental-house-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-dental-house-parallax .u-mediactl[aria-pressed="true"] .u-mediactl__ic::after { opacity: 0; }
.sec-dental-house-parallax .u-mediactl--compact { padding: 0; width: var(--tap); justify-content: center; }
.sec-dental-house-parallax .u-mediactl--compact .u-mediactl__tx { display: none; }

/* Sekcija parallax. */

/* ============================================================
   PARALLAX — classic fixed-attachment

   HOW IT WORKS
   The picture is a background on .stage__fixed with
   background-attachment: fixed. The browser then paints it relative
   to the VIEWPORT and clips it to the element's box, so scrolling
   the page moves the box across a picture that stays still. That is
   the whole effect — no JavaScript, no transforms.

   TWO THINGS THAT SURPRISE PEOPLE
   1. With `fixed`, `background-size: cover` covers the VIEWPORT, not
      the element. A tall element does not get a taller picture, it
      gets a different crop of the same one.
   2. The element must be opaque-free above it: anything painted over
      the section (a solid block, as below) will simply cover it.
      That is what "content scrolls over the fixed image" means.

   THE FALLBACK — read before copying this file anywhere
   iOS Safari does not scroll a fixed background; it stretches it and
   jumps. Android Chrome can stutter. So `fixed` is applied ONLY
   inside a media query that requires a fine pointer and a wide
   screen, and parallax.js adds .no-fixed for iOS on top of that.
   Everywhere else the same picture is shown with `scroll`, which
   looks like an ordinary background image — no broken layout, just
   no effect.
   ============================================================ */

.sec-dental-house-parallax .stage {
  position: relative;
  /* Room underneath for the cards that overlap the picture. */
  padding-bottom: clamp(40px, 6vw, 80px);
  background: var(--c-bg);
}

/* ---------- The fixed picture ---------- */

.sec-dental-house-parallax .stage__fixed {
  --stage-img: url("../_shared/img/stage.svg");

  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(420px, 58vw, 620px);
  padding-block: clamp(56px, 7vw, 96px);

  /* Default = the safe version. `fixed` is switched on further down,
     only where it is known to work. */
  background-image:
    linear-gradient(180deg, rgba(47, 58, 94, 0.86) 0%, rgba(47, 58, 94, 0.78) 100%),
    var(--stage-img);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: scroll;
}

/* The scrim above is not decoration. White text over a photograph
   nobody has chosen yet needs the background at or below 0.156
   relative luminance to clear 4.5:1; over a white picture that takes
   roughly 0.78 alpha of this indigo. Lower it and the section still
   looks fine on the placeholder and fails on a bright photo. */

.sec-dental-house-parallax .stage__inner { position: relative; z-index: 1; }
.sec-dental-house-parallax .stage__inner > * + * { margin-top: var(--sp-3); }
.sec-dental-house-parallax .stage__inner h2 { max-width: 18ch; }
.sec-dental-house-parallax .stage__inner p { max-width: 56ch; font-size: var(--fs-lg); line-height: 1.6; }

/* ---------- Fixed attachment, only where it behaves ----------

   (hover: hover) and (pointer: fine) is the honest test for "a
   desktop browser with a real cursor". It excludes iOS and Android
   without excluding a touch-screen laptop by width alone. The width
   check keeps small windows out as well. */

@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .sec-dental-house-parallax .stage__fixed { background-attachment: fixed; }

  /* iOS Safari reports (hover: hover) in some setups, so parallax.js
     adds this class on iOS and it wins here. */
  .sec-dental-house-parallax .no-fixed .stage__fixed { background-attachment: scroll; }
}

/* A fixed background is motion the reader did not ask for. */
@media (prefers-reduced-motion: reduce) {
  .sec-dental-house-parallax .stage__fixed { background-attachment: scroll; }
}

/* ---------- The solid blocks that scroll over it ---------- */

.sec-dental-house-parallax .stage__over {
  position: relative;
  z-index: 2;
  /* The overlap is the point: these cards ride up over the picture. */
  margin-top: clamp(-72px, -7vw, -48px);
}

.sec-dental-house-parallax .stage__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
}

.sec-dental-house-parallax .card {
  /* Opaque, not translucent — a solid block passing over the fixed
     picture is what the effect is made of. */
  background: var(--c-white);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-md);
  padding: clamp(20px, 2.2vw, 28px);
}
.sec-dental-house-parallax .card__n {
  display: block;
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-accent-dk);
}
.sec-dental-house-parallax .card h3 { margin-top: 6px; font-size: var(--fs-h4); }
.sec-dental-house-parallax .card p { margin-top: 8px; font-size: var(--fs-sm); line-height: 1.6; color: var(--c-text-muted); }

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

@media (max-width: 860px) {
  .sec-dental-house-parallax .stage__cards { grid-template-columns: 1fr; }
  .sec-dental-house-parallax .stage__over { margin-top: clamp(-40px, -6vw, -28px); }
}