/* ==========================================================================
   Home (Početna) - page-specific section layouts.
   Sections reuse global components; only bespoke layout lives here.
   ========================================================================== */

/* --- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  aspect-ratio: 1880 / 1200;
  display: grid;
  place-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(2rem, 5vw, 4rem);
  color: var(--c-white);
  /* Sloj 0: fallback slika - vidi se dok se video ne učita, ako video padne,
     i kod prefers-reduced-motion (tada je video sakriven). */
  background-image: var(--hero-image, url("../img/pocetna/VT-dental-clinic-1-temp.webp"));
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
/* Desktop: hero staje u prvi ekran, isto kao heroji ostalih strana (.page-hero
   u blocks.css). Visina iz iste razmere (1880/1200), najvise 100vh - 40px, a
   najmanje 520px. Kao min-height uz height: auto, pa sadrzaj koji ne stane
   rastegne karticu umesto da se isece. */
@media (min-width: 1025px) {
  .hero {
    --hero-visina: calc((min(100vw, var(--container)) - 2 * var(--container-pad)) * 0.6383);   /* 1200 / 1880 */
    aspect-ratio: auto;
    min-height: max(32.5rem, min(var(--hero-visina), calc(100vh - 2 * var(--container-pad))));   /* 520px .. 100vh - 40px */
    /* Razmak za plutajuci header, isti gore i dole - centar ostaje na mestu, a
       na niskom prozoru hero naraste umesto da tekst udje pod header. */
    padding-block: max(clamp(2rem, 5vw, 4rem), calc(var(--anchor-top) - var(--container-pad) + 1.25rem));   /* najmanje 115px */
  }
}

/* Sloj 1: video preko fallback slike */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Sloj 2: scrim - mora iznad videa da tekst ostane čitljiv */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20,26,45,0.55) 0%, rgba(20,26,45,0.30) 45%, rgba(20,26,45,0.65) 100%);
}
/* Sloj 3: sadržaj */
.hero > .container { position: relative; z-index: 2; }
/* Bez animacije - ostaje fallback slika */
@media (prefers-reduced-motion: reduce) { .hero__video { display: none; } }

@media (max-width: 860px) {
  .hero {
    aspect-ratio: auto; min-height: 82vh;
    /* Slika za mobilni ako je uneta, inace ista kao na desktopu. */
    background-image: var(--hero-image-m, var(--hero-image, url("../img/pocetna/VT-dental-clinic-1-temp.webp")));
  }
}

/* Hero button 1 (white): translucent gold icon field, solid gold on hover */
.hero .btn--light .btn__field { background: #D8C09C26; color: var(--c-ink); }
.hero .btn--light:hover .btn__field { background: var(--c-accent); }
/* Hero button 2 (outline): gold 1px border, white text; hover fills + arrow rotates */
.hero .btn--ghost { color: var(--c-white); border: 1px solid var(--c-accent); background: #ffffff00; }
.hero .btn--ghost .btn__field { background: var(--c-accent); color: var(--c-ink); }
.hero .btn--ghost:hover { background: #ffffff33; }

/* Section: Problems ("Rešavamo…") - soft radial panel */
.section-problems {
  background: transparent radial-gradient(closest-side at 50% 28%, #FFFFFF 0%, #ECEEF1 100%) 0% 0% no-repeat padding-box;
  border-radius: 32px;
}
.section-problems .icon-tile {
  width: 55px; height: 55px;
  background-color: #D8C09C26;
  border: unset;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.section-problems .card:hover .icon-tile { background-color: #D8C09C; color: #fff; }

/* Section: Doctor - white band wrapping a light-gradient panel */
.section-doctor { background-color: #fff; box-shadow: var(--shadow-sm); padding: 40px; border-radius: 32px; }
.section-doctor > div {
  background: transparent linear-gradient(66deg, #ECEEF1 0%, #F9F9FA 100%) 0% 0% no-repeat padding-box;
  border-radius: var(--radius-lg);
}
.section-doctor .doctor-panel { background: transparent; box-shadow: none; border: none; }
.section-doctor .doctor-figure { background: none; }
.hero__inner {
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;   /* 20px */
}
.hero .overline { color: var(--c-accent); }
.hero__title {
  color: var(--c-white);
  font-size: clamp(2.4rem, 1.4rem + 2.6vw, 4rem);   /* responsive, up to 4rem */
  line-height: 1.1;
  text-wrap: balance;
  margin-top: 1.875rem;   /* 30px */
}
.hero__sub {
  color: #fff;
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.25rem);   /* responsive, up to 20px */
  max-width: 48ch;
}
.hero__actions { margin-top: 1.875rem; }   /* 30px */
.hero__actions .btn__badge { background: var(--c-accent); }
/* Hero primary CTA: gold icon, white on hover */
.hero__actions .btn--light .icon { color: var(--c-accent); }
.hero__actions .btn--light:hover .icon { color: #fff; }

/* --- Stats band -------------------------------------------------------- */
.stats-band { padding-block: 20px; }
.section-problems > .container { max-width: 1360px; }
/* stats are now individual cards (see .stat) - wrapper is a plain passthrough */
.stats-panel { padding: 0; }

/* --- Split media (diaspora dark card + video card) --------------------- */
.section-diaspora { padding-bottom: unset; }
.split-media {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}
/* Foto ide preko navy podloge - navy ostaje kao fallback dok se slika ne ucita
   i popunjava sve sto slika ne pokrije. Mobilni ima svoju sliku (vidi dole). */
.diaspora-card {
  background-color: var(--c-ink);
  background-image: var(--vtdc-bg, url("../img/pocetna/diaspora-bg.webp"));   /* --vtdc-bg: slika iz polja */
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 6.25rem;   /* 100px */
  aspect-ratio: 3 / 2;   /* grows taller if content overflows (min-height: auto) */
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;   /* 20px */
}
.diaspora-card .overline { color: var(--c-accent); }
.diaspora-card h2 { color: var(--c-white); margin-top: 1.875rem; margin-bottom: unset; max-width: 15ch; }   /* 30px */
.diaspora-card p { color: #fff; font-size: 1.125rem; max-width: 42ch; }   /* 18px */
.diaspora-card .btn { margin-top: var(--space-6); align-self: flex-start; border: 1px solid #D8C09C; }
.diaspora-card .btn__field--end .icon { width: 0.75rem; height: 0.75rem; }   /* 12px (mobilni: 11px) */

.video-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 300px;
  background: var(--c-surface-alt);
}
.video-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform var(--dur-slow) var(--ease); }
.video-card:hover img { transform: scale(1.04); }
.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.video-play span {
  display: grid;
  place-items: center;
  width: 66px; height: 66px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--c-ink);
  box-shadow: var(--shadow-md);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.video-card:hover .video-play span { transform: scale(1.08); background: var(--c-white); }
.video-play .icon { width: 1.5rem; height: 1.5rem; margin-left: 3px; }

@media (max-width: 860px) {
  .split-media { grid-template-columns: 1fr; }
  .diaspora-card { padding: clamp(1.5rem, 6vw, 2.5rem); aspect-ratio: auto; }
  .video-card { min-height: 260px; }
}

/* --- Doctor panel ------------------------------------------------------ */
.doctor-panel {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-ink-04);
  overflow: hidden;
}
.doctor-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
}
.doctor-figure {
  align-self: end;
  background:
    radial-gradient(120% 90% at 50% 100%, var(--c-accent-soft) 0%, rgba(244,236,221,0) 60%);
  padding-inline: var(--space-6);
}
.doctor-figure img { margin-inline: auto; }
.doctor-content { padding: clamp(1.5rem, 3vw, 3rem) clamp(1.5rem, 3vw, 3rem) clamp(1.5rem,3vw,3rem) 0; }
.doctor-content h2 { margin-top: 3.125rem; margin-bottom: 1.875rem; max-width: 16ch; }   /* 50px, 30px */
.doctor-content .cluster { margin-bottom: 1.875rem; }   /* 30px */
.doctor-content p { color: var(--c-body); font-size: 1.125rem; max-width: 46ch; margin-bottom: 3.125rem; }   /* 18px, 50px */

@media (max-width: 860px) {
  .doctor-grid { grid-template-columns: 1fr; }
  .section-doctor .doctor-figure { padding: unset; }
  .doctor-content { padding: 0 clamp(1.5rem,5vw,2rem) clamp(2rem,5vw,2.5rem); text-align: center; }
  .doctor-content h2, .doctor-content p { max-width: none; }
  .doctor-content .cluster { justify-content: center; }
}

/* --- Results (before/after) ------------------------------------------- */
/* Kartica se ne razvlaci preko 600px - isto pravilo kao u blocks.css. */
.ba-card { text-align: center; width: 100%; max-width: 37.5rem; margin-inline: auto; }   /* 600px */
.ba-card__media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-sm);
}
.ba-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ba-card__label { margin-top: var(--space-4); font-weight: var(--fw-semibold); color: var(--c-ink); font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.5rem); }
/* .results-cta lives in layout.css (shared: Početna + Estetika) */

/* --- Instagram feed ---------------------------------------------------- */
.section-instagram { padding-bottom: unset; }
.ig-panel {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-ink-04);
  padding: 2.5rem;   /* 40px */
}
.ig-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: 1.875rem;   /* 30px */
  flex-wrap: wrap;
}
.ig-profile { display: flex; align-items: center; gap: var(--space-3); }
/* Avatar carries the same logo treatment as the header brand tile:
   gold gradient + white logo, here as a circle with a page-bg ring. */
.ig-avatar {
  width: 5.875rem; height: 5.875rem; border-radius: 50%;   /* 94px */
  display: grid; place-items: center;
  background: linear-gradient(270deg, #D8C09C, #B59777); color: #fff;
  border: 0.625rem solid var(--c-bg);   /* 10px #F9F9FA */
}
.ig-avatar svg { width: 3.25rem; height: 2rem; }   /* 52x32 - same 1.63 ratio as the header's 74x45 */
.ig-profile__name { font-weight: var(--fw-bold); color: var(--c-ink); line-height: 1.2; font-size: 1.5rem; letter-spacing: -0.24px; }   /* 24px */
.ig-profile__handle { font-size: 1rem; color: var(--c-body); }   /* 16px */

.ig-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.25rem 2.5rem;   /* 20px 40px */
}
.ig-grid__item { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 1; position: relative; }
.ig-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.ig-grid__item:hover img { transform: scale(1.06); }
.ig-grid__item--big { grid-row: span 2; grid-column: span 1; aspect-ratio: auto; }

@media (max-width: 720px) {
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
  .ig-grid__item--big { grid-column: span 2; grid-row: span 1; aspect-ratio: 16/10; }
}

/* --- Scroll-reveal (progressive enhancement) ---------------------------
   Only hidden when JS is active (html.js). Without JS everything is visible,
   so content never depends on JavaScript running. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* Mobilni i tablet */
@media (max-width: 1024px) {
  /* Pocetna: header pluta iznad heroja pa ide 20px umesto 10px kao drugde */
  .home .site-header { padding-top: 1.25rem; }            /* 20px */
  .home .hero__inner { padding-top: 5rem; }               /* 80px */
  .stat { padding: 0.9375rem 1.25rem; }                   /* 15px 20px */

  .hero { border-radius: var(--radius-md); }              /* 24px */
  .hero__inner { padding: 1.25rem; }                      /* 20px */
  .hero .overline { font-size: 0.5rem; padding: 0.625rem 0.9375rem; }   /* 8px, 10px 15px */

  .hero__title { margin-top: 0.625rem; }                  /* 10px */
  .hero__actions { margin-top: 0.625rem; }                /* 10px */

  .section-problems { border-radius: var(--radius-md); padding: 4.375rem 1.25rem 1.25rem; }   /* 24px, 70px 20px 20px */
  .section-diaspora { margin-top: 1.875rem; }             /* 30px */

  /* Doktor: bela kartica se gasi, a svaki panel dobija svoj krem preliv */
  .section-doctor { border-radius: var(--radius-md); padding: 0.625rem; margin-top: 1.875rem; }   /* 24px, 10px, 30px */
  .section-doctor > div { background: unset; }
  .section-doctor .doctor-figure {
    border-radius: var(--radius-sm);                      /* 16px */
    background-image: linear-gradient(32deg, #ECEEF1, #F9F9FA);
  }
  .doctor-panel { border-radius: var(--radius-sm); }      /* 16px */
  .doctor-content {
    background-image: linear-gradient(32deg, #ECEEF1, #F9F9FA);
    padding: 4.375rem 0.9375rem 0.9375rem;                /* 70px 15px 15px */
    border-radius: var(--radius-sm);                      /* 16px */
    text-align: left;                                     /* ponistava centriranje sa 860px */
  }
  .doctor-content .cluster { justify-content: flex-start; }
  .doctor-content h2 { margin-top: 1.875rem; margin-bottom: 1.875rem; }   /* 30px */
  .doctor-content p { font-size: 1rem; margin-bottom: 1.875rem; }         /* 16px, 30px */
  .ba-card__media { border-radius: var(--radius-sm); }    /* 16px */

  /* Dijaspora kartica dobija foto u donjem desnom uglu (navy ostaje ispod) */
  .video-card { border-radius: var(--radius-md); }        /* 24px */
  .diaspora-card {
    border-radius: var(--radius-md);                      /* 24px */
    background-image: var(--vtdc-bg-m, url("../img/pocetna/diaspora-mobile.webp"));
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    padding: 4.375rem 1.56rem 15rem;   /* 70px 25px 240px - donji prostor za sliku */
  }
  .diaspora-card h2 { margin-top: 0.625rem; }                                  /* 10px */
  .diaspora-card .btn { margin-top: 0.625rem; }                                /* 10px */
  .diaspora-card .btn__field--end .icon { width: 0.6875rem; height: 0.6875rem; }   /* 11px */

  /* Instagram */
  .ig-panel { padding: 1.25rem; }                                          /* 20px */
  .ig-avatar { width: 4.375rem; height: 4.375rem; border-width: 7px; }     /* 70px */
  .ig-avatar svg { width: 2.1875rem; height: 1.375rem; }                   /* 35x22 */
  .ig-profile__name { font-size: 1rem; }                                   /* 16px */
  .ig-profile__handle { font-size: 0.8125rem; }                            /* 13px */
  /* dugme bez teksta - .btn .icon je u em, pa font-size vraca ikonicu */
  .ig-panel a.btn.btn--ghost.btn--sm { font-size: 0; gap: unset; }
  .ig-panel svg.icon { font-size: 1.5rem; }                                /* 24px */
  .ig-grid { gap: 1.25rem 0.625rem; grid-template-rows: auto; }            /* 20px 10px */
  .ig-grid__item { border-radius: var(--radius-sm); }                      /* 16px */
  .ig-grid__item--big { aspect-ratio: 3 / 4; height: 100%; max-width: 100%; border-radius: var(--radius-md); }   /* 24px */
}
