/* ==========================================================================
   Sumedica — ginekološka ambulanta
   Custom build, bez WordPressa
   ========================================================================== */

:root {
  --brand:        #8e5a9e;
  --brand-dark:   #6f4380;
  --brand-light:  #c9a2d4;
  --brand-wash:   #f7f1f9;

  --ink:          #2c2732;
  --ink-soft:     #5f5768;
  --muted:        #857d8e;
  --line:         #e7e1ea;
  --bg:           #ffffff;
  --bg-alt:       #faf8fb;

  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 1px 2px rgba(44, 39, 50, .06), 0 8px 24px rgba(44, 39, 50, .06);
  --shadow-lg:    0 2px 4px rgba(44, 39, 50, .06), 0 18px 48px rgba(44, 39, 50, .12);

  --wrap:         1140px;
  --header-h:     76px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }

p  { text-wrap: pretty; }
a  { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 22px;
}

.section       { padding-block: clamp(60px, 9vw, 110px); }
.section--alt  { background: var(--bg-alt); }
.section--wash { background: var(--brand-wash); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- eyebrow + section head ---------- */
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.section-head          { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head--center  { margin-inline: auto; text-align: center; }
.section-head p        { margin-top: 16px; font-size: 1.08rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 28px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: .97rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .15s ease, background-color .18s ease,
              color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(142, 90, 158, .28);
}
.btn--primary:hover {
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 8px 24px rgba(142, 90, 158, .36);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn--light {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
  backdrop-filter: blur(6px);
}
.btn--light:hover { background: #fff; color: var(--brand-dark); border-color: #fff; }

/* ==========================================================================
   Traka sa obavještenjem
   ========================================================================== */
.notice {
  position: relative;
  z-index: 101;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  color: #fff;
  text-align: center;
}

.notice__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding-block: 11px;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.45;
}
.notice__inner svg { flex-shrink: 0; opacity: .9; }
.notice strong { font-weight: 700; white-space: nowrap; }

@media (max-width: 560px) {
  .notice__inner { gap: 9px; font-size: .87rem; padding-block: 10px; }
  .notice__inner svg { display: none; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { width: 132px; }

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
  position: relative;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: .96rem;
  font-weight: 500;
  transition: color .18s ease, background-color .18s ease;
}
.nav a:hover               { color: var(--brand); background: var(--brand-wash); }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }

/* dugme u navigaciji — mora nadjačati `.nav a` (veća specifičnost) */
.nav a.btn--primary,
.nav a.btn--primary:hover,
.nav a.btn--primary[aria-current="page"] { color: #fff; }
.nav a.btn--primary        { background: var(--brand); }
.nav a.btn--primary:hover  { background: var(--brand-dark); }

.header__cta { display: flex; align-items: center; gap: 12px; }

.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  white-space: nowrap;
}
.header__phone:hover { color: var(--brand); }
.header__phone svg   { flex-shrink: 0; color: var(--brand); }

/* burger */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.burger span {
  display: block;
  position: relative;
  width: 19px;
  height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  transition: background-color .2s ease;
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 19px;
  height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, top .2s ease;
}
.burger span::before { top: -6px; }
.burger span::after  { top: 6px; }

.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(460px, 74vh, 660px);
  padding-block: 80px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(50, 30, 58, .42) 0%, rgba(50, 30, 58, .60) 100%),
    linear-gradient(120deg, rgba(111, 67, 128, .55) 0%, rgba(111, 67, 128, .10) 60%);
}

.hero__inner { max-width: 800px; }
.hero .eyebrow { color: #fff; opacity: .9; }

.hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .28); }

.hero p {
  margin-top: 20px;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, .94);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .3);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
}

/* page header (unutrašnje strane) */
.page-hero {
  position: relative;
  padding-block: clamp(64px, 9vw, 112px);
  background: linear-gradient(160deg, var(--brand-wash) 0%, #fff 75%);
  border-bottom: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -110px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 212, .35) 0%, transparent 68%);
  pointer-events: none;
}
.page-hero__inner { position: relative; max-width: 760px; margin-inline: auto; }
.page-hero p { margin-top: 18px; font-size: 1.1rem; }

/* breadcrumb */
.crumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  font-size: .88rem;
  color: var(--muted);
}
.crumbs span[aria-current] { color: var(--ink); font-weight: 500; }

/* ==========================================================================
   Kartice / grid
   ========================================================================== */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  padding: 32px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow-lg);
}
.card h3 { margin-bottom: 10px; }
.card p  { font-size: .98rem; }

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--brand-wash);
  color: var(--brand);
}
.card__icon svg { width: 26px; height: 26px; }

/* split (tekst + slika) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(36px, 6vw, 76px);
}
.split--flip .split__media { order: -1; }

.split__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.split__text p + p { margin-top: 16px; }
.split__text .btn  { margin-top: 28px; }

/* ==========================================================================
   Usluge — akordeon liste
   ========================================================================== */
.svc-group + .svc-group { margin-top: 56px; }

.svc-group__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 2px solid var(--brand-wash);
}
.svc-group__num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
}
.svc-group__head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }

.svc-list { display: grid; gap: 14px; }

.svc-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.svc-item[open] { border-color: var(--brand-light); box-shadow: var(--shadow); }

.svc-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--ink);
  transition: background-color .18s ease, color .18s ease;
}
.svc-item summary::-webkit-details-marker { display: none; }
.svc-item summary:hover { background: var(--brand-wash); color: var(--brand-dark); }

.svc-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s ease;
}
.svc-item[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }

.svc-item__body {
  padding: 0 24px 22px;
  font-size: .98rem;
  color: var(--ink-soft);
}
.svc-item__body p:first-child { padding-top: 18px; border-top: 1px solid var(--line); }

/* ==========================================================================
   Galerija
   ========================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery button {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 3 / 2;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .3s ease;
}
.gallery button:hover img { transform: scale(1.06); filter: brightness(1.05); }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(26, 18, 30, .92);
  backdrop-filter: blur(4px);
}
.lightbox[open], .lightbox.is-open { display: grid; }

.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  width: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .18s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .24); }

.lightbox__close { top: 22px; right: 22px; }
.lightbox__nav--prev { left: 22px;  top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   Kontakt
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.contact-card {
  padding: 34px 28px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--brand-wash);
  color: var(--brand);
}
.contact-card h3 { margin-bottom: 14px; }
.contact-card a  { display: block; font-weight: 500; color: var(--ink); }
.contact-card a:hover { color: var(--brand); }
.contact-card address { font-style: normal; }

.map-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}
.map-frame iframe { width: 100%; height: 420px; border: 0; }

/* radno vrijeme */
.hours { display: grid; gap: 2px; }
.hours__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-size: .98rem;
}
.hours__row:last-child { border-bottom: 0; }
.hours__row dt { color: var(--ink); font-weight: 500; }
.hours__row dd { color: var(--muted); }

/* osiguranja */
.insurers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 70px);
}
.insurers img {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .62;
  transition: filter .25s ease, opacity .25s ease;
}
.insurers img:hover { filter: grayscale(0); opacity: 1; }

/* CTA traka */
.cta-band {
  position: relative;
  padding-block: clamp(56px, 8vw, 92px);
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -10%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.cta-band__inner { position: relative; max-width: 660px; margin-inline: auto; }
.cta-band h2 { color: #fff; }
.cta-band p  { margin-top: 16px; color: rgba(255, 255, 255, .9); font-size: 1.08rem; }
.cta-band .hero__actions { margin-top: 30px; }

/* ---------- forma ---------- */
.form { margin-top: 30px; }

.form__row { margin-bottom: 18px; }

.form label {
  display: block;
  margin-bottom: 7px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
}
.form label span { color: var(--brand); }

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  font-size: .97rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.form textarea { resize: vertical; min-height: 120px; }

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(142, 90, 158, .16);
}

.form input:user-invalid,
.form textarea:user-invalid { border-color: #d06060; }

.form__note {
  margin-top: 14px;
  font-size: .85rem;
  color: var(--muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding-top: clamp(52px, 7vw, 78px);
  background: #2c2732;
  color: rgba(255, 255, 255, .68);
  font-size: .95rem;
}
.footer h4 {
  margin-bottom: 18px;
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.footer a { color: rgba(255, 255, 255, .68); }
.footer a:hover { color: #fff; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: 48px;
}
.footer__logo { width: 140px; margin-bottom: 20px; }
.footer__links { display: grid; gap: 11px; }
.footer address { font-style: normal; display: grid; gap: 11px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .87rem;
  color: rgba(255, 255, 255, .5);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .burger { display: inline-flex; }
  .header__phone { display: none; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 22px 26px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav a { padding: 13px 14px; font-size: 1.02rem; }

  .nav .btn { margin-top: 12px; }

  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .contact-grid      { grid-template-columns: 1fr; }

  .split { grid-template-columns: 1fr; gap: 32px; }
  .split--flip .split__media { order: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid--4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .lightbox__nav { width: 42px; height: 42px; }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
