/* ============================================================
   Peter Spodniak — štýl webu
   Farby, písma a pravidlá podľa spodniak-DESIGN.md
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --purple: #4408b6;
  --purple-hover: #5a1fd4;
  --lilac: #8b5cf0;
  --purple-tint: #f0ecfd;
  --ink: #000711;
  --white: #ffffff;
  --body: #4f4f4f;
  --muted: #777777;
  --border: #d8d8d8;
  --border-dark: #b8b8b9;
  --surface: #eef1f6;
  --footer: #3c3e40;
  --positive: #0f6e56;

  --font: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-num: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-pill: 9999px;
  --r-card: 8px;
  --maxw: 1180px;
  --nav-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.2; font-weight: 700; }
p { margin: 0 0 16px; }
a { color: var(--purple); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Tlačidlá ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 48px; padding: 13px 30px;
  border: 0; border-radius: 9999px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background .2s ease-out, color .2s ease-out;
}
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--purple-hover); }
.btn-onblack { background: var(--white); color: var(--ink); }
.btn-onblack:hover { background: #e8e6f5; }
.btn-ghost-dark { background: transparent; color: var(--white); border: 1px solid #3a4050; }
.btn-ghost-dark:hover { border-color: var(--lilac); color: var(--lilac); }
.btn-onpurple { background: var(--ink); color: var(--white); }
.btn-onpurple:hover { background: #000; }

:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; }

.eyebrow {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 500; color: var(--purple); margin: 0 0 14px;
}
.eyebrow-dark { color: var(--lilac); }

.sec { padding: 96px 0; }
.sec-title { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 16px; }
.sec-lede { max-width: 62ch; color: var(--body); }

/* ---------- Navigácia ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { background: var(--white); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.logo {
  font-size: 18px; font-weight: 500; color: var(--ink);
  text-decoration: none; letter-spacing: -.01em;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 14px; color: var(--muted); text-decoration: none;
  padding: 6px 0; transition: color .2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--purple); }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 10px; color: var(--ink);
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 4px 0; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 24px 20px;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; font-size: 16px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: var(--white); overflow: hidden; }
.hero-in {
  display: grid; grid-template-columns: 5fr 7fr; gap: 48px;
  align-items: center; min-height: calc(100vh - var(--nav-h));
  padding: 64px 24px;
  max-width: var(--maxw); margin: 0 auto;
}
.hero-foto { align-self: center; }
.hero-foto img {
  height: min(80vh, 860px); width: auto; max-width: none;
  margin-left: auto; display: block; filter: contrast(1.04);
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 9%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 9%, #000 94%, transparent 100%);
  mask-composite: intersect;
}
.hero-text { max-width: 660px; }
.hero h1 {
  color: var(--white); font-weight: 400;
  font-size: clamp(32px, 4.6vw, 54px); line-height: 1.14;
  letter-spacing: -.02em; margin-bottom: 24px;
}
.hero-sub { font-size: 17px; line-height: 1.65; color: #b9bcc4; max-width: 52ch; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-micro { margin: 18px 0 0; font-size: 13px; color: #7c818d; }
.hero-roky {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--lilac); margin-bottom: 22px;
}
.hero-roky::before { content: ""; width: 28px; height: 1px; background: var(--lilac); }

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; min-height: 0; padding: 40px 24px 56px; gap: 32px; }
  .hero-foto { order: 2; }
  .hero-foto { margin-bottom: 0; }
  .hero-foto img { height: auto; width: 320px; margin: 0 auto; }
  .hero-text { order: 1; }
}

/* ---------- Trust pás ---------- */
.trust { border-bottom: 1px solid var(--border); background: var(--white); }
.trust-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0; padding: 44px 0;
}
.trust-item { padding: 0 22px; border-left: 1px solid var(--border); }
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-num { font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 26px; font-weight: 600; color: var(--ink); line-height: 1.15; letter-spacing: -.01em; }
.trust-lbl { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

@media (max-width: 860px) {
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 26px 0; }
  .trust-item { padding: 0 16px; }
  .trust-item:nth-child(odd) { border-left: 0; padding-left: 0; }
  .trust-item:last-child { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
}

/* ---------- Karty segmentov ---------- */
.seg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 44px; }
.seg {
  text-align: left; background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 30px; cursor: pointer; font: inherit; color: inherit;
  transition: border-color .2s, transform .2s;
}
.seg:hover { border-color: var(--purple); transform: translateY(-2px); }
.seg h3 { font-size: 19px; margin-bottom: 10px; }
.seg p { font-size: 14px; color: var(--body); margin: 0; }
.seg-more {
  display: inline-block; margin-top: 16px; font-size: 13px;
  font-weight: 500; color: var(--purple);
}
.seg-hlavny { grid-column: 1 / -1; background: var(--purple-tint); border-color: #ddd4fb; }
.seg-hlavny h3 { font-size: 23px; }

@media (max-width: 760px) { .seg-grid { grid-template-columns: 1fr; } }

/* ---------- Tmavá sekcia kalkulačiek ---------- */
.kalk { background: var(--ink); padding: 88px 24px; }
.kalk-karta {
  max-width: var(--maxw); margin: 0 auto;
  background: #0b1020; border: 1px solid #1c2333; border-radius: 16px;
  padding: 88px 24px; text-align: center;
}
.kalk-in { max-width: 660px; margin: 0 auto; }
.kalk h2 {
  color: var(--white); font-weight: 400;
  font-size: clamp(28px, 4.2vw, 44px); line-height: 1.18; margin-bottom: 20px;
}
.kalk-lede { color: #8e8e8e; font-size: 16px; margin-bottom: 32px; }
.kalk-zoznam { margin: 26px 0 0; font-size: 13px; color: #6d6d6d; line-height: 1.9; }

@media (max-width: 760px) { .kalk { padding: 56px 16px; } .kalk-karta { padding: 56px 20px; } }

/* ---------- Ako to prebieha ---------- */
.kroky { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; }
.krok { position: relative; padding-top: 26px; border-top: 2px solid var(--purple); }
.krok-c {
  font-family: var(--font-num); font-size: 13px; font-weight: 600;
  color: var(--purple); letter-spacing: .04em; margin-bottom: 8px;
}
.krok h3 { font-size: 16px; margin-bottom: 8px; }
.krok p { font-size: 14px; margin: 0; }

@media (max-width: 860px) { .kroky { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .kroky { grid-template-columns: 1fr; } }

/* ---------- Príbeh ---------- */
.pribeh { background: var(--surface); }
.pribeh-in { display: grid; grid-template-columns: 380px 1fr; gap: 56px; align-items: center; }
.pribeh-foto img { border-radius: 8px; }
.pribeh-text p { font-size: 16px; }

@media (max-width: 860px) {
  .pribeh-in { grid-template-columns: 1fr; gap: 32px; }
  .pribeh-foto img { max-width: 320px; }
}

/* ---------- Blog / referencie ---------- */
.karty3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.karta {
  border: 1px solid var(--border); border-radius: 8px; padding: 26px; background: var(--white);
}
.karta h3 { font-size: 17px; margin-bottom: 10px; }
.karta p { font-size: 14px; margin: 0; }
.karta-datum { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.placeholder { border-style: dashed; border-color: var(--border-dark); background: #fbfbfc; }
.placeholder p { color: var(--muted); font-style: italic; }

@media (max-width: 860px) { .karty3 { grid-template-columns: 1fr; } }

/* ---------- Fialový pás ---------- */
.pas { background: var(--purple); color: var(--white); padding: 72px 0; }
.pas-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.pas h2 { color: var(--white); font-size: clamp(24px, 3.2vw, 32px); font-weight: 400; margin-bottom: 8px; }
.pas p { color: #ded4fb; margin: 0; font-size: 15px; }

/* ---------- Päta ---------- */
.foot { background: var(--footer); color: #c7c9cb; padding: 64px 0 32px; font-size: 14px; }
.foot a { color: #c7c9cb; text-decoration: none; }
.foot a:hover { color: var(--white); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.foot h4 { color: var(--white); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 8px; }
.foot-logo { color: var(--white); font-size: 20px; font-weight: 500; margin-bottom: 12px; }
.foot-soc { display: flex; gap: 12px; margin-top: 16px; }
.foot-soc a {
  width: 40px; height: 40px; border: 1px solid #55585b; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.foot-soc a:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.foot-soc svg { width: 18px; height: 18px; fill: currentColor; }
.foot-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid #55585b;
  font-size: 12.5px; color: #9a9c9e; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Plávajúce tlačidlo ---------- */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--purple); color: var(--white);
  border: 0; border-radius: 9999px; cursor: pointer;
  padding: 15px 24px; font: inherit; font-size: 15px; font-weight: 500;
  box-shadow: 0 6px 24px rgba(68,8,182,.35);
  transition: background .2s;
}
.fab:hover { background: var(--purple-hover); }
.fab svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 520px) {
  .fab { right: 16px; bottom: 16px; padding: 14px 20px; font-size: 14px; }
}

/* ---------- Modálne okná ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,7,17,.6);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal.is-open { display: flex; }
.modal-box {
  background: var(--white); border-radius: 12px; max-width: 560px; width: 100%;
  max-height: 88vh; overflow-y: auto; padding: 36px; position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; font-size: 22px; color: var(--muted); line-height: 1;
}
.modal-close:hover { background: var(--surface); color: var(--ink); }
.modal-box h3 { font-size: 24px; margin-bottom: 6px; padding-right: 40px; }
.modal-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.modal-box h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; font-weight: 500; }
.modal-box ul { margin: 0 0 16px; padding-left: 20px; font-size: 14.5px; }
.modal-box li { margin-bottom: 6px; }

/* dlaždice kontaktu */
.kontakt-mriezka { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kontakt-dlazdica {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border); border-radius: 8px; padding: 16px;
  text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500;
  transition: border-color .2s, background .2s;
}
.kontakt-dlazdica:hover { border-color: var(--purple); background: var(--purple-tint); }
.kontakt-dlazdica svg { width: 22px; height: 22px; fill: var(--purple); flex: none; }
.kontakt-dlazdica small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.kontakt-siroka { grid-column: 1 / -1; }
.js-len-mobil { display: none; }
body.je-mobil .js-len-mobil { display: flex; }

@media (max-width: 520px) { .kontakt-mriezka { grid-template-columns: 1fr; } }

/* spätné volanie */
.spat-form { display: flex; gap: 10px; margin-top: 10px; }
.spat-form input {
  flex: 1; min-width: 0; border: 1px solid var(--border-dark); border-radius: 9999px;
  padding: 12px 18px; font: inherit; font-size: 15px; color: var(--ink);
}
.spat-form input:focus { border-color: var(--purple); outline: 0; box-shadow: 0 0 0 3px var(--purple-tint); }
.spat-chyba { display: none; color: #a32d2d; font-size: 13px; margin: 8px 0 0; }
.spat-form.má-chybu input { border-color: #a32d2d; }
.spat-hotovo { display: none; color: var(--positive); font-size: 14px; margin: 10px 0 0; }

/* ---------- Odkrývanie pri scrollovaní ---------- */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.je-vidno { opacity: 1; transform: none; transition: opacity .4s ease-out, transform .4s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* ---------- Zdravotná poisťovňa: vedie mimo web, preto vyzerá inak ---------- */
.nav-zp {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--purple); color: #fff !important;
  padding: 11px 18px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background-color .2s ease-out;
}
.nav-zp:hover { background: var(--purple-hover); }
.nav-zp svg { width: 12px; height: 12px; fill: currentColor; flex: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 940px) {
  .nav-zp { justify-content: center; margin-top: 12px; }
}


/* Kotvy nesmú skončiť pod lepivou navigáciou */
section[id], footer[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }


/* ZP vedie mimo web — oddelené tenkou zvislou čiarou */
.nav-links .nav-oddel {
  padding-left: 28px; margin-left: 0;
  border-left: 1px solid var(--border);
}
@media (max-width: 900px) {
  .nav-links .nav-oddel { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); }
}


/* Sekcia kalkulačiek — každá veta na vlastnom riadku, vycentrované */
.kalk-in { max-width: 820px; }
.kalk-in h2 { text-align: center; text-wrap: nowrap; }
.kalk-lede { text-align: center; text-wrap: balance; max-width: 600px; margin-left: auto; margin-right: auto; }
@media (max-width: 880px) { .kalk-in h2 { text-wrap: balance; } }


/* ---------- Sekcia 4: hlavička vycentrovaná, štyri rovnaké stĺpce ---------- */
#komu .eyebrow,
#komu .sec-title,
#komu .sec-lede { text-align: center; }
#komu .sec-title,
#komu .sec-lede { margin-left: auto; margin-right: auto; }
#komu .sec-title { max-width: 34ch; text-wrap: balance; }
#komu .sec-lede { max-width: 56ch; }

#komu .seg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
#komu .seg { height: 100%; display: flex; flex-direction: column; }
#komu .seg .seg-more { margin-top: auto; padding-top: 16px; }
#komu .seg-hlavny { grid-column: auto; }
#komu .seg-hlavny h3 { font-size: 19px; }

@media (max-width: 1080px) { #komu .seg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { #komu .seg-grid { grid-template-columns: 1fr; } }


/* ---------- Sekcia 7: fotka drží pomer, text je dlhší ---------- */
.pribeh-in { align-items: start; }
.pribeh-foto { position: sticky; top: calc(var(--nav-h) + 32px); }
.pribeh-foto img { width: 100%; height: auto; aspect-ratio: 700 / 933; object-fit: cover; }
.pribeh-text p { max-width: 68ch; }
.pribeh-text .btn { margin-top: 12px; }
@media (max-width: 900px) { .pribeh-foto { position: static; } }


/* ---------- Kontaktné okno: možnosti pod sebou, hlavička na stred ---------- */
.modal-box h3, .modal-sub { text-align: center; }
.modal-box h3 { padding-right: 0; }
.kontakt-mriezka { grid-template-columns: 1fr; }
.js-len-mobil { display: flex; }
.modal-box h4 { text-align: center; }
.spat-form { justify-content: center; }
.spat-chyba, .spat-hotovo { text-align: center; }


/* ---------- Podpis ako logo ---------- */
.logo img { height: 36px; width: auto; }
.foot-logo-img { height: 62px; width: auto; margin-bottom: 18px; }
.foot-popis { margin: 0 0 4px; max-width: 38ch; }
.foot-popis + .foot-popis { margin-bottom: 0; }
.foot-grid > div:first-child .foot-soc { margin-top: 22px; }
@media (max-width: 900px) { .foot-logo-img { height: 52px; } .logo img { height: 30px; } }


/* ---------- Segmentové okná: odkazy a tlačidlo na stred ---------- */
.modal-kalk-odkazy { text-align: center; margin-bottom: 22px; }
.modal-box > .btn { display: block; width: fit-content; margin-left: auto; margin-right: auto; }


/* ---------- Karta článku na hlavnej stránke ---------- */
a.karta-clanok { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
a.karta-clanok:hover { border-color: var(--purple); }
a.karta-clanok h3 { color: var(--ink); }
.karta-viac { margin-top: auto; padding-top: 16px; color: var(--purple); font-size: 14px; font-weight: 500; }

/* ---------- Stránka článku ---------- */
.clanok-stranka { padding: 64px 0 88px; }
.clanok-hlava { max-width: 760px; margin-bottom: 44px; }
.clanok-drobky { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.clanok-drobky a { color: var(--purple); text-decoration: none; }
.clanok-hlava h1 { font-size: clamp(29px, 4.4vw, 46px); font-weight: 400; letter-spacing: -.015em; line-height: 1.16; margin-bottom: 22px; }
.clanok-perex { font-size: 18.5px; line-height: 1.66; color: var(--body); margin-bottom: 20px; }
.clanok-meta { font-size: 13.5px; color: var(--muted); margin: 0; padding-top: 18px; border-top: 1px solid var(--border); }

.clanok-telo { max-width: 760px; }
.clanok-telo h2 { font-size: clamp(21px, 2.6vw, 27px); font-weight: 500; margin: 44px 0 16px; }
.clanok-telo p { font-size: 17px; line-height: 1.78; }
.clanok-telo a { color: var(--purple); }

.clanok-graf { margin: 34px 0; padding: 0; }
.clanok-graf svg { width: 100%; height: auto; display: block; }
.clanok-graf figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.6; }

.clanok-cta { margin: 44px 0; padding-top: 34px; border-top: 1px solid var(--border); }

.clanok-zdroje { border: 1px solid var(--border); border-radius: 8px; margin-top: 34px; }
.clanok-zdroje > summary { cursor: pointer; padding: 14px 20px; font-size: 14px; font-weight: 500; color: var(--ink); }
.clanok-zdroje ul { margin: 0; padding: 0 20px 18px 40px; font-size: 13.5px; line-height: 1.75; color: var(--muted); }
.clanok-zdroje li { margin-bottom: 6px; }

.clanok-spat { margin-top: 40px; font-size: 15px; }
.clanok-spat a { color: var(--purple); text-decoration: none; }
