/* home.css — the front page.
   Colours that arrive as inline custom properties (--hm-hero-grad, --hm-card-bg,
   --hm-card-scrim) come from the live Elementor stylesheet through
   content/pages/pocetna.json, so the palette is the site's own rather than a
   guess. Everything else uses the tokens in tokens.css. */

.page-home {
  --hm-beige: #fae3ba;      /* O nama / Estetika cards */
  --hm-cream: #f0ede4;      /* Zdravlje / Edukacije cards */
  --hm-deep: #17403c;       /* NAD+ card */
  --hm-faq-beige: #fbeccf;  /* open FAQ panel */
  --hm-band: #0e2a22;       /* green band overlay */
  --hm-tint: #f1f8f4;       /* section wash */
}

/* ================================================================== hero */
.hm-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--hm-hero-grad, linear-gradient(249deg, #0f3c3a 0%, #062221 100%));
  color: var(--mm-cream);
  min-height: clamp(420px, 62vh, 620px);
  display: flex;
  align-items: center;
  padding: clamp(56px, 9vw, 104px) 0;
}

/* Repeating line texture the live hero carries over its gradient. */
.hm-hero__texture {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--hm-texture);
  background-size: cover;
  background-position: center;
  opacity: var(--hm-texture-op, 0.5);
  pointer-events: none;
}

.hm-hero__media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 62%;
  z-index: -1;
  /* The scrim below starts at a FLAT colour (#0b312f), but the hero behind it
     is a 249deg gradient, so the two only agree on one row — everywhere else
     the container's left edge showed as a visible vertical seam. Fading the
     whole layer (photo + scrim) out to nothing lets the hero gradient itself
     come through, so the join is smooth at every height. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20%);
  mask-image: linear-gradient(90deg, transparent 0, #000 20%);
}
.hm-hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
/* Left-to-right scrim: keeps the headline legible over the photograph
   without darkening the face on the right. */
.hm-hero__scrim {
  position: absolute;
  inset: 0;
  background: var(--hm-scrim, linear-gradient(90deg, #0b312f 0%, #00000000 57%));
}

.hm-hero__inner {
  position: relative;
  max-width: var(--mm-container);
  /* full container width: as a fit-content flex item with auto margins the
     block centered itself — owner wants the text flush left in the container */
  width: 100%;
}
.hm-hero__title {
  color: var(--mm-cream);
  max-width: 12ch;
  margin: 0 0 18px;
  font-size: clamp(38px, 6.2vw, 74px);
  line-height: 1.04;
}
.hm-hero__title em { font-style: normal; color: var(--mm-gold-light); }
.hm-hero__lead {
  max-width: 46ch;
  margin: 0 0 32px;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.75;
  color: rgba(246, 249, 247, 0.86);
}

/* -------------------------------------------------------- gold pill CTA */
.hm-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 219px;
  height: 48px;
  padding: 0 0 0 25px;
  border-radius: 15px;
  background: var(--mm-gold-light);
  color: #012323;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(1, 35, 35, 0.1);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s;
}
.hm-cta:hover {
  color: #012323;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(1, 35, 35, 0.2);
}
.hm-cta > span:first-child { flex: 1 1 auto; white-space: nowrap; }
.hm-cta__icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #012323;
}
.hm-cta__icon svg { width: 20px; height: 20px; fill: var(--mm-gold-light); }
.hm-cta--light { background: var(--mm-gold-light); }

/* ========================================================== intro cards */
.hm-cards { padding: clamp(28px, 5vw, 56px) 0 0; }
.hm-cards__grid {
  display: grid;
  gap: 22px;
  /* Column-major on desktop: the live layout is three stacks of two, and the
     JSON preserves that reading order (O nama/Naš tim, Zdravlje/Estetika,
     NAD+/Edukacije). */
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(230px, auto));
  grid-auto-flow: column;
}

.hm-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px;
  border-radius: 22px;
  background: var(--hm-card-bg, var(--hm-cream));
  color: var(--mm-green);
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s;
}
.hm-card:hover {
  color: var(--mm-green);
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -22px rgba(15, 60, 58, 0.45);
}
.hm-card__icon { display: block; width: 64px; height: 64px; }
.hm-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.hm-card__body { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.hm-card__title {
  font-family: var(--mm-font-serif);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.1;
}
.hm-card__text { font-size: 14px; line-height: 1.65; opacity: 0.85; }
.hm-card__more {
  align-self: flex-start;
  margin-top: 8px;
  padding: 11px 22px;
  border-radius: var(--mm-radius-pill);
  background: var(--hm-deep);
  color: var(--mm-cream);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.25s, color 0.25s;
}
.hm-card:hover .hm-card__more { background: var(--mm-gold); color: #fff; }

/* NAD+ is the one deep-green tile, so it inverts. */
.hm-card--nad { color: var(--mm-cream); }
.hm-card--nad:hover { color: var(--mm-cream); }
.hm-card--nad .hm-card__more { background: var(--mm-gold-light); color: #012323; }

/* Naš tim is a photo tile with a bottom-up scrim instead of an icon. */
.hm-card--photo { color: #fff; min-height: 260px; }
.hm-card--photo:hover { color: #fff; }
.hm-card__bg { position: absolute; inset: 0; z-index: -2; }
.hm-card__bg img { width: 100%; height: 100%; object-fit: cover; }
.hm-card--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hm-card-scrim, linear-gradient(180deg, #17403c00 0%, #17403cfc 100%));
  opacity: var(--hm-card-scrim-op, 1);
}
.hm-card--photo .hm-card__title { color: #fff; }
.hm-card--photo .hm-card__text { color: rgba(255, 255, 255, 0.85); }

@media (max-width: 1080px) {
  .hm-cards__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}
@media (max-width: 640px) {
  .hm-cards__grid { grid-template-columns: 1fr; }
  .hm-card { padding: 24px; }
}

/* ============================================================= partners */
.hm-partners { padding: clamp(36px, 5vw, 64px) 0 0; }
.hm-partners__card {
  background: var(--mm-white);
  border-radius: 26px;
  padding: clamp(28px, 4vw, 52px);
  box-shadow: 0 26px 60px -40px rgba(15, 62, 53, 0.4);
  text-align: center;
}
.hm-partners__title {
  font-size: clamp(26px, 3.4vw, 42px);
  margin: 0 0 clamp(24px, 3vw, 40px);
}
.hm-partners__title em { font-style: italic; color: var(--mm-green); }
.hm-partners__logos {
  list-style: none;
  margin: 0 0 clamp(24px, 3vw, 36px);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 76px);
}
.hm-partners__logo {
  max-height: 46px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter 0.25s, opacity 0.25s;
}
.hm-partners__logos li:hover .hm-partners__logo { filter: none; opacity: 1; }
/* centered under the logos (owner request 2026-07-26; the old WP layout floated
   it to the left edge of the card) */
.hm-partners__card .hm-cta { float: none; margin-inline: auto; }
@media (max-width: 640px) {
  .hm-partners__logo { max-height: 34px; }
}

/* ================================================ Licencirani u oblastima */
.hm-spec { padding: clamp(48px, 7vw, 96px) 0; }
.hm-spec__title {
  font-size: clamp(24px, 3vw, 36px);
  margin: 0 0 clamp(24px, 3vw, 40px);
}
.hm-spec__title em { font-style: italic; color: var(--mm-green); }
.hm-spec__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.hm-spec__card {
  display: grid;
  grid-template-columns: 44% 1fr;
  align-items: stretch;
  min-height: 148px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--mm-white);
  border: 1px solid var(--mm-line);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.hm-spec__card:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -22px rgba(44, 40, 38, 0.4);
  border-color: var(--mm-gold-soft);
}
.hm-spec__media { display: block; overflow: hidden; background: var(--mm-cream-deep); }
.hm-spec__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hm-spec__card:hover .hm-spec__img { transform: scale(1.06); }
.hm-spec__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  padding: 20px 22px;
}
.hm-spec__name {
  font-family: var(--mm-font-serif);
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--mm-green);
  line-height: 1.15;
}
.hm-spec__desc { font-size: 12.5px; line-height: 1.6; color: var(--mm-mute); }

@media (max-width: 900px) { .hm-spec__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .hm-spec__card { grid-template-columns: 38% 1fr; min-height: 120px; }
  .hm-spec__body { padding: 14px 16px; }
}

/* ========================================================== green band */
.hm-why {
  position: relative;
  isolation: isolate;
  margin: 0 var(--mm-pad-x);
  border-radius: 26px;
  overflow: hidden;
  padding: clamp(48px, 7vw, 96px) 0;
  /* Aerial forest photo under a deep-green wash. Both the image and the wash
     opacity come from the live computed style via content/pages/pocetna.json.
     The reference screenshot in tools/shots caught this band before its lazy
     background loaded, so it shows flat sage; the photo is correct. */
  background-image: var(--hm-why-img);
  background-size: cover;
  background-position: center;
  color: var(--mm-cream);
}
.hm-why::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hm-band);
  opacity: var(--hm-band-op, 0.5);
}
.hm-why__logo { width: 132px; margin: 0 0 26px; }
.hm-why__logo img { width: 100%; filter: brightness(0) invert(1); opacity: 0.9; }
.hm-why__title {
  color: var(--mm-cream);
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1.08;
  max-width: 20ch;
  margin: 0 0 clamp(28px, 4vw, 44px);
}
.hm-why__title em { font-style: italic; color: var(--mm-cream); opacity: 0.82; }
.hm-why__faq { display: flex; flex-direction: column; gap: 15px; max-width: 1000px; }

.hm-faq { background: transparent; border: 0; border-radius: 4px; overflow: hidden; }
.hm-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 30px;
  background: var(--mm-white);
  color: #000;
  font-family: var(--mm-font-serif);
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.25;
  transition: background 0.3s ease;
}
.hm-faq summary::-webkit-details-marker { display: none; }
/* Solid triangle, matching the live .mm-arrow. */
.hm-faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #000;
  transition: transform 0.3s ease;
}
.hm-faq[open] summary { background: var(--hm-faq-beige); }
.hm-faq[open] summary::after { transform: rotate(-90deg); }
.hm-faq__body {
  background: var(--hm-faq-beige);
  padding: 0 30px 24px;
  border-radius: 0 0 4px 4px;
}
.hm-faq__body p { margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: #333; }
.hm-faq__body p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .hm-why { margin: 0; border-radius: 0; }
  .hm-faq summary { padding: 16px 18px; }
  .hm-faq__body { padding: 0 18px 18px; }
}

/* ====================================================== Celokupna briga */
.hm-care { background: var(--hm-tint); padding: clamp(48px, 7vw, 104px) 0; }
/* Three cards stacked as a deck that fans open on hover or keyboard focus,
   reproducing the live interaction. Mobile and reduced-motion get the flat
   stack the live CSS also falls back to. */
.hm-care__grid { display: flex; flex-direction: column; align-items: center; padding-top: 40px; }
.hm-care__side,
.hm-care__main {
  width: 100%;
  min-height: 280px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 40px;
  border-radius: 20px;
  background: var(--mm-white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
              margin 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.5s, box-shadow 0.5s;
}
.hm-care__side:nth-child(1) {
  background: var(--hm-cream);
  z-index: 1;
  opacity: 0.7;
  transform: scale(0.92) translateY(-70px);
}
.hm-care__side:nth-child(2) {
  background: var(--hm-faq-beige);
  z-index: 2;
  margin-top: -260px;
  transform: scale(0.96) translateY(-35px);
}
.hm-care__main { z-index: 3; margin-top: -260px; }

.hm-care__grid:hover .hm-care__side,
.hm-care__grid:hover .hm-care__main,
.hm-care__grid:focus-within .hm-care__side,
.hm-care__grid:focus-within .hm-care__main {
  margin-top: 20px;
  transform: none;
  opacity: 1;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.hm-care__side p {
  max-height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(10px);
  transition: all 0.4s ease 0.1s;
}
.hm-care__grid:hover .hm-care__side p,
.hm-care__grid:focus-within .hm-care__side p {
  max-height: 220px;
  margin-top: 20px;
  opacity: 1;
  transform: none;
}
.hm-care__text { flex: 1; padding-right: 10px; }
.hm-care__text h2 { font-size: clamp(26px, 3.6vw, 48px); margin: 0 0 22px; color: #1a1a1a; }
.hm-care__text h3 { font-size: clamp(22px, 3vw, 40px); margin: 0; color: #1a1a1a; font-family: var(--mm-font-serif); font-weight: 400; }
.hm-care__text p { font-size: 15px; line-height: 1.6; color: #4a4a4a; }
.hm-care__main p { margin: 0; }
.hm-care__icon { flex: 0 0 auto; width: 80px; height: 80px; display: grid; place-items: center; }
.hm-care__icon img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 900px) {
  .hm-care__grid { padding-top: 0; gap: 20px; }
  .hm-care__side,
  .hm-care__main {
    margin-top: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    min-height: 0;
    flex-direction: column-reverse;
    padding: 25px;
  }
  .hm-care__side p { max-height: none; opacity: 1; transform: none; margin-top: 15px; }
  .hm-care__icon { width: 50px; height: 50px; margin-bottom: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-care__grid { padding-top: 0; gap: 20px; }
  .hm-care__side,
  .hm-care__main { margin-top: 0 !important; transform: none !important; opacity: 1 !important; }
  .hm-care__side p { max-height: none; opacity: 1; transform: none; margin-top: 15px; }
}

/* ================================================= Najtraženiji tretmani */
.hm-popular { padding: 0 0 clamp(40px, 6vw, 72px); background: var(--hm-tint); }
.hm-popular__title {
  font-family: var(--mm-font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--mm-green);
  margin: 0 0 10px;
}
.hm-popular ul { margin: 0; padding-left: 20px; list-style: disc; columns: 2; column-gap: 40px; }
.hm-popular li { font-size: 14px; margin-bottom: 4px; break-inside: avoid; }
@media (max-width: 560px) { .hm-popular ul { columns: 1; } }

/* ------------------------------------------------------------ hero mobile */
@media (max-width: 860px) {
  .hm-hero { min-height: 0; padding: 48px 0 56px; }
  /* full-width photo behind the text here, and the scrim runs top-to-bottom —
     the desktop left-edge mask would just clip the picture, so drop it */
  .hm-hero__media {
    width: 100%;
    opacity: 0.42;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hm-hero__scrim { background: linear-gradient(180deg, #0b312f 18%, rgba(11, 49, 47, 0.55) 100%); }
  .hm-hero__title { max-width: none; }
  .hm-hero__lead { max-width: none; }
}
