/* ==========================================================================
   Úvodná stránka – nové rozloženie (23. 11. 2026). Načítava sa iba pri „Novom dizajne“, po fx.css.
   Predošlý dizajn používa includes/home_predosly.php a tento súbor nenačíta.
   ========================================================================== */

/* Tri služby v troch odtieňoch: najtmavší → stredný → najsvetlejší (v tmavom režime naopak). */
:root {
  --s1-bg: var(--btn-bg); --s1-fg: var(--btn-fg);
  --s2-bg: color-mix(in srgb, var(--btn-bg) 70%, var(--bg)); --s2-fg: var(--btn-fg);
  --s3-bg: color-mix(in srgb, var(--bg) 84%, var(--text)); --s3-fg: var(--heading);
}
:root[data-theme="dark"] {
  --s2-bg: color-mix(in srgb, var(--bg) 74%, var(--text)); --s2-fg: var(--heading);
  --s3-bg: color-mix(in srgb, var(--bg) 92%, var(--text)); --s3-fg: var(--heading);
}

/* ---------- úvod ---------- */
.fx .hero.hx { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding: 0; overflow: visible; isolation: isolate; }
.hx__text { position: relative; z-index: 1; }
.hx__photo { margin: 0; overflow: hidden; background: var(--panel); }
.hx__move { display: block; width: 100%; height: 100%; will-change: transform; }
.hx__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.fx .hx .hero__phone { animation: fx-rise 1.2s .55s var(--fx-ease) both; }

/* pás troch služieb */
.deck { list-style: none; margin: 0; padding: 0; display: flex; overflow: hidden; border-radius: 28px; }
.deck__item { flex: 1 1 0; min-width: 0; }
.deck__link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 100%; text-decoration: none; transition: background-color .3s; }
.deck__item:nth-child(1) .deck__link { background: var(--s1-bg); color: var(--s1-fg); }
.deck__item:nth-child(2) .deck__link { background: var(--s2-bg); color: var(--s2-fg); }
.deck__item:nth-child(3) .deck__link { background: var(--s3-bg); color: var(--s3-fg); }
.deck__title { display: block; font: 600 1.15rem/1.1 var(--display); letter-spacing: -.02em; }
.deck__text { display: none; }
.deck__arrow { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1.5px solid currentColor; border-radius: 50%; }
.deck__arrow svg { width: 1.1rem; height: 1.1rem; }
/* hover nemení rozmery (žiadne preskakovanie hraníc): jemný posun odtieňa a vyplnená šípka */
@media (hover: hover) {
  .deck__link:hover { box-shadow: inset 0 0 0 100vmax color-mix(in srgb, currentColor 9%, transparent); }
  .deck__arrow { transition: background-color .3s, color .3s, border-color .3s; }
  .deck__item:nth-child(1) .deck__link:hover .deck__arrow { background: var(--s1-fg); border-color: var(--s1-fg); color: var(--s1-bg); }
  .deck__item:nth-child(2) .deck__link:hover .deck__arrow { background: var(--s2-fg); border-color: var(--s2-fg); color: var(--s2-bg); }
  .deck__item:nth-child(3) .deck__link:hover .deck__arrow { background: var(--s3-fg); border-color: var(--s3-fg); color: var(--s3-bg); }
}
.deck__link:focus-visible { outline: 3px solid currentColor; outline-offset: -7px; }

@media (max-width: 899px) {
  .hx__text { padding-top: 1.5rem; }
  .fx .hx__text .lead { max-width: 46ch; }
  .hx__deck { order: 1; margin-top: 1.25rem; }
  .hx__photo { order: 2; margin: 1.25rem var(--gutter) 0; border-radius: 24px; aspect-ratio: 16 / 10; max-height: 46vh; }
  .deck { flex-direction: column; border-radius: 22px; }
  .deck__link { padding: .95rem 1.1rem 1rem 1.3rem; min-height: 4rem; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .deck { flex-direction: row; }
  .deck__link { min-height: 5.5rem; }
}

@media (min-width: 900px) {
  .fx .hero.hx { display: grid; grid-template-rows: 1fr auto; min-height: clamp(34rem, calc(100svh - var(--fx-header-h)), 66rem); padding-bottom: clamp(1.25rem, 3vh, 2.5rem); }
  body:has(> .site-banner:not([hidden])) .hero.hx { min-height: clamp(33rem, calc(100svh - var(--fx-header-h) - 2.6rem), 66rem); }
  /* fotografia ide až po pravý okraj okna; ľavá hrana má oblúk strmhlavého letu */
  .hx__photo { position: absolute; z-index: 0; top: 0; right: 0; bottom: clamp(4.5rem, 10vh, 7rem); width: 56%; border-top-left-radius: 46% 78%; animation: hx-open 1.5s .1s var(--fx-ease) both; }
  .hx__text { align-self: center; padding-block: clamp(1.25rem, 3.5vh, 3.5rem); }
  .fx .hx__text h1 { max-width: 48%; font-size: clamp(2.6rem, min(4.7vw, 9.2vh), 6.6rem); line-height: .99; margin-bottom: clamp(.8rem, 2.4vh, 1.75rem); }
  .fx .hx__text .lead { max-width: 37ch; font-size: clamp(1rem, min(1.35vw, 2.4vh), 1.4rem); margin: 0; }
  .fx .hx .eyebrow { margin-bottom: clamp(.5rem, 1.6vh, 1rem); }
  .fx .hx .hero__phone { margin: clamp(.75rem, 2.2vh, 1.75rem) 0 0; max-width: 40%; }
  .hx .hero__phone a { font-size: clamp(1.25rem, 1.7vw, 1.9rem); letter-spacing: -.01em; }

  .hx__deck { position: relative; z-index: 2; }
  .deck { box-shadow: 0 40px 70px -40px rgba(28, 23, 18, .65); }
  .deck__link { padding: clamp(1.1rem, 2.8vh, 2.1rem) clamp(1.3rem, 2vw, 2.4rem); min-height: clamp(6.5rem, 17vh, 10.5rem); }
  .deck__title { font-size: clamp(1.45rem, 2.15vw, 2.7rem); }
  .deck__text { display: block; margin-top: .5rem; font-size: clamp(.95rem, 1.08vw, 1.15rem); line-height: 1.35; }
  .deck__arrow { width: clamp(2.75rem, 3.4vw, 4rem); height: clamp(2.75rem, 3.4vw, 4rem); }
}
@media (min-width: 900px) and (max-width: 1199px) { .deck__arrow { display: none; } }
@keyframes hx-open { from { clip-path: inset(0 0 100% 60%); } to { clip-path: inset(0 0 0 0); } }

/* ---------- panely služieb ---------- */
.xp { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.xp__item { min-width: 0; }
.xp__link { position: relative; display: flex; align-items: flex-end; height: 100%; min-height: 15rem; overflow: hidden; border-radius: 28px; color: #efe7d8; text-decoration: none; isolation: isolate; background: var(--panel); }
.xp__link img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--fx-ease); }
.xp__link::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(32, 26, 20, .94) 0%, rgba(32, 26, 20, .72) 32%, rgba(32, 26, 20, .05) 72%); }
.xp__body { padding: 1.4rem 1.4rem 1.5rem; }
.xp__title { display: block; font: 600 1.6rem/1.08 var(--display); letter-spacing: -.02em; }
.xp__text { display: block; margin-top: .5rem; line-height: 1.5; font-size: .95rem; }
.xp__price { display: block; margin-top: .7rem; font-weight: 600; font-size: .9rem; }
.xp__link:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.fx .home-services { padding-top: clamp(2.5rem, 7vh, 6rem); }
@media (min-width: 900px) {
  .xp { display: flex; gap: 1rem; height: clamp(27rem, 66vh, 44rem); }
  .xp__item { flex: 1 1 0; transition: flex-grow .9s var(--fx-ease); }
  .xp__item.is-active { flex-grow: 2.1; }
  .xp__item.is-active img { scale: 1.04; }
  .xp__body { padding: clamp(1.4rem, 2vw, 2.4rem); }
  .xp__title { font-size: clamp(1.15rem, 1.75vw, 2.1rem); white-space: nowrap; }
  .xp__link .xp__body { width: 100%; min-width: 0; }
  .xp__more { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .7s var(--fx-ease), opacity .4s; }
  .xp__item.is-active .xp__more { grid-template-rows: 1fr; opacity: 1; transition-delay: .12s; }
  .xp__more > span { overflow: hidden; width: min(34rem, 38vw); }
  .xp__text { font-size: 1.05rem; }
}

/* ---------- dravec a jeho korisť ---------- */
.law { position: relative; overflow: hidden; background: var(--panel); color: var(--on-dark); }
.law__photo { margin: 0; overflow: hidden; }
.law__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.law__body { padding: 2.25rem var(--gutter) 2.5rem; }
.law__say { margin: 0; font: 600 clamp(1.6rem, 1.1rem + 2.4vw, 3.6rem)/1.12 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.law__stats { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.law__stats strong { display: block; font: 600 clamp(1.8rem, 1.2rem + 1.5vw, 2.9rem)/1.1 var(--display); color: var(--on-dark); }
.law__stats span { display: block; margin-top: .3rem; font-size: .92rem; line-height: 1.45; color: var(--on-dark-muted); }
@media (max-width: 899px) { .law__photo { aspect-ratio: 16 / 10; } }
@media (min-width: 900px) {
  .law { display: grid; grid-template-columns: 42% 1fr; min-height: min(86vh, 54rem); }
  .law__photo { position: relative; border-top-right-radius: 46% 78%; }
  .law__photo img { position: absolute; inset: -8% 0; height: 116%; }
  .law__body { align-self: center; padding: clamp(3rem, 8vh, 6rem) max(var(--gutter), calc((100vw - 120rem) / 2)) clamp(3rem, 8vh, 6rem) clamp(2.5rem, 5vw, 6.5rem); }
  .law__stats { margin-top: clamp(2rem, 6vh, 4rem); gap: 2rem clamp(2rem, 4vw, 4rem); max-width: 48rem; }
}

/* ---------- témy: osem rovnakých dlaždíc ----------
   Pomer strán fotografie = rámček v administrácii (admin-fotky → Upraviť výrez):
   počítač a tablet 4:3, telefón 1:1. Pri zmene pomeru upraviť aj $ratios v admin-fotky.php. */
.fx .themes { display: grid; gap: clamp(.75rem, 1vw, 1.1rem); }
@media (min-width: 600px) {
  .fx .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx .themes .bo-card { display: flex; flex-direction: column; justify-content: flex-end; height: auto; min-height: 0; aspect-ratio: 4 / 3; overflow: hidden; isolation: isolate; background: var(--panel); border: 0; border-radius: 22px; }
  .fx .themes .bo-card__media { position: absolute; inset: 0; z-index: -1; min-height: 0; aspect-ratio: auto; border-radius: inherit; overflow: hidden; }
  .fx .themes .bo-card__media img { position: static; width: 100%; height: 100%; object-fit: cover; }
  .fx .themes .bo-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(32, 26, 20, .95) 0%, rgba(32, 26, 20, .76) 36%, rgba(32, 26, 20, 0) 74%); }
  .fx .themes .bo-card__body { flex: none; padding: clamp(.9rem, 1.2vw, 1.5rem); gap: .3rem; }
  .fx .themes .bo-card__title { color: #efe7d8; font-size: clamp(1.1rem, 1.4vw, 1.7rem); line-height: 1.15; }
  .fx .themes .bo-card__text { color: #e2d8c6; flex: none; font-size: clamp(.84rem, .92vw, 1.05rem); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .fx .themes .bo-card__more { display: none; }
}
@media (min-width: 1100px) { .fx .themes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .fx .themes { grid-template-columns: minmax(0, 1fr); }
  .fx .themes .bo-card { height: 6.75rem; min-height: 0; }
  .fx .themes .bo-card__media { flex: 0 0 6.75rem; min-height: 0; aspect-ratio: 1; }
}

/* ---------- galéria na úvode: celé riadky ---------- */
@media (min-width: 600px) and (max-width: 1023px) { .fx #galeria .gcats > li:nth-child(n+7) { display: none; } }
@media (min-width: 1024px) { .fx #galeria .gcats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- nízke okná (notebooky) a veľmi široké monitory ---------- */
@media (min-width: 900px) and (max-height: 760px) {
  .hx__text { padding-block: 1rem; }
  .fx .hx .eyebrow { margin-bottom: .4rem; }
  .hx .hero__phone em, .hx .hero__phone br { display: none; }
  .fx .hx .hero__phone { margin-top: .6rem; }
  .fx .hx__text .lead { line-height: 1.5; }
  .deck__link { min-height: 5.5rem; padding-block: .9rem; }
  .hx__photo { bottom: 3.5rem; }
}
@media (min-width: 2000px) { .hx__photo { width: 52%; } }

/* ---------- telefón ---------- */
@media (max-width: 899px) {
  .fx .hx .eyebrow { font-size: .66rem; letter-spacing: .1em; gap: .6rem; }
  .xp__link { min-height: 18rem; }
  .xp__link::after { background: linear-gradient(to top, rgba(32, 26, 20, .96) 0%, rgba(32, 26, 20, .84) 45%, rgba(32, 26, 20, 0) 85%); }
}
@media (min-width: 600px) and (max-width: 899px) { .xp { grid-template-columns: repeat(3, 1fr); } .xp__link { min-height: 22rem; } .xp__title { font-size: 1.3rem; } .xp__text { font-size: .86rem; } }

@media (prefers-reduced-motion: reduce) {
  .hx__photo { animation: none !important; }
  .fx .hx .hero__phone { animation: none !important; }
  .deck__item, .xp__item, .xp__more, .xp__link img { transition: none !important; }
}

/* 900–1199 px: panely rovnako široké, text vždy viditeľný */
@media (min-width: 900px) and (max-width: 1199px) {
  .xp .xp__item, .xp .xp__item.is-active { flex-grow: 1; }
  .xp .xp__more { grid-template-rows: 1fr; opacity: 1; }
  .xp .xp__more > span { width: auto; }
  .xp .xp__text { font-size: .95rem; }
}
/* telefón: menšie nadpisy úvodu */
@media (max-width: 599px) {
  .fx .hero.hx .hx__text h1 { font-size: clamp(1.7rem, 7.6vw, 2.1rem); line-height: 1.04; margin-bottom: .7rem; }
  .fx .hx .hx__text .lead { font-size: 1rem; line-height: 1.5; }
  .deck__title { font-size: 1.08rem; }
  .deck__link { min-height: 3.6rem; padding-block: .7rem; }
  .deck__arrow { width: 2.2rem; height: 2.2rem; }
  .xp__link { min-height: 15.5rem; border-radius: 22px; }
  .xp__title { font-size: 1.3rem; }
  .xp__body { padding: 1.1rem; }
  .law__say { font-size: 1.4rem; line-height: 1.2; }
  .law__stats { margin-top: 1.4rem; gap: 1.1rem; }
  .law__stats strong { font-size: 1.5rem; }
  .fx .themes .bo-card { height: 6.4rem; }
  .fx .themes .bo-card__media { flex-basis: 6.4rem; }
}
