/* =====================================================================
   ProfiPage — designová vrstva 2026
   Načítá se za cms.css a předefinovává vzhled veřejné části webu.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------------- */

:root {
    /* Značková modrá */
    --brand-50:  #EFF6FF;
    --brand-100: #DCEAFE;
    --brand-200: #BFD9FD;
    --brand-300: #93C0FB;
    --brand-400: #5FA0F7;
    --brand-500: #2E7BEE;
    --brand-600: #1D63D8;
    --brand-700: #1A4FB0;
    --brand-800: #1B438C;
    --brand-900: #0E2C63;
    --brand-950: #081C42;

    /* Doplňková azurová (gradienty, akcenty) */
    --cyan-400: #38BDF8;
    --cyan-500: #16A6E8;
    --cyan-600: #0B87C4;

    /* Povrchy */
    --surface:       #FFFFFF;
    --surface-soft:  #F7FAFF;
    --surface-alt:   #EFF5FE;
    --surface-deep:  #0B1C3A;

    /* Text */
    --ink:        #0D1B33;
    --ink-strong: #061127;
    --ink-muted:  #56688A;
    --ink-faint:  #8496B3;
    --ink-invert: #FFFFFF;

    /* Linky */
    --line:       #E2EAF6;
    --line-soft:  #EDF2FA;
    --line-strong:#CBD9EE;

    /* Stavy */
    --ok:    #12A150;
    --warn:  #E08700;
    --error: #DC3545;

    /* Gradienty */
    --grad-brand: linear-gradient(135deg, #2E7BEE 0%, #16A6E8 100%);
    --grad-deep:  linear-gradient(150deg, #0E2C63 0%, #1A4FB0 55%, #16A6E8 100%);
    --grad-soft:  linear-gradient(180deg, #FFFFFF 0%, #F1F7FF 100%);

    /* Stíny */
    --shadow-xs: 0 1px 2px rgba(13, 27, 51, .06);
    --shadow-sm: 0 2px 8px rgba(13, 27, 51, .06);
    --shadow-md: 0 10px 28px rgba(17, 45, 92, .09);
    --shadow-lg: 0 22px 55px rgba(17, 45, 92, .14);
    --shadow-brand: 0 14px 34px rgba(29, 99, 216, .28);

    /* Rádiusy */
    --r-sm:  8px;
    --r-md:  12px;
    --r-lg:  18px;
    --r-xl:  26px;
    --r-pill: 999px;

    /* Typografie */
    --font-heading: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body:    'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

    /* Rozměry */
    --max-width: 1220px;
    --header-height: 84px;
    --section-y: 6.5rem;

    /* Kompatibilita se starými proměnnými v cms.css */
    --color-bg:          #F7FAFF;
    --color-bg-light:    #FFFFFF;
    --color-gold:        #1D63D8;
    --color-gold-dark:   #0E2C63;
    --color-gold-light:  #DCEAFE;
    --color-text:        #0D1B33;
    --color-text-light:  #4A5C7A;
    --color-white:       #FFFFFF;
    --color-border:      #E2EAF6;
    --color-hero-accent: #0E2C63;
    --color-accent-2:       #16A6E8;
    --color-accent-2-dark:  #0B87C4;
    --color-accent-2-light: #DFF3FD;
    --color-accent-2-bg:    #F2FAFE;
    --color-neutral-bg:     #F7FAFF;
    --shadow-card:       0 10px 28px rgba(17, 45, 92, .09);
    --shadow-card-hover: 0 22px 55px rgba(17, 45, 92, .14);
    --radius-card: 18px;
    --radius-pill: 999px;
}

/* ---------------------------------------------------------------------
   2. Základ
   --------------------------------------------------------------------- */

html {
    scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--surface);
    letter-spacing: -0.006em;
    padding-top: var(--header-height);
}

body.has-overlay-header {
    padding-top: 0;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--ink-strong);
    line-height: 1.15;
    letter-spacing: -0.028em;
    font-weight: 800;
}

a {
    color: var(--brand-600);
}

a:hover {
    color: var(--brand-800);
}

.container {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

::selection {
    background: var(--brand-200);
    color: var(--brand-950);
}

/* Sekce */
.section {
    padding-block: var(--section-y);
}

.section--tight { padding-block: 4rem; }

.section--soft {
    background: var(--surface-soft);
}

/* ---------------------------------------------------------------------
   3. Tlačítka
   --------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: -0.01em;
    text-transform: none;
    line-height: 1.2;
    padding: .9rem 1.6rem;
    border-radius: var(--r-pill);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: transform .18s ease, box-shadow .25s ease, background-color .25s ease,
                border-color .25s ease, color .25s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--grad-brand);
    background-size: 150% 150%;
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-brand);
}

.btn--primary:hover {
    color: #fff;
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(29, 99, 216, .36);
}

.btn--outline {
    background: transparent;
    color: var(--brand-700);
    border-color: var(--line-strong);
}

.btn--outline:hover {
    background: var(--brand-50);
    border-color: var(--brand-300);
    color: var(--brand-800);
}

.btn--ghost {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: rgba(255, 255, 255, .32);
    backdrop-filter: blur(6px);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
    transform: translateY(-2px);
}

.btn--full { width: 100%; }

/* ---------------------------------------------------------------------
   4. Logo
   Slovní značka „profipage“ malými písmeny. „i“ je bez tečky (ı) a tečku
   mu dává stejná modrá kulička jako na konci slova. Při načtení a při
   najetí myší koncová kulička vyskočí z „i“, doskáče na konec a pak se
   nad „i“ objeví tečka nová. Vzdálenost skoku (--logo-hop, --logo-rise)
   měří main.js; bez skriptu je logo rovnou ve výsledném stavu.
   --------------------------------------------------------------------- */

.logo {
    display: inline-flex;
    align-items: center;
    /* přebíjí padding: 10px 0 ze starého cms.css */
    padding: 0;
    text-decoration: none;
    /* tmavší než --ink-strong (wow.css ho přebarvuje na střední modrou
       nadpisů) — logo má stát pevně, skoro černé s modrým nádechem */
    color: var(--brand-950);
    /* barva koncové tečky — hlavička a patička si ji přepínají */
    --logo-dot: var(--brand-600);
}

/* Logo je odkaz, ale globální a:hover (světlejší modrá) se ho netýká —
   při najetí se jen přehraje tečka, barva textu zůstává. */
a.logo:hover,
a.logo:focus-visible { color: var(--brand-950); }
.header--overlay:not(.is-scrolled) a.logo:hover,
.header--overlay:not(.is-scrolled) a.logo:focus-visible { color: #fff; }

.logo__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* název pro čtečky; vizuální slovo je aria-hidden */
.logo__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.logo__word {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1;
    letter-spacing: -.035em;
    white-space: nowrap;
    color: inherit;
}

/* „i“ je obyčejné písmeno; span kolem něj slouží main.js k nalezení
   místa, odkud kulička startuje (střed písmene, výška jeho tečky) */
.logo__i { display: inline-block; }

/* odstup mezi „profi“ a „page“ */
.logo__page { margin-left: .16em; }

.logo__ball {
    display: block;
    width: .2em;
    height: .2em;
    border-radius: 50%;
    background: var(--logo-dot);
}

/* Koncová tečka: vnější span jede vodorovně, kulička uvnitř skáče svisle.
   Bez textu má flex položka účaří na spodní hraně, tečka tedy sedí na účaří. */
.logo__dot {
    display: inline-block;
    width: .2em;
    height: .2em;
    margin-left: .1em;
}

/* Choreografie (2,8 s), časová osa v procentech:
     0–38  kulička sedí nad „i“ a třikrát poskočí na místě, pokaždé výš
    38–74  tančí přes „page“: tři malé oblouky, každý o třetinu cesty,
           přistává vždy ve výšce tečky nad „i“
    74–100 z výšky spadne na účaří za slovo a dvakrát se odrazí
   Vodorovně: stojí do 38 %, pak tři rovnoměrné posuny (v letu je rychlost
   vodorovně stálá, proto linear), od 74 % stojí na konci. */
@keyframes logo-dot-run {
    0%, 38% { transform: translateX(calc(var(--logo-hop, 0px) * -1)); }
    50%     { transform: translateX(calc(var(--logo-hop, 0px) * -.667)); }
    62%     { transform: translateX(calc(var(--logo-hop, 0px) * -.333)); }
    74%, to { transform: translateX(0); }
}

@keyframes logo-dot-hop {
    0%, 8% { transform: translateY(calc(var(--logo-rise, 0px) * -1)); animation-timing-function: ease-out; }
    /* zblázní se nad „i“ */
    14%  { transform: translateY(calc(var(--logo-rise, 0px) * -1 - .25em)); animation-timing-function: ease-in; }
    20%  { transform: translateY(calc(var(--logo-rise, 0px) * -1)); animation-timing-function: ease-out; }
    26%  { transform: translateY(calc(var(--logo-rise, 0px) * -1 - .45em)); animation-timing-function: ease-in; }
    32%  { transform: translateY(calc(var(--logo-rise, 0px) * -1)); animation-timing-function: ease-out; }
    35%  { transform: translateY(calc(var(--logo-rise, 0px) * -1 - .7em)); animation-timing-function: ease-in; }
    38%  { transform: translateY(calc(var(--logo-rise, 0px) * -1)); animation-timing-function: ease-out; }
    /* tři malé oblouky přes „page“ */
    44%  { transform: translateY(calc(var(--logo-rise, 0px) * -1 - .38em)); animation-timing-function: ease-in; }
    50%  { transform: translateY(calc(var(--logo-rise, 0px) * -1)); animation-timing-function: ease-out; }
    56%  { transform: translateY(calc(var(--logo-rise, 0px) * -1 - .38em)); animation-timing-function: ease-in; }
    62%  { transform: translateY(calc(var(--logo-rise, 0px) * -1)); animation-timing-function: ease-out; }
    68%  { transform: translateY(calc(var(--logo-rise, 0px) * -1 - .38em)); animation-timing-function: ease-in; }
    74%  { transform: translateY(calc(var(--logo-rise, 0px) * -1)); animation-timing-function: ease-in; }
    /* pád za slovo a uložení */
    82%  { transform: translateY(0); animation-timing-function: ease-out; }
    88%  { transform: translateY(-.28em); animation-timing-function: ease-in; }
    94%  { transform: translateY(0); animation-timing-function: ease-out; }
    97%  { transform: translateY(-.08em); animation-timing-function: ease-in; }
    100% { transform: translateY(0); }
}

/* Před startem kulička necelou sekundu klidně sedí na tečce nad „i“
   (prodleva animace + prvních 8 % časové osy), teprve pak se zblázní. */
.logo.is-hopping .logo__dot  { animation: logo-dot-run 2.8s linear .9s both; }
.logo.is-hopping .logo__ball { animation: logo-dot-hop 2.8s linear .9s both; }

@media (prefers-reduced-motion: reduce) {
    .logo.is-hopping .logo__dot,
    .logo.is-hopping .logo__ball { animation: none; }
}

.logo__tagline {
    display: block;
    margin-top: .5rem;
    font-family: var(--font-body);
    font-size: .52rem;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    white-space: nowrap;
}

/* Světlá varianta na tmavém / průhledném pozadí */
.header--overlay:not(.is-scrolled) .logo {
    color: #fff;
    --logo-dot: #8FC3FB;
}
.header--overlay:not(.is-scrolled) .logo__tagline {
    color: rgba(255, 255, 255, .58);
}

/* Větší varianta (přihlášení) */
.login-box__header .logo__word { font-size: 3rem; }
.login-box__header .logo__tagline { font-size: .6rem; }

/* ---------------------------------------------------------------------
   5. Hlavička
   --------------------------------------------------------------------- */

.header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: none;
    transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease,
                transform .35s ease;
}

.header--overlay {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.header.is-scrolled {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom-color: var(--line-soft);
    box-shadow: 0 4px 24px rgba(13, 27, 51, .07);
}

.header__inner {
    max-width: var(--max-width);
    height: 100%;
    margin-inline: auto;
    padding-inline: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header__inner .logo { margin-right: auto; }

/* Navigace */
.nav--desktop .nav__list {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .55rem .85rem;
    border-radius: var(--r-pill);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    white-space: nowrap;
    transition: color .2s ease, background-color .2s ease;
}

.nav__link:hover,
.nav__dropdown:hover > .nav__link {
    color: var(--brand-700);
    background: var(--brand-50);
}

.header--overlay:not(.is-scrolled) .nav__link { color: rgba(255, 255, 255, .82); }
.header--overlay:not(.is-scrolled) .nav__link:hover,
.header--overlay:not(.is-scrolled) .nav__dropdown:hover > .nav__link {
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.nav__link--disabled { cursor: default; }

/* Přihlášený admin: „Přidat stránku“ jako kulaté plus před první položkou menu */
.nav__admin-add { display: flex; margin-right: .35rem; }

.nav__add-page {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px dashed var(--line-strong);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.nav__add-page:hover {
    border-color: var(--brand-600);
    border-style: solid;
    color: var(--brand-600);
    background: var(--brand-50);
}

.header--overlay:not(.is-scrolled) .nav__add-page {
    border-color: rgba(255, 255, 255, .45);
    color: rgba(255, 255, 255, .82);
}

.header--overlay:not(.is-scrolled) .nav__add-page:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.nav__arrow {
    font-size: .6em;
    opacity: .75;
    transition: transform .2s ease;
}

.nav__dropdown:hover .nav__arrow { transform: rotate(180deg); }

/* Rozbalovací podmenu */
.nav--desktop .nav__dropdown { position: relative; }

.nav--desktop .nav__submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 8px);
    min-width: 250px;
    padding: .5rem;
    margin: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.nav--desktop .nav__submenu::before {
    content: '';
    position: absolute;
    inset: -12px 0 auto 0;
    height: 12px;
}

.nav--desktop .nav__dropdown:hover > .nav__submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.nav--desktop .nav__submenu-link {
    display: block;
    padding: .6rem .85rem;
    border-radius: var(--r-md);
    font-size: .9rem;
    font-weight: 500;
    color: var(--ink);
    transition: background-color .18s ease, color .18s ease;
}

.nav--desktop .nav__submenu-link:hover {
    background: var(--brand-50);
    color: var(--brand-700);
}

/* CTA v hlavičce */
.header__cta {
    padding: .68rem 1.25rem;
    font-size: .84rem;
    white-space: nowrap;
}

.header--overlay:not(.is-scrolled) .header__cta {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .38);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.header--overlay:not(.is-scrolled) .header__cta:hover {
    background: #fff;
    color: var(--brand-700);
    border-color: #fff;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    /* rozteč čar 8 px (3 + 5) = celé fyzické pixely i při škálování 125–200 %,
       takže se všechny tři čáry vykreslí stejně tučně */
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .25s ease, opacity .2s ease;
}

.header--overlay:not(.is-scrolled) .hamburger span { background: #fff; }

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Sbalené menu (hamburger) — řízeno třídou, ne breakpointem.
   Třídu `nav-collapsed` na <html> nastavuje JS (initAdaptiveNav v main.js)
   podle toho, jestli se menu a tlačítko poptávky vejdou vedle loga. Díky tomu
   se hamburger objeví přesně tehdy, když je potřeba — i když editor do menu
   přidá další položky. */
html.nav-collapsed .nav--desktop { display: none; }
html.nav-collapsed .hamburger { display: flex; }
html.nav-collapsed .header__cta { display: none; }

/* Měření (viz initAdaptiveNav) — desktopové menu se na okamžik vyjme z toku
   a zobrazí v přirozené šířce. Uživatel nic nevidí. */
html.nav-measuring .nav--desktop {
    display: flex !important;
    position: absolute !important;
    top: 0;
    left: 0;
    width: auto !important;
    max-width: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Mobilní navigace */
.nav--mobile {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 88vw);
    height: 100dvh;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -20px 0 60px rgba(13, 27, 51, .18);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}

.nav--mobile.active { transform: translateX(0); }

.nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--line-soft);
}

.nav__header-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.nav__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.nav__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.35rem 2rem;
}

.nav--mobile .nav__list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.nav--mobile .nav__link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: .8rem .25rem;
    border-radius: 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: .82rem;
    color: var(--ink);
}

.nav--mobile .nav__submenu {
    list-style: none;
    margin: 0 0 .35rem;
    padding: .35rem 0 .6rem .9rem;
    border-left: 2px solid var(--brand-100);
}

.nav--mobile .nav__submenu-link {
    display: block;
    padding: .5rem .25rem;
    font-size: .92rem;
    color: var(--ink-muted);
}

.nav--mobile .nav__submenu-link:hover { color: var(--brand-600); }

.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(8, 18, 40, .5);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}

.nav-backdrop.active { opacity: 1; visibility: visible; }

.nav__footer-divider {
    height: 1px;
    margin: .5rem 0 1.25rem;
    background: var(--line-soft);
}

.nav__footer-contact {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-bottom: 1.25rem;
}

.nav__footer-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9rem;
    color: var(--ink-muted);
}

.nav__footer-item svg { color: var(--brand-500); flex: none; }

.nav__footer-social { display: flex; gap: .6rem; margin-bottom: 1rem; }

.nav__footer-social-link {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    background: var(--brand-50);
    color: var(--brand-600);
    transition: background-color .2s ease, color .2s ease;
}

.nav__footer-social-link:hover { background: var(--brand-600); color: #fff; }

.nav__footer-brand {
    font-size: .74rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* ---------------------------------------------------------------------
   6. Hero
   --------------------------------------------------------------------- */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    /* přesně jedna obrazovka — svh počítá i s lištami mobilních prohlížečů.
       cms.css nastavuje height: calc(100vh - header), proto explicitně. */
    height: 100svh;
    min-height: 100svh;
    /* aby se obsah vešel i na nízkém okně, než se zapne mobilní rozvržení */
    max-height: 100svh;
    line-height: 1.65;
    padding-block: calc(var(--header-height) + 2rem) 2.5rem;
    overflow: hidden;
    background: var(--grad-deep);
    color: #fff;
    isolation: isolate;
}

/* Neutralizace starých EVIA pravidel pro hero */
.hero .hero__content {
    margin-left: 0;
    max-width: 640px;
    line-height: 1.65;
    animation: ppHeroIn .8s cubic-bezier(.2, .8, .25, 1) both;
}

@keyframes ppHeroIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero .hero__content-text,
.hero .hero__content-text p {
    color: rgba(255, 255, 255, .84);
    font-size: 1.08rem;
    line-height: 1.7;
}

.hero .hero__content-text p { margin-bottom: .75rem; }
.hero .hero__content-text p:last-child { margin-bottom: 0; }

.hero .hero__title {
    text-transform: none;
    font-weight: 800;
    letter-spacing: -0.038em;
    text-shadow: 0 2px 24px rgba(6, 18, 40, .35);
}

.hero .hero__eyebrow {
    font-family: var(--font-body);
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .92);
    line-height: 1.4;
}

/* Animované pozadí */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .55;
}

/* Pohyblivé barevné koule */
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    will-change: transform;
}

.hero__orb--1 {
    width: 46vw; height: 46vw;
    top: -14%; right: -8%;
    background: radial-gradient(circle at 30% 30%, #38BDF8, transparent 68%);
    animation: ppOrb1 22s ease-in-out infinite;
}

.hero__orb--2 {
    width: 40vw; height: 40vw;
    bottom: -18%; left: -10%;
    background: radial-gradient(circle at 60% 40%, #2E7BEE, transparent 68%);
    animation: ppOrb2 26s ease-in-out infinite;
}

.hero__orb--3 {
    width: 28vw; height: 28vw;
    top: 32%; left: 42%;
    background: radial-gradient(circle at 50% 50%, #6D5BF8, transparent 70%);
    opacity: .32;
    animation: ppOrb3 30s ease-in-out infinite;
}

@keyframes ppOrb1 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(-6%, 8%, 0) scale(1.12); }
}
@keyframes ppOrb2 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(9%, -7%, 0) scale(1.08); }
}
@keyframes ppOrb3 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    33%      { transform: translate3d(-12%, -6%, 0) scale(1.15); }
    66%      { transform: translate3d(8%, 10%, 0) scale(.92); }
}

/* Mřížka */
.hero__grid {
    position: absolute;
    inset: -1px;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 35%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 35%, transparent 100%);
}

/* Volitelné video / foto na pozadí */
.hero__media {
    position: absolute;
    inset: 0;
    z-index: -4;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .3;
}

.hero__scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(8, 22, 48, .38) 0%, rgba(8, 22, 48, .1) 45%, rgba(8, 22, 48, .55) 100%);
}

/* Obsah hera */
.hero .container {
    position: relative;
    z-index: 1;
}

.hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    align-items: center;
    gap: 4rem;
}

/* Hero je vysoké přesně jednu obrazovku, takže na nízkém okně
   (telefon na šířku, malý notebook) musí vizuál ustoupit textu. */
@media (max-height: 560px) {
    .hero { padding-block: calc(var(--header-height) + 1rem) 1.5rem; }
    .hero__visual { display: none; }
    .hero__layout { grid-template-columns: minmax(0, 1fr); }
}

.hero__content { max-width: 640px; }

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.5rem;
    padding: .4rem 1rem .4rem .55rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(8px);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .01em;
    color: rgba(255, 255, 255, .92);
}

.hero__eyebrow p { margin: 0; }

.hero__eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    margin-left: .35rem;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, .22);
    animation: ppPulse 2.4s ease-in-out infinite;
}

@keyframes ppPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, .3); }
    50%      { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}

.hero__title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(2.4rem, 5.4vw, 4rem);
    line-height: 1.06;
    letter-spacing: -0.038em;
    color: #fff;
    margin-bottom: 1.35rem;
    text-wrap: balance;
}

.hero__title .hero__title-accent {
    background: linear-gradient(120deg, #7FE3FF 0%, #A9C6FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__content-text {
    max-width: 56ch;
    margin-bottom: 2.25rem;
    font-size: 1.08rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .8);
}

.hero__content-text p { margin-bottom: .75rem; }
.hero__content-text p:last-child { margin-bottom: 0; }

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
}

/* --- Vizuál: okno prohlížeče, které se „staví“ --- */
.hero__visual {
    position: relative;
    perspective: 1400px;
}

.hero__window {
    position: relative;
    border-radius: 14px;
    background: #0F203F;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 40px 90px rgba(3, 10, 26, .55);
    overflow: hidden;
    transform: rotateY(-11deg) rotateX(4deg) translateZ(0);
    animation: ppWindowIn 1.1s cubic-bezier(.2, .8, .25, 1) both;
}

@keyframes ppWindowIn {
    from { opacity: 0; transform: rotateY(-18deg) rotateX(8deg) translateY(28px); }
    to   { opacity: 1; transform: rotateY(-11deg) rotateX(4deg) translateY(0); }
}

.hero__window-bar {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .7rem .9rem;
    background: rgba(255, 255, 255, .06);
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
}

.hero__dot--r { background: #FF5F57; }
.hero__dot--y { background: #FEBC2E; }
.hero__dot--g { background: #28C840; }

.hero__window-url {
    flex: 1;
    margin-left: .6rem;
    padding: .28rem .7rem;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .07);
    font-family: var(--font-mono);
    font-size: .68rem;
    color: rgba(255, 255, 255, .55);
    letter-spacing: .01em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hero__window-body {
    position: relative;
    padding: 1.35rem;
    min-height: 300px;
    background:
        radial-gradient(700px 300px at 15% 0%, rgba(46, 123, 238, .28), transparent 60%),
        radial-gradient(500px 300px at 100% 100%, rgba(22, 166, 232, .22), transparent 60%),
        #0B1A36;
}


/* =====================================================================
   Hero vizuál — z drátěného návrhu do hotového webu
   Společná časová osa: 14 s. Kurzor jezdí po stejné ose.
   ===================================================================== */

.hero__stage {
    position: absolute;
    inset: 0;
    padding: 1.35rem;
}

/* --- vrstva 1: drátěný návrh --- */
.hero__stage--draft {
    display: grid;
    align-content: start;
    gap: .62rem;
    animation: ppDraftOut 14s cubic-bezier(.4, 0, .2, 1) infinite;
}

@keyframes ppDraftOut {
    0%, 26%  { opacity: 1; }
    46%, 88% { opacity: 0; }
    97%, 100%{ opacity: 1; }
}

.hero__wf {
    display: block;
    border: 1px dashed rgba(150, 190, 240, .45);
    border-radius: 5px;
    background: rgba(255, 255, 255, .04);
}

.hero__wf--nav   { height: 11px; width: 34%; }
.hero__wf-row    { display: flex; gap: .4rem; margin-bottom: .3rem; }
.hero__wf--pill  { height: 8px; width: 34px; border-radius: var(--r-pill); }
.hero__wf--h1    { height: 20px; width: 78%; }
.hero__wf--h2    { height: 20px; width: 52%; }
.hero__wf--p     { height: 7px;  width: 88%; }
.hero__wf--short { width: 62%; }
.hero__wf--btn   { height: 26px; width: 104px; border-radius: var(--r-pill); margin-top: .3rem; }

.hero__wf-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
    margin-top: .55rem;
}

.hero__wf--card { height: 58px; }

/* --- vrstva 2: hotový web --- */
.hero__stage--final {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    /* postupné odkrývání zleva doprava */
    clip-path: inset(0 100% 0 0);
    animation: ppFinalReveal 14s cubic-bezier(.4, 0, .2, 1) infinite;
}

@keyframes ppFinalReveal {
    0%, 24%   { clip-path: inset(0 100% 0 0); }
    32%       { clip-path: inset(0 62% 0 0); }
    40%       { clip-path: inset(0 30% 0 0); }
    48%, 88%  { clip-path: inset(0 0 0 0); }
    96%, 100% { clip-path: inset(0 100% 0 0); }
}

/* navigace webu */
.hero__site-nav {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.hero__site-logo {
    width: 20px; height: 20px;
    border-radius: 6px;
    background: var(--grad-brand);
    flex: none;
}

.hero__site-links { display: flex; gap: .34rem; margin-left: .2rem; }
.hero__site-links i {
    display: block;
    width: 26px; height: 5px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .3);
}

.hero__site-cta {
    width: 46px; height: 15px;
    margin-left: auto;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .18);
}

/* hero hotového webu */
.hero__site-hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: .8rem;
    align-items: center;
}

.hero__site-copy { display: grid; gap: .38rem; }

.hero__site-h1 {
    height: 15px;
    width: 92%;
    border-radius: 4px;
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, .72));
}

.hero__site-h1--short { width: 62%; }

.hero__site-p {
    height: 6px;
    width: 88%;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .28);
}

.hero__site-p--short { width: 66%; }

.hero__site-btn {
    height: 24px;
    width: 92px;
    margin-top: .3rem;
    border-radius: var(--r-pill);
    background: var(--grad-brand);
    box-shadow: 0 8px 20px rgba(29, 99, 216, .5);
}

.hero__site-media {
    height: 92px;
    border-radius: 10px;
    background:
        radial-gradient(120% 90% at 20% 15%, rgba(255, 255, 255, .3), transparent 60%),
        linear-gradient(140deg, #2E7BEE, #16A6E8 70%, #7FE3FF);
    box-shadow: 0 12px 26px rgba(3, 10, 26, .4);
}

/* karty hotového webu */
.hero__site-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
    margin-top: auto;
}

.hero__site-card {
    position: relative;
    height: 58px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .07);
}

.hero__site-card i {
    position: absolute;
    top: 9px; left: 9px;
    width: 16px; height: 16px;
    border-radius: 5px;
    background: var(--grad-brand);
    opacity: .9;
}

.hero__site-card:nth-child(2) i { background: linear-gradient(135deg, #16A6E8, #7FE3FF); }
.hero__site-card:nth-child(3) i { background: linear-gradient(135deg, #5FA0F7, #2E7BEE); }

/* --- kurzor, který web „staví“ --- */
.hero__cursor {
    position: absolute;
    top: 0; left: 0;
    width: 20px;
    height: 20px;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
    animation: ppCursorPath 14s cubic-bezier(.45, .05, .3, .95) infinite;
}

@keyframes ppCursorPath {
    0%   { transform: translate(78%, 62%) scale(1);   opacity: 0; }
    6%   { transform: translate(70%, 55%) scale(1);   opacity: 1; }
    /* projde návrh */
    18%  { transform: translate(24%, 24%) scale(1); }
    24%  { transform: translate(12%, 30%) scale(.86); }
    /* táhne odkrývání zleva doprava */
    32%  { transform: translate(38%, 46%) scale(1); }
    40%  { transform: translate(66%, 34%) scale(.86); }
    48%  { transform: translate(92%, 52%) scale(1); }
    /* doladí detaily hotového webu */
    62%  { transform: translate(30%, 78%) scale(1); }
    72%  { transform: translate(58%, 80%) scale(.86); }
    82%  { transform: translate(80%, 26%) scale(1); }
    90%  { transform: translate(88%, 60%) scale(1); opacity: 1; }
    97%, 100% { transform: translate(78%, 62%) scale(1); opacity: 0; }
}

/* Bez animací: rovnou hotový web */
@media (prefers-reduced-motion: reduce) {
    .hero__stage--draft { display: none; }
    .hero__stage--final { clip-path: none; animation: none; }
    .hero__cursor { display: none; }
}
.hero__eyebrow,
.hero .hero__eyebrow {
    text-transform: none;
    letter-spacing: .01em;
}


/* ---------------------------------------------------------------------
   7. Hlavička stránky (podstránky)
   --------------------------------------------------------------------- */

.page-header {
    position: relative;
    padding-block: 3.5rem 2.5rem;
    background: var(--grad-soft);
    border-bottom: 1px solid var(--line-soft);
}

.page-header--homepage {
    background: #fff;
    border-bottom: 0;
    padding-block: var(--section-y) 0;
}

.page-header__title,
.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-style: normal;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--ink-strong);
    text-transform: none;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.page-header__eyebrow {
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--brand-600);
    margin-bottom: .7rem;
}

/* perex v hlavičce jde taky přes celou šířku containeru */
.page-header__perex,
.page-header__content > .rich-text {
    max-width: none;
    font-size: 1.08rem;
    color: var(--ink-muted);
}

/* Texty stránky jdou přes celou šířku containeru */
.page-main__content,
.page-main > .rich-text {
    max-width: none;
}

.page-main {
    padding-block: 0;
}

.breadcrumb {
    background: transparent !important;
    margin-bottom: 1.1rem;
    font-size: .82rem;
    color: var(--ink-faint);
}

.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--brand-600); }

/* ---------------------------------------------------------------------
   8. Nadpisy sekcí
   --------------------------------------------------------------------- */

.section-heading,
.page-subsection__header {
    max-width: 740px;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-heading__title,
.page-subsection__title,
.page-subsection h2,
.contact-form-box__title,
.page-header__title,
.page-title,
.item-detail__title {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    color: var(--ink-strong);
    text-transform: none;
    text-wrap: balance;
}

.section-heading__title,
.page-subsection__title,
.page-subsection h2 {
    font-size: clamp(1.85rem, 3.4vw, 2.6rem);
    margin-bottom: .9rem;
}

.section-heading__text,
.page-subsection__perex {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ink-muted);
}

.section-heading__text p:last-child,
.page-subsection__perex p:last-child { margin-bottom: 0; }

/* Dekorativní oddělovače z původního designu vypnuty */
.section-heading__divider,
.section-divider,
.ornament,
.page-subsection__divider { display: none !important; }

/* Bloky jsou v šabloně uvnitř .container — roztáhneme je přes celou šířku
   okna, obsah uvnitř si drží šířku kontejneru (viz .page-subsection > *). */
.page-subsection {
    width: calc(100vw - var(--sbw, 0px));
    margin-inline: calc(50% - 50vw + var(--sbw, 0px) / 2);
    margin-top: 0;
    padding-block: var(--section-y);
    padding-inline: 0;
    border-top: 0;
    border-radius: 0;
}


/* Vnitřek sekce má stejné odsazení jako .container */
.page-subsection > *,
.blok-section,
.process-section,
.staff-section {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

/* Hlavička sekce bez fotky = vycentrovaná */
.page-subsection__layout--full .page-subsection__content-wrap {
    max-width: 760px;
    margin-inline: auto;
    text-align: center;
    margin-bottom: 3rem;
}

.page-subsection__layout {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.page-subsection__layout--size-1-2 { grid-template-columns: 1fr 1fr; }
.page-subsection__layout--size-1-3 { grid-template-columns: 2fr 1fr; }
.page-subsection__layout--size-2-3 { grid-template-columns: 1fr 2fr; }
.page-subsection__layout--full     { grid-template-columns: 1fr; }

.page-subsection__layout.right { direction: rtl; }
.page-subsection__layout.right > * { direction: ltr; }

.page-subsection__media img {
    width: 100%;
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.page-subsection__more {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.25rem;
    font-weight: 600;
    color: var(--brand-600);
}

.page-subsection__title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.page-subsection__layout:not(.page-subsection__layout--full) .page-subsection__title-row {
    justify-content: flex-start;
}

.page-subsection__link { color: inherit; text-decoration: none; }
.page-subsection__link:hover { color: var(--brand-600); }

/* ---------------------------------------------------------------------
   9. Karty (služby / výhody)
   --------------------------------------------------------------------- */

.staff-grid,
.staff-grid--vyhody {
    display: grid;
    grid-template-columns: repeat(var(--items-per-row, 3), minmax(0, 1fr));
    gap: 1.5rem;
}

.staff-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.9rem 1.7rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .28s cubic-bezier(.2, .8, .25, 1),
                box-shadow .28s ease, border-color .28s ease;
}

.staff-card::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--grad-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s cubic-bezier(.2, .8, .25, 1);
}

.staff-card:hover {
    transform: translateY(-6px);
    border-color: var(--brand-200);
    box-shadow: var(--shadow-lg);
}

.staff-card:hover::after { transform: scaleX(1); }

/* Ikona karty — u výhod i u bloků, když karta nemá fotku */
.staff-card__icon,
.blok-card__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 1.25rem;
    border-radius: 15px;
    background: var(--brand-50);
    color: var(--brand-600);
    transition: background .3s ease, color .3s ease, transform .3s ease;
}

/* Číslo (volba „vlastní číslo“) sedí ve stejném místě jako ikona,
   na rozdíl od ní je ale kulaté */
.staff-card__number,
.blok-card__number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-600);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    transition: background .3s ease, color .3s ease, transform .3s ease;
}

.staff-card:hover .staff-card__number,
.blok-card:hover .blok-card__number {
    background: var(--grad-brand);
    color: #fff;
    transform: scale(1.06);
}

/* ikona i číslo jsou mimo .blok-card__body, srovnáme je s jeho odsazením */
.blok-card__icon,
.blok-card__number {
    margin: 1rem 1rem 0;
}

.staff-card:hover .staff-card__icon,
.blok-card:hover .blok-card__icon {
    background: var(--grad-brand);
    color: #fff;
    transform: scale(1.06) rotate(-4deg);
}

.staff-card__icon svg,
.blok-card__icon svg { width: 26px; height: 26px; }

.staff-card__photo {
    margin: -1.9rem -1.7rem 1.4rem;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.staff-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .8, .25, 1);
}

.staff-card:hover .staff-card__photo img { transform: scale(1.05); }

.staff-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
}

.staff-card__name {
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: .6rem;
    color: var(--ink-strong);
}

.staff-card__perex {
    font-size: .95rem;
    line-height: 1.68;
    color: var(--ink-muted);
}

.staff-card__perex p:last-child { margin-bottom: 0; }

.staff-card__more {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.2rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--brand-600);
    align-self: flex-start;
    transition: gap .2s ease, color .2s ease;
}

.staff-card__more:hover { gap: .7rem; color: var(--brand-800); }

/* Grid pro 4 sloupce (Proč ProfiPage) */
.staff-grid[style*="--items-per-row: 4"] .staff-card { padding: 1.6rem 1.4rem; }

/* ---------------------------------------------------------------------
   10. Postup (jak spolupráce probíhá)
   --------------------------------------------------------------------- */

.process-section { position: relative; }

.process-list {
    display: grid;
    grid-template-columns: repeat(var(--items-per-row, 5), minmax(0, 1fr));
    gap: 1.25rem;
    counter-reset: pp-step;
    position: relative;
}

.process-list::before {
    content: '';
    position: absolute;
    top: 27px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-200), var(--cyan-400), var(--brand-200));
    opacity: .55;
    z-index: 0;
}

.process-list--multirow { row-gap: 2rem; }
.process-list--multirow::before { display: none; }

.process-step {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 .5rem;
}

.process-step__num {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 1.15rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--brand-200);
    box-shadow: 0 6px 18px rgba(29, 99, 216, .14);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--brand-600);
    transition: transform .3s ease, background .3s ease, color .3s ease, border-color .3s ease;
}

.process-step:hover .process-step__num {
    background: var(--grad-brand);
    border-color: transparent;
    color: #fff;
    transform: translateY(-4px) scale(1.06);
}

.process-step__title {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: .5rem;
    color: var(--ink-strong);
}

.process-step__text {
    font-size: .9rem;
    line-height: 1.62;
    color: var(--ink-muted);
}

.process-step__text p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------------
   11. Reference — portfolio karty
   --------------------------------------------------------------------- */

.reference-grid {
    display: grid;
    grid-template-columns: repeat(var(--items-per-row, 3), minmax(0, 1fr));
    gap: 1.75rem;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s cubic-bezier(.2, .8, .25, 1),
                box-shadow .3s ease, border-color .3s ease;
}

.project-card:hover {
    transform: translateY(-7px);
    border-color: var(--brand-200);
    box-shadow: var(--shadow-lg);
}

/* Náhled s lištou prohlížeče */
.project-card__frame {
    position: relative;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--line);
}

.project-card__chrome {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .8rem;
    background: linear-gradient(180deg, #F7FAFF, #EDF3FC);
    border-bottom: 1px solid var(--line);
}

.project-card__chrome > span:not(.project-card__chrome-url) {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line-strong);
}

.project-card__chrome > span:nth-child(1) { background: #FF5F57; }
.project-card__chrome > span:nth-child(2) { background: #FEBC2E; }
.project-card__chrome > span:nth-child(3) { background: #28C840; }

.project-card__chrome-url {
    flex: 1;
    margin-left: .5rem;
    padding: .2rem .6rem;
    border-radius: var(--r-pill);
    background: #fff;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: .7rem;
    color: var(--ink-muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.project-card__shot {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: var(--surface-alt);
}

.project-card__shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 1.1s cubic-bezier(.2, .8, .25, 1);
}

.project-card:hover .project-card__shot img { transform: scale(1.045); }

.project-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.4rem 1.5rem 1.5rem;
}

.project-card__title {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: .45rem;
    color: var(--ink-strong);
}

.project-card__text {
    flex: 1;
    font-size: .9rem;
    line-height: 1.6;
    color: var(--ink-muted);
}

.project-card__text p:last-child { margin-bottom: 0; }

.project-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-soft);
}

.project-card__link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .84rem;
    font-weight: 600;
    color: var(--brand-600);
    transition: gap .2s ease;
}

.project-card__link:hover { gap: .55rem; }

.project-card__year {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .04em;
    color: var(--ink-faint);
    padding: .2rem .55rem;
    border-radius: var(--r-pill);
    background: var(--surface-alt);
}

/* ---------------------------------------------------------------------
   12. Klienti / logo pás
   --------------------------------------------------------------------- */


.clients { padding-block: 0; border: 0; background: transparent; }

.clients__label {
    text-align: center;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 1.75rem;
}

.clients__row {
    display: grid;
    grid-template-columns: repeat(var(--items-per-row, 5), minmax(0, 1fr));
    align-items: center;
    justify-items: stretch;
    gap: 1.15rem;
}

.clients__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    padding: 1rem 1.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.clients__item:hover {
    transform: translateY(-4px);
    border-color: var(--brand-200);
    box-shadow: var(--shadow-md);
}

.clients__item img {
    max-height: 44px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    opacity: .8;
    transition: opacity .3s ease;
}

.clients__item:hover img { opacity: 1; }

.clients__item:hover .staff-card__actions,
.clients__item:focus-within .staff-card__actions,
.process-step:hover .staff-card__actions,
.process-step:focus-within .staff-card__actions {
    opacity: 1;
}

.clients__item .staff-card__actions {
    top: 6px;
    right: 6px;
    gap: 4px;
}

.clients__item .staff-action {
    width: 26px;
    height: 26px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--line);
}

.clients__item .staff-action svg { width: 14px; height: 14px; }

.clients__link { display: block; line-height: 0; }

.clients__name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--ink-faint);
}

/* Všechna tlačítka „Přidat …“ vypadají jako „Přidat blok do sekce“ —
   <button> jinak nedědí písmo a použije systémové (silnější „+“ i text) */
.admin-attach-item,
.admin-attach-item .admin-attach-card__icon,
.admin-attach-item .admin-attach-card__text {
    font-family: var(--font-body);
}

/* Karta „Přidat …“ u kroků, referencí a klientů — stejný vzhled jako
   .blok-card--attach v cms.css (jinak zůstane výchozí systémové tlačítko) */
.process-list .process-step--attach,
.project-card.project-card--attach,
.clients__row .clients__item--attach {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border: 2px dashed var(--color-border);
    background: var(--color-bg-light);
    color: var(--color-text-light);
    box-shadow: none;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.process-list .process-step--attach,
.project-card.project-card--attach {
    width: 100%;
    min-height: 180px;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.project-card.project-card--attach { border-radius: var(--r-xl); }

.process-list .process-step--attach:hover,
.project-card.project-card--attach:hover,
.clients__row .clients__item--attach:hover {
    border-color: var(--color-gold);
    background: var(--color-bg);
    color: var(--color-text);
    box-shadow: none;
    transform: none;
}

.admin-attach-item .admin-attach-card__icon { font-weight: 400; }
.admin-attach-item .admin-attach-card__text { font-weight: 600; }

.clients__item--attach {
    min-width: 150px;
    padding: .75rem 1rem;
}

/* ---------------------------------------------------------------------
   13. CTA pruh
   --------------------------------------------------------------------- */

.cta-band {
    position: relative;
    overflow: hidden;
    padding-block: 4.5rem;
    background: var(--grad-deep);
    color: #fff;
    text-align: center;
    isolation: isolate;
}

.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, #000 20%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, #000 20%, transparent 85%);
}

.cta-band__title {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    color: #fff;
    margin-bottom: .9rem;
    text-wrap: balance;
}

.cta-band__text {
    max-width: 56ch;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .78);
}

.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    justify-content: center;
}

/* ---------------------------------------------------------------------
   14. Textový obsah
   --------------------------------------------------------------------- */

.rich-text,
.page-content {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--ink);
}

/* Barvu určuje kontejner — karty si ji přepisují na tlumenou */
.rich-text p,
.rich-text li,
.rich-text h2,
.rich-text h3,
.rich-text strong,
.page-content p,
.page-content li { color: inherit; }

.rich-text h2,
.rich-text h3 { color: var(--ink-strong); }

.rich-text p,
.page-content p { margin-bottom: 1.15rem; }

.rich-text h2, .page-content h2 {
    font-size: 1.7rem;
    margin: 2.5rem 0 1rem;
}

.rich-text h3, .page-content h3 {
    font-size: 1.3rem;
    margin: 2.2rem 0 .9rem;
}

.rich-text ul, .page-content ul,
.rich-text ol, .page-content ol {
    margin: 0 0 1.35rem 1.15rem;
    padding-left: .5rem;
}

.rich-text li, .page-content li { margin-bottom: .5rem; }

/* Seznam s fajfkami */
.rich-text ul.check-list,
.page-content ul.check-list {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
    display: grid;
    gap: .7rem;
}

.rich-text ul.check-list li,
.page-content ul.check-list li {
    position: relative;
    padding-left: 2.1rem;
    margin-bottom: 0;
}

.rich-text ul.check-list li::before,
.page-content ul.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .28em;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D63D8' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.rich-text blockquote,
.page-content blockquote {
    position: relative;
    margin: 2rem 0;
    padding: 1.6rem 1.8rem 1.6rem 2.1rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand-500);
    border-radius: var(--r-lg);
    background: var(--surface-soft);
    font-size: 1.05rem;
    color: var(--ink);
}

.rich-text blockquote p:last-child,
.page-content blockquote p:last-child { margin-bottom: 0; }

.rich-text a, .page-content a {
    color: var(--brand-600);
    text-decoration: underline;
    text-decoration-color: var(--brand-200);
    text-underline-offset: 3px;
    transition: text-decoration-color .2s ease, color .2s ease;
}

.rich-text a:hover, .page-content a:hover {
    color: var(--brand-800);
    text-decoration-color: currentColor;
}

.rich-text a.phone, .rich-text a.email,
.page-content a.phone, .page-content a.email {
    font-weight: 600;
    text-decoration: none;
}

/* ---------------------------------------------------------------------
   15. Kontaktní formulář
   --------------------------------------------------------------------- */

.section--contact-form {
    padding-block: var(--section-y);
    background: var(--surface-soft);
}

.contact-form-box {
    max-width: 1060px;
    margin-inline: auto;
    padding: 3rem clamp(1.5rem, 4vw, 3.25rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md);
}

.contact-form-box__title {
    text-align: center;
    font-size: clamp(1.7rem, 3.2vw, 2.35rem);
    letter-spacing: -0.035em;
    margin-bottom: .75rem;
}

.contact-form-box__subtitle {
    text-align: center;
    max-width: 54ch;
    margin: 0 auto 2.5rem;
    font-size: 1.02rem;
    color: var(--ink-muted);
}

.contact-form-box__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 1.75rem;
}

.contact-form-box__left,
.contact-form-box__right {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group { position: relative; }

.contact-form-box .form-group { margin: 0; }

.form-control {
    width: 100%;
    padding: .85rem 1rem;
    font-family: var(--font-body);
    font-size: .98rem;
    color: var(--ink);
    background: var(--surface-soft);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.form-control:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 4px rgba(46, 123, 238, .13);
}

.form-control--textarea { min-height: 148px; resize: vertical; }

/* Plovoucí popisky jen tam, kde jsou (poptávkový formulář) */
.field-float { position: relative; }

.field-float > .form-control { padding: 1.15rem 1rem .55rem; }

/* Klasické popisky (administrace) — nikoli plovoucí */
.form-group:not(.field-float) > label {
    display: block;
    margin-bottom: .4rem;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* Přihlášení používá popisek „zapuštěný“ do rámečku pole */
.login-box .form-group > label {
    display: inline-block;
    margin-bottom: 0;
    font-size: .7rem;
}

.field-float > label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .96rem;
    color: var(--ink-faint);
    pointer-events: none;
    transition: all .18s ease;
}

.field-float--textarea > label { top: 1.35rem; transform: none; }

.field-float > .form-control:focus + label,
.field-float > .form-control:not(:placeholder-shown) + label,
.field-float--static > label {
    top: .5rem;
    transform: none;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--brand-600);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

/* Řádky administračního formuláře s jiným počtem sloupců.
   Musí být tady, ne v cms.css — profipage.css se načítá později,
   takže obecné .form-row výše jinak modifikátory přebije. */
.form-row--page-type {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
}

/* Prvky ze stránky | Podstránky ze stránky | Počet převzatých prvků */
.form-row--zdroj {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
}

/* počet bez zvoleného zdroje nemá smysl — pole zůstává vidět, ale ztlumené */
.form-row--zdroj .form-control:disabled {
    background: var(--surface-soft);
    color: var(--ink-faint);
    cursor: not-allowed;
}

/* Zaškrtávátko na místě formulářového pole. Popisky v modalu jsou plovoucí
   (position: absolute), takže se tenhle label musí vrátit do toku. */
.modal-box__body .form-group label.form-checkbox--field {
    position: static;
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: 0;
    background: none;
    font-size: .88rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.35;
    color: var(--ink);
    pointer-events: auto;
    cursor: pointer;
}

.modal-box__body .form-checkbox--field input[type="checkbox"] {
    flex: none;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* foto: náhled + výběr souboru + pozice + velikost na jednom řádku */
.form-row--media-inline {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: .75rem;
}

.form-row--media-inline .form-group--wide {
    flex: 1 1 auto;
    min-width: 0;
}

.form-row--media-inline .form-group--compact {
    flex: 0 0 auto;
}

.form-row--media-inline .form-control--compact { width: auto; }

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .86rem;
    line-height: 1.55;
    color: var(--ink-muted);
    cursor: pointer;
}

.form-checkbox input { margin-top: .25rem; accent-color: var(--brand-600); }

.contact-form-box__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-top: .35rem;
}

.btn--submit { min-width: 190px; }

.form-errors {
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    border: 1px solid #F4C7CD;
    border-radius: var(--r-md);
    background: #FEF2F3;
    color: #A32330;
    font-size: .9rem;
}

/* ---------------------------------------------------------------------
   17. Patička
   --------------------------------------------------------------------- */

.footer {
    padding-block: 4.5rem 0;
    background: var(--surface-deep);
    color: rgba(255, 255, 255, .72);
    font-size: .94rem;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr .9fr;
    gap: 3rem 2.5rem;
    padding-bottom: 3.25rem;
}

/* Text v patičce je vždy světlý — přebíjíme barvy z cms.css */
.footer,
.footer p,
.footer li,
.footer div,
.footer span,
.footer .rich-text,
.footer .rich-text p {
    color: rgba(255, 255, 255, .72);
}

.footer strong { color: #fff; }

.footer__brand .logo,
.footer__brand .logo__word {
    color: #fff;
    --logo-dot: #8FC3FB;
}
.footer__brand .logo__tagline { color: rgba(255, 255, 255, .48); }

.footer__brand p {
    margin-top: 1.1rem;
    font-size: .95rem;
    color: rgba(255, 255, 255, .6);
}

.footer h3,
.footer__col-title {
    font-family: var(--font-heading);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
    margin-bottom: 1.15rem;
}

.footer__text > div { margin-bottom: 1rem; }

.footer__text-contact {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: .85rem;
}

.footer__text-contact-item {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: rgba(255, 255, 255, .72);
    transition: color .2s ease;
}

.footer__text-contact-item:hover { color: #fff; }
.footer__text-contact-item svg { color: var(--cyan-400); flex: none; }

.footer__text-company {
    margin-top: 1rem;
    font-size: .84rem;
    color: rgba(255, 255, 255, .45);
}

.footer__text-social { display: flex; gap: .55rem; margin-top: 1.25rem; }

.footer__text-social-link {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .8);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.footer__text-social-link:hover {
    background: var(--brand-600);
    color: #fff;
    transform: translateY(-2px);
}

.footer__content { color: rgba(255, 255, 255, .6); }
.footer__content p { margin-bottom: .9rem; }

.footer__links {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.footer__links a {
    color: rgba(255, 255, 255, .72);
    font-size: .94rem;
    transition: color .2s ease, padding-left .2s ease;
}

.footer__links a:hover { color: #fff; padding-left: 4px; }

.footer__copy {
    padding-block: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, .09);
}

.footer__copy-inner,
.footer__copy-inner p {
    font-size: .84rem;
    color: rgba(255, 255, 255, .45);
}

.footer__copy-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.footer__copy-inner a { color: rgba(255, 255, 255, .7); }
.footer__copy-inner a:hover { color: #fff; }

/* oddělovač mezi odkazy (zásady · změna hesla · odhlásit) */
.footer__copy-sep {
    margin-inline: .45rem;
    color: rgba(255, 255, 255, .35);
}

/* Sloupec značky v patičce */
.footer__brand p,
.footer__brand-text p {
    color: rgba(255, 255, 255, .58);
}

.footer__brand-text {
    margin-top: 1.25rem;
    max-width: 34ch;
}

.footer__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Odeslání poptávky */
.contact-form-box__bottom .btn--submit,
.btn--submit {
    text-transform: none;
    letter-spacing: -0.01em;
    min-width: 200px;
}

.contact-form-box__bottom .form-checkbox {
    flex: 1 1 260px;
    max-width: 42ch;
}

.footer__links a,
.footer__text-contact-item,
.footer__text-contact-item span {
    color: rgba(255, 255, 255, .74);
}

/* ---------------------------------------------------------------------
   18. Detail prvku
   --------------------------------------------------------------------- */

.item-detail__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 3rem;
    align-items: start;
}

.item-detail__title {
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    letter-spacing: -0.035em;
    margin-bottom: 1.25rem;
}

.item-detail__photo img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

/* ---------------------------------------------------------------------
   19. Animace při scrollu
   --------------------------------------------------------------------- */

[data-animate] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s cubic-bezier(.2, .8, .25, 1),
                transform .6s cubic-bezier(.2, .8, .25, 1);
    transition-delay: calc(var(--stagger, 0) * 70ms);
}

[data-animate="zoom-in"] { transform: translateY(22px) scale(.97); }

[data-animate].is-visible,
[data-animate].animate-in,
[data-animate].visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    [data-animate] { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
   20. Responzivita
   --------------------------------------------------------------------- */

@media (max-width: 1080px) {
    :root { --section-y: 5rem; }

    .hero__layout { grid-template-columns: 1fr; gap: 3rem; }
    .hero__content { max-width: 100%; }
    .hero__visual { max-width: 560px; margin-inline: auto; width: 100%; }
    .hero__window { transform: none; animation: none; }

    .footer__inner { grid-template-columns: 1fr 1fr; }
    .process-list { grid-template-columns: repeat(min(var(--items-per-row, 5), 3), minmax(0, 1fr)); gap: 2rem 1.25rem; }
    .process-list::before { display: none; }
}

@media (max-width: 900px) {

    .staff-grid,
    .staff-grid--vyhody,
    .reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

    .contact-form-box__grid { grid-template-columns: 1fr; }
    .item-detail__hero { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
    :root { --section-y: 3.75rem; --header-height: 72px; }

    .container { padding-inline: 1.15rem; }

    /* i na mobilu přesně jedna obrazovka — text i vizuál se musí vejít
       pod sebe, proto stažené odsazení, mezera i výška okna */
    .hero { padding-block: calc(var(--header-height) + 1.25rem) 1.75rem; }
    /* na nízkých telefonech (SE, starší iPhony) už se okno prohlížeče
       pod text nevejde — hero zůstane jednou obrazovkou jen s textem */
    @media (max-height: 740px) {
        .hero__visual { display: none; }
    }
    .hero__layout { gap: 1.5rem; }
    .hero__title { font-size: clamp(2rem, 8.5vw, 2.6rem); margin-bottom: .9rem; }
    .hero__content-text { font-size: 1rem; margin-bottom: 1.35rem; }
    .hero__actions .btn { width: 100%; }
    .hero__cursor { display: none; }


    .staff-grid,
    .staff-grid--vyhody,
    .reference-grid { grid-template-columns: 1fr !important; }

    .process-list { grid-template-columns: 1fr; gap: 1.5rem; }
    .process-step { display: grid; grid-template-columns: 54px 1fr; gap: 1.1rem; text-align: left; padding: 0; }
    .process-step__num { margin: 0; }

    .contact-form-box { padding: 2rem 1.35rem; }
    .form-row,
    .form-row--page-type,
    .form-row--zdroj { grid-template-columns: 1fr; }
    .form-row--media-inline { flex-wrap: wrap; }
    .contact-form-box__bottom { flex-direction: column; align-items: stretch; }
    .btn--submit { width: 100%; }

    .footer__inner { grid-template-columns: 1fr; gap: 2.25rem; }
    .footer__copy-inner { flex-direction: column; text-align: center; }
}

/* ---------------------------------------------------------------------
   21. Doladění po cms.css (EVIA) — vypnutí zděděných překryvů
   --------------------------------------------------------------------- */

/* cms.css kreslí přes hero bílý závoj kvůli světlé fotce — u tmavého
   hera ho nechceme (na mobilu byl dokonce rgba(255,255,255,.82)). */
.hero::after {
    content: none !important;
    background: none !important;
}

/* cms.css natahuje .hero .container na 100 % výšky a přidává vlastní odsazení */
.hero .container {
    display: block;
    height: auto;
    padding-top: 0;
    padding-bottom: 0;
    z-index: 1;
}

@media (max-width: 900px) {
    .hero .hero__content {
        max-width: 100%;
        margin-left: 0;
        padding: 0;
        text-align: left;
    }

    .hero .hero__eyebrow { font-size: .8rem; }
    .hero .hero__content-text { font-size: 1rem; }
}

@media (max-width: 640px) {
    .hero .hero__title { font-size: clamp(2rem, 8.5vw, 2.6rem); }


    /* karty ve výpisech na mobilu vždy přes celou šířku */
    .staff-grid,
    .staff-grid--vyhody,
    .reference-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
    .hero .hero__content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 0;
        text-align: left;
    }

    .hero .hero__eyebrow { font-size: .78rem; letter-spacing: .01em; }
    .hero .hero__title { font-size: clamp(1.9rem, 8.5vw, 2.4rem); }
    .hero .hero__content-text { font-size: 1rem; }
}

/* ---------------------------------------------------------------------
   22. Ochrana proti přetečení na malých displejích
   --------------------------------------------------------------------- */

/* Grid s implicitním minmax(auto, 1fr) umí přetéct — vynutíme min-width: 0 */
.hero__layout > * ,
.staff-grid > *,
.reference-grid > *,
.process-list > * { min-width: 0; }

@media (max-width: 1080px) {
    .hero__layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
    /* podtitulek v logu se na úzkých displejích nevejde vedle hamburgeru */
    .logo__tagline { display: none; }
    .logo__word { font-size: 2rem; }
    .header__inner { gap: 1rem; }
}

@media (max-width: 640px) {
    .hero__visual { max-width: 100%; }
    .hero__window { max-width: 100%; }
    .hero__window-body { padding: 1rem; min-height: 150px; }
}

/* Logo v přihlašovacím boxu */
.login-box__header .logo {
    justify-content: center;
    margin-bottom: 1.1rem;
}

/* ---------------------------------------------------------------------
   23. Pozadí bloků přes celou šířku stránky
   --------------------------------------------------------------------- */

/* Barvu bloku určuje pole „Pozadí“ u stránky v administraci */
.page-subsection--bg-bila   { background: var(--surface); }
.page-subsection--bg-svetla { background: var(--surface-alt); }

.page-subsection--bg-modra {
    background: linear-gradient(180deg, var(--brand-50) 0%, #E8F1FE 100%);
}

.page-subsection--bg-tmava {
    position: relative;
    background: var(--grad-deep);
    color: rgba(255, 255, 255, .8);
    isolation: isolate;
}

.page-subsection--bg-tmava::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, #000 20%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 50%, #000 20%, transparent 85%);
}

.page-subsection--bg-tmava .page-subsection__title,
.page-subsection--bg-tmava h2,
.page-subsection--bg-tmava h3 { color: #fff; }

.page-subsection--bg-tmava .page-subsection__intro,
.page-subsection--bg-tmava .page-subsection__perex { color: rgba(255, 255, 255, .74); }

/* Ohraničení karty — pole „Ohraničení karty“ u prvku. Hodnota platí stejně
   při jakémkoli rozložení (např. 5 vedle sebe má v cms.css border: none),
   proto nastavujeme celou čáru s !important, ne jen barvu. */
.card-border-zadne        { --card-border: transparent; }
.card-border-seda         { --card-border: var(--line); }
.card-border-svetle-modra { --card-border: var(--brand-200); }
.card-border-modra        { --card-border: var(--brand-600); }
.card-border-azurova      { --card-border: var(--cyan-500); }
.card-border-tmava        { --card-border: var(--brand-900); }

[class*="card-border-"],
[class*="card-border-"]:hover {
    border: 1px solid var(--card-border) !important;
}

/* Sousedící sekce se stejným pozadím oddělíme vlasovou linkou */
.page-subsection--bg-bila + .page-subsection--bg-bila,
.page-subsection--bg-svetla + .page-subsection--bg-svetla {
    border-top: 1px solid var(--line-soft);
}

/* ---------------------------------------------------------------------
   24. Karusel referencí
   --------------------------------------------------------------------- */

.carousel__nav {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.staff-carousel__btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--brand-600);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.staff-carousel__btn:hover {
    background: var(--grad-brand);
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
}

.reference-carousel__track {
    display: flex;
    gap: 1.75rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .5rem;
}

.reference-carousel__track::-webkit-scrollbar { display: none; }

.reference-carousel__track .project-card {
    flex: 0 0 calc((100% - (var(--items-per-row, 3) - 1) * 1.75rem) / var(--items-per-row, 3));
    min-width: 260px;
    scroll-snap-align: start;
}

@media (max-width: 900px) {
    .reference-carousel__track .project-card {
        flex-basis: calc((100% - 1.75rem) / 2);
    }
}

@media (max-width: 640px) {
    .reference-carousel__track .project-card { flex-basis: 88%; min-width: 0; }
    .carousel__nav { justify-content: center; }
}

/* Hlavička detailu prvku sdílí pruh s .page-header (obojí je <section>
   přes celou šířku), jen uvnitř má vlastní dvousloupcový layout. */
.item-detail__header .item-detail__hero {
    margin-bottom: 0;
}

/* Parametry realizace v hlavičce detailu — hned pod perexem */
.item-detail__params {
    margin-top: 1.5rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--line);
}

/* stejný řez jako nadpis „Fotogalerie“ (.gallery-carousel__header h2) */
.item-detail__params .item-detail__params-title {
    margin: 0 0 1.25rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: none;
    color: var(--ink-strong);
}

.item-detail__params ul.check-list { gap: .55rem; }
.item-detail__params ul.check-list li { font-size: .95rem; }

/* Karusel klientských log — stejné chování jako u referencí */
.clients-carousel__track {
    display: flex;
    gap: 1.15rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .5rem;
}

.clients-carousel__track::-webkit-scrollbar { display: none; }

.clients-carousel__track .clients__item {
    flex: 0 0 calc((100% - (var(--items-per-row, 5) - 1) * 1.15rem) / var(--items-per-row, 5));
    min-width: 140px;
    scroll-snap-align: start;
}

@media (max-width: 900px) {
    .clients-carousel__track .clients__item { flex-basis: calc((100% - 2 * 1.15rem) / 3); }
}

@media (max-width: 640px) {
    .clients-carousel__track .clients__item { flex-basis: calc((100% - 1.15rem) / 2); min-width: 0; }
}

@media (max-width: 900px) {
    .clients__row { grid-template-columns: repeat(min(var(--items-per-row, 5), 3), minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .clients__row { grid-template-columns: repeat(min(var(--items-per-row, 5), 2), minmax(0, 1fr)); }
}

/* Sekce s logy klientů nepotřebuje tak velké odsazení */
.page-subsection:has(.clients) { padding-block: 4.25rem; }

/* Zděděná pravidla z cms.css pro barevné bloky (rámeček + vnitřní odsazení) */
.page-subsection--bg-bila,
.page-subsection--bg-svetla,
.page-subsection--bg-modra,
.page-subsection--bg-tmava {
    border-radius: 0;
    padding-inline: 0;
    padding-block: var(--section-y);
    border-top: 0;
}

/* ---------------------------------------------------------------------
   25. Fotogalerie u detailu projektu
   --------------------------------------------------------------------- */

.gallery-carousel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 3.5rem 0 1.5rem;
}

.gallery-carousel__header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: none;
    color: var(--ink-strong);
    margin: 0;
}

.gallery-carousel__nav { display: flex; gap: .5rem; }

.gallery-carousel__btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--brand-600);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.gallery-carousel__btn:hover {
    background: var(--grad-brand);
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
}

.gallery-carousel__track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: .5rem;
}

.gallery-carousel__track::-webkit-scrollbar { display: none; }

.gallery-card { flex: 0 0 calc((100% - 2 * 1.25rem) / 3); min-width: 220px; }

.gallery-card__image {
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface-alt);
    box-shadow: var(--shadow-sm);
}

.gallery-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .6s cubic-bezier(.2, .8, .25, 1);
}

.gallery-card:hover .gallery-card__image img { transform: scale(1.05); }

.gallery-card__caption {
    margin-top: .6rem;
    font-size: .85rem;
    color: var(--ink-muted);
}

/* Náhled projektu v hlavičce detailu */
.item-detail__photo img { max-height: 400px; }

@media (max-width: 900px) {
    .gallery-card { flex-basis: calc((100% - 1.25rem) / 2); }
}

@media (max-width: 640px) {
    .gallery-card { flex-basis: 86%; min-width: 0; }
    .gallery-carousel__header { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------------
   Karusely — šipky jen když se prvky nevejdou (main.js, syncCarouselNav);
   karusel se vykresluje vždy, když je zapnutý, i na mobilu
   --------------------------------------------------------------------- */
.blok-carousel__nav[hidden],
.staff-carousel__nav[hidden],
.carousel__nav[hidden] {
    display: none;
}

.blok-carousel__track.is-scrollable,
.staff-carousel__track.is-scrollable {
    scroll-snap-type: x mandatory;
}

.blok-carousel__track.is-scrollable > *,
.staff-carousel__track.is-scrollable > * {
    scroll-snap-align: start;
}

/* Karty v karuselu se jen prolnou, bez posunu/zvětšení — zmenšená karta
   (scale) by posunula body přichycení a první karta by zůstala uříznutá */
.blok-carousel__track > [data-animate],
.staff-carousel__track > [data-animate] {
    transform: none;
}

/* Obecné .photo-link { height: 100% } (gallery.css) roztáhlo odkaz s fotkou
   na celou kartu a popisek pod fotkou pak karusel ořízl */
.gallery-card .photo-link {
    height: auto;
}

/* „Přidat blok do sekce“ v mřížce „5 vedle sebe“ — pravidlo v cms.css
   by mu jinak vzalo čárkovaný rámeček, pozadí i odsazení */
.blok-grid--ratio-1-5 .blok-card.blok-card--attach {
    padding: 1.5rem;
    border: 2px dashed var(--color-border);
    background: var(--color-bg-light);
}

.blok-grid--ratio-1-5 .blok-card.blok-card--attach:hover {
    border-color: var(--color-gold);
    background: var(--color-bg);
}

/* ----------------------------------------------------------
   Galerie — opravy jádra 2026-09-21
   ---------------------------------------------------------- */
/* bez pevného nadpisu „Galerie“ zůstávají šipky karuselu vpravo */
.gallery-carousel__header > .gallery-carousel__nav:first-child {
	margin-left: auto;
}

/* galerie bez hlavní fotky — zobrazí se (a dá se upravit) i dřív, než má fotky */
.gallery-card--empty .gallery-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	border: 2px dashed var(--color-border);
}

.gallery-card__placeholder {
	font-family: var(--font-heading);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--color-text-light);
	text-align: center;
}

/* správcovská tlačítka na kartě galerie (přesun, úprava, odebrání, smazání) */
.gallery-carousel__track > figure.gallery-card {
	position: relative;
}

.gallery-carousel__track > figure.gallery-card:hover .staff-card__actions,
.gallery-carousel__track > figure.gallery-card:focus-within .staff-card__actions {
	opacity: 1;
}

/* přihlášený správce vidí galerie v mřížce pod sebou, aby se daly přetahovat */
.gallery-carousel__track--admin {
	flex-wrap: wrap;
	overflow: visible;
}
