/* Home (Prečo NIFTY). The hero badges (.hp-badge), the benefits row (.hp-benefits) and the CTA cards (.hp-cta)
   are reused by /ako-prebieha-testovanie/ and /vysledky-a-starostlivost/, which load this file too. */

/* ---------- Hero ---------- */
.hp-hero-inner { max-width: 1260px; margin: 0 auto; display: flex; align-items: center; }
.hp-hero-text { flex: 1 1 0; min-width: 0; padding: 70px 0 85px; }
.hp-hero-text h1 { margin: 0; font-size: 36px; font-weight: 700; line-height: 50px; color: var(--pink); }
/* EN headline is longer and fills the column up to the 99 % badge; keep its last word clear of the badge (desktop layout only). */
html[lang="en"] .hp-hero-text h1 { padding-right: 48px; }
.hp-ticks { list-style: none; }
.hp-ticks li { margin-top: 32px; padding-left: 35px; background: url("../uploads/2026/06/ok.svg") left center no-repeat; font-size: 18px; font-weight: 500; line-height: 24px; color: #000; }
.hp-ticks strong { font-weight: 700; }
.hp-hero-media { flex: 1 1 0; min-width: 0; position: relative; }
.hp-hero-media > img { width: 100%; height: 550px; object-fit: contain; }

.hp-badge { position: absolute; z-index: 1; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; }
.hp-badge-blue { left: -5%; top: 25%; width: 192px; height: 192px; background: url("../uploads/2026/03/Star-6.svg") center / cover no-repeat; }
.hp-badge-blue strong { font-size: 52px; font-weight: 700; line-height: 1.2; }
.hp-badge-blue span { font-size: 23px; line-height: 23px; }
.hp-badge-pink { left: 5%; top: 49%; width: 168px; height: 168px; padding: 0 30px; background: url("../uploads/2026/03/Star-61.svg") center / contain no-repeat; font-size: 20px; font-weight: 700; line-height: 27px; }

/* Sub-page hero variant (ako-prebieha-testovanie, vysledky-a-starostlivost): lead paragraph, smaller photo, badges further right. */
.hp-lead { margin: 32px 0 0; font-size: 18px; font-weight: 300; line-height: 24px; color: #000; }
.hp-hero--sub .hp-hero-media > img { height: 400px; }
/* Kolo 4: same tight pair as on the home page, left of the person (not over the photo). */
.hp-hero--sub .hp-badge-blue { left: -4%; top: 4%; }
.hp-hero--sub .hp-badge-pink { left: 3%; top: 38%; }

/* ---------- Features box + flipbook ---------- */
.hp-why { padding: 0 20px; margin-bottom: 350px; position: relative; z-index: 9; }
.hp-why-box {
  position: relative; max-width: 1400px; min-height: 740px; margin: 0 auto; padding: 44px 50px 0;
  border: 3px solid #FCDCEC; border-radius: 63px; background: linear-gradient(180deg, #fff 0%, #FCDAEB 100%);
}
.hp-features { list-style: none; display: flex; gap: 50px; }
.hp-features li { flex: 1 1 0; min-width: 0; text-align: center; scroll-margin-top: 110px; }
.hp-features img { width: 80px; height: 80px; object-fit: contain; margin: 0 auto 10px; }
.hp-features h3 { margin: 0 0 22px; font-size: 18px; font-weight: 700; line-height: 1; color: var(--pink); }
.hp-features p { margin: 0; font-size: 14px; line-height: 19px; color: var(--ink); }

/* Flipbook: desktop = two-page spread on an open book, mobile/tablet = one page per view. */
.hp-book { position: absolute; left: 50px; bottom: -270px; width: 92%; aspect-ratio: 2696 / 1481; max-height: 709px; }
.hp-book::before {
  content: ""; position: absolute; left: 2.5%; right: 2.4%; top: 0; bottom: 7.5%; border-radius: 26px 26px 30px 30px;
  background:
    linear-gradient(90deg, rgba(191, 210, 247, 0) 41%, rgba(191, 210, 247, .55) 47%, rgba(165, 190, 240, .75) 50%, rgba(191, 210, 247, .55) 53%, rgba(191, 210, 247, 0) 59%),
    linear-gradient(90deg, #DCE6FB 0%, #fff 22%, #fff 78%, #DCE6FB 100%);
  box-shadow: 0 2px 6px rgba(120, 150, 210, .18);
}
.hp-book::after {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 9%; z-index: -1; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(160, 188, 240, .55) 0%, rgba(160, 188, 240, 0) 70%);
}
.hp-book-pages { position: absolute; top: 3.53%; bottom: 10.72%; left: 9.46%; right: 9.46%; display: flex; z-index: 1; }
.hp-page { margin: 0; flex: 0 0 50%; height: 100%; display: flex; align-items: center; justify-content: center; }
.hp-page[hidden], .hp-book:not(.is-ready) .hp-page:nth-child(n+3) { display: none; }
.hp-page a { display: block; height: 100%; }
.hp-page img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.hp-book.is-ready .hp-page { animation: hp-fade .35s ease; }
@keyframes hp-fade { from { opacity: 0; } to { opacity: 1; } }

.hp-book-btn {
  position: absolute; top: 46%; transform: translateY(-50%); z-index: 3; width: 69px; height: 69px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .88); box-shadow: 0 2px 14px rgba(0, 0, 0, .15); color: #555;
  display: flex; align-items: center; justify-content: center; transition: box-shadow .15s;
}
.hp-book-btn:hover { box-shadow: 0 4px 22px rgba(0, 0, 0, .22); }
.hp-book-btn svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hp-book-prev { left: 2%; }
.hp-book-next { right: 2%; }
.hp-book-dots { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.hp-book-dots button { width: 16px; height: 16px; padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: center; }
.hp-book-dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #5A7FA8; transition: background .15s, transform .15s; }
.hp-book-dots button:hover::before { background: #3A5F88; }
.hp-book-dots button.is-active::before { background: #E83E70; box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); transform: scale(1.3); }

/* ---------- Benefits row (shared) ---------- */
.hp-benefits { padding: 18px 20px 10px; margin: 0 0 80px; }
.hp-benefits-list { list-style: none; max-width: 1400px; margin: 0 auto; display: flex; align-items: center; background: #fff; border-radius: 24px; }
.hp-benefits-list li { flex: 1 1 0; min-width: 0; min-height: 95px; display: flex; align-items: center; padding: 0 24px 0 44px; border-left: 1px solid #D7DFFD; }
.hp-benefits-list li:first-child { padding: 0 44px 0 24px; border-left: 0; }
.hp-benefits-list li:last-child { padding: 0 44px; }
.hp-benefits-list li > div { margin: 60px 0; padding: 0 20px; }
.hp-benefits-list img { display: none; }
.hp-benefits h3 { margin: 0 0 9px; font-size: 18px; font-weight: 500; line-height: 1.2; color: var(--blue); }
.hp-benefits p { margin: 0; font-size: 14px; line-height: 18px; color: var(--ink); }

/* ---------- CTA cards (shared) ---------- */
.hp-cta { max-width: 1440px; margin: 0 auto 50px; padding: 0 20px; display: flex; gap: 20px; }
.hp-cta-card { flex: 1 1 0; min-width: 0; min-height: 227px; padding: 35px; border-radius: 40px; display: flex; align-items: center; }
.hp-cta-blue { background: rgba(215, 223, 253, .5); }
.hp-cta-pink { background: rgba(237, 6, 119, .1); }
.hp-cta-card > img { width: 147px; height: 147px; flex: none; }
.hp-cta-body { padding-left: 30px; }
.hp-cta h2 { margin: 0; font-size: 23px; font-weight: 700; line-height: 34px; color: var(--blue); }
.hp-cta-btn {
  display: inline-block; margin-top: 16px; padding: 12px 24px; border-radius: 10px; background: var(--pink); color: #fff;
  font-size: 16px; font-weight: 700; line-height: 29px; transition: background .2s;
}
.hp-cta-btn:hover, .hp-cta-btn:focus-visible { background: var(--pink-hover); color: #fff; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hp-hero { margin-top: 40px; padding: 0 20px; }
  .hp-hero-text h1 { font-size: 24px; line-height: 32px; }
  .hp-hero-media > img { object-fit: cover; }
  .hp-badge-blue { width: 117px; height: 117px; background-size: contain; }
  .hp-badge-blue strong { font-size: 26px; }
  .hp-badge-blue span { font-size: 12px; line-height: 1.2; }
  .hp-badge-pink { width: 117px; height: 117px; padding: 0 18px; font-size: 16px; line-height: 24px; }

  .hp-why { margin-bottom: 80px; }
  .hp-why-box { min-height: 0; padding: 20px; }
  .hp-features { flex-wrap: wrap; justify-content: center; gap: 0; margin-bottom: 30px; }
  .hp-features li { flex: 0 0 50%; padding: 0 5px 20px; }

  .hp-book { position: relative; left: auto; bottom: auto; width: 100%; max-width: 520px; max-height: none; aspect-ratio: auto; margin: 0 auto;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 8px; }
  .hp-book::before, .hp-book::after { display: none; }
  .hp-book-pages { position: static; display: block; grid-column: 1 / -1; border-radius: 24px; overflow: hidden; background: linear-gradient(0deg, #FEECF4 0%, #fff 25%); }
  .hp-page { height: auto; display: block; }
  .hp-book:not(.is-ready) .hp-page:nth-child(n+2) { display: none; }
  .hp-page a { position: relative; height: auto; }
  .hp-page a::after { content: ""; position: absolute; right: 10px; bottom: 1px; width: 67px; height: 67px; background: url("../uploads/2026/07/zoom.png") center / 67px no-repeat; pointer-events: none; }
  .hp-page img { width: 100%; height: auto; }
  .hp-book-btn { position: static; transform: none; width: 40px; height: 40px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
  .hp-book-btn svg { width: 20px; height: 20px; }
  .hp-book-prev { grid-column: 1; grid-row: 2; }
  .hp-book-next { grid-column: 3; grid-row: 2; }
  .hp-book-dots { position: static; grid-column: 2; grid-row: 2; transform: none; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0; }
  .hp-book-dots button { width: 14px; height: 18px; }
  .hp-book-dots button::before { width: 7px; height: 7px; }

  .hp-benefits-list li, .hp-benefits-list li:first-child, .hp-benefits-list li:last-child { padding-left: 20px; }
  .hp-benefits-list li:first-child { border-left: 0; }
  .hp-cta-card > img { width: 64px; height: 64px; }
  .hp-cta-body { padding-left: 20px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  /* body background off on mobile: site.css */
  .hp-hero-inner { flex-wrap: wrap; }
  .hp-hero-text { flex: 0 0 100%; padding: 0 0 30px; }
  .hp-hero-text h1 { margin-bottom: 8px; }
  .hp-hero-media { flex: 0 0 100%; border-radius: 24px; overflow: hidden; background: linear-gradient(180deg, #fff 0%, #FCDAEB 100%); }
  .hp-hero-media > img, .hp-hero--sub .hp-hero-media > img { height: 320px; object-fit: contain; object-position: right center; }
  .hp-hero--sub .hp-hero-media > img { object-fit: cover; }
  .hp-hero--sub .hp-badge-blue { left: 0; top: 15%; }
  .hp-hero--sub .hp-badge-pink { left: 58%; top: 50%; }
  .hp-badge-blue { left: 0; top: 15%; width: 151px; height: 151px; background: url("../uploads/2026/03/Star-6.svg") center / contain no-repeat; }
  .hp-badge-blue strong { font-size: 40px; }
  .hp-badge-blue span { font-size: 20px; }
  .hp-badge-pink { left: 58%; top: 50%; width: 130px; height: 130px; padding: 0 14px; line-height: 21px; }

  .hp-why { margin: 40px 0; }
  .hp-why-box { min-height: 0; padding: 0; border: 0; border-radius: 24px; background: none; }
  .hp-features { border-bottom: 1px solid #D7DFFD; padding-bottom: 10px; }
  .hp-features li { padding: 0 2px 22px; }
  .hp-features img { margin-bottom: 4px; }
  .hp-features h3 { font-size: 16px; line-height: 22px; margin-bottom: 16px; }
  .hp-book { max-width: none; }

  .hp-benefits { margin-bottom: 40px; padding: 0; }
  .hp-book { margin-bottom: 10px; }
  .hp-benefits-list { flex-direction: column; align-items: stretch; border-radius: 0; }
  .hp-benefits-list li, .hp-benefits-list li:first-child, .hp-benefits-list li:last-child {
    min-height: 124px; padding: 0 20px; border-left: 0; border-bottom: 1px solid #D7DFFD; }
  .hp-benefits-list img { display: block; flex: 0 0 20%; width: 56px; max-width: 56px; height: 56px; margin-right: calc(20% - 56px); }
  .hp-benefits-list li > div { flex: 1; margin: 22px 0; padding: 0; }

  .hp-cta { flex-direction: column; margin-bottom: 40px; }
  .hp-cta-card { min-height: 180px; padding: 24px; flex-wrap: wrap; align-content: center; }
  .hp-cta-body { display: contents; }
  .hp-cta h2 { flex: 1 1 calc(100% - 64px); padding-left: 26px; font-size: 20px; }
  .hp-cta-btn { margin-top: 10px; }
  .hp-cta h2 br { display: none; }
  .hp-hero--sub ~ .hp-cta h2 { line-height: 27px; }
}

@media (max-width: 767px) { html:not([lang="sk"]) .hp-hero-text h1 { padding-right: 0; } }

/* Kolo 3 (Silvia 16. 11.): on the home hero the pink star covered "presnosť" in the blue star → blue on top, pink a bit lower. */
.hp-badge-blue { z-index: 2; }
@media (min-width: 1025px) { .hp-hero:not(.hp-hero--sub) .hp-badge-pink { top: 55%; left: 7%; } }

/* Kolo 4 (17. 11. 2026): the comic shows one page at a time on desktop too – a single centred page card. */
@media (min-width: 1025px) {
  .hp-book { left: 0; right: 0; margin: 0 auto; width: 560px; aspect-ratio: 1348 / 1481; }
  .hp-book::before { background: linear-gradient(90deg, #DCE6FB 0%, #fff 12%, #fff 88%, #DCE6FB 100%); }
  .hp-book-pages { left: 9%; right: 9%; }
  .hp-page { flex: 0 0 100%; }
  .hp-book:not(.is-ready) .hp-page:nth-child(n+2) { display: none; }
  .hp-book-prev { left: -86px; }
  .hp-book-next { right: -86px; }
  .hp-book-dots { top: auto; bottom: 1.5%; transform: translateX(-50%); flex-direction: row; gap: 2px; }
}

/* Non-Slovak home pages hide the Slovak comic (Owner 18. 11. 2026): the box no longer reserves room for the book. */
@media (min-width: 1025px) {
  .hp-why--no-book { margin-bottom: 80px; }
  .hp-why--no-book .hp-why-box { min-height: 0; padding-bottom: 44px; }
}

/* Non-Slovak pink star (EN/DE/UK texts are longer than "Jediný poistený na trhu", UK «застрахований» the longest word):
   smaller type and side padding per breakpoint so the text stays inside the star. */
html:not([lang="sk"]) .hp-badge-pink { padding: 0 22px; font-size: 16px; line-height: 21px; }
@media (max-width: 1024px) { html:not([lang="sk"]) .hp-badge-pink { padding: 0 8px; font-size: 13px; line-height: 18px; } }
@media (max-width: 767px) { html:not([lang="sk"]) .hp-badge-pink { padding: 0 10px; font-size: 14px; line-height: 19px; } }
