/* ============================================================
   Prodejní web garáže — styly
   Barvy a základ se ladí tady, obsah v config.php
   ============================================================ */

:root {
    /* paleta podle marekhervir.cz */
    --primarni:       #6B46C1;
    --primarni-tmava: #5A37A8;
    --zlata:          #B89968;
    --pozadi:         #FAFAF8;
    --bila:           #ffffff;
    --text:           #1A1A1A;
    --text-tlumeny:   #6B6B6B;
    --linka:          #D6D2CC;
    --polomer:        14px;
    --stin:           0 2px 16px rgba(107, 70, 193, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--pozadi);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.obal { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.obal-uzky { max-width: 760px; margin: 0 auto; padding: 0 20px; }

h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 1.2rem; }
.sekce h2 { text-align: center; }
h3 { font-size: 1.1rem; }

svg { width: 1.25em; height: 1.25em; flex-shrink: 0; }

/* ---------- Tlačítka ---------- */
.tlacitko {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.85em 1.6em;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.tlacitko:active { transform: scale(0.98); }

.tlacitko-hlavni {
    background: var(--primarni);
    color: var(--bila);
}
.tlacitko-hlavni:hover { background: var(--primarni-tmava); }

.tlacitko-vedlejsi {
    background: transparent;
    color: var(--primarni);
    border-color: var(--primarni);
}
.tlacitko-vedlejsi:hover { background: rgba(107, 70, 193, 0.07); }

/* ---------- Hlavička ---------- */
.hlavicka {
    background: var(--bila);
    border-bottom: 1px solid var(--linka);
}
.hlavicka-vnitrek {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}
.hlavicka-nazev strong { display: block; font-size: 1.05rem; }
.hlavicka-nazev span { font-size: 0.85rem; color: var(--text-tlumeny); }
.hlavicka-telefon {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: var(--primarni);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.05rem;
}

/* ---------- Hero ---------- */
.hero { background: var(--bila); }
.hero-mrizka {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: 1fr auto auto auto 1fr;
    gap: 0 48px;
    align-items: center;
    padding-top: 56px;
    padding-bottom: 56px;
}
.hero-lokalita {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    color: var(--primarni);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}
.hero-podtitulek {
    margin-top: 1rem;
    font-size: 1.15rem;
    color: var(--text-tlumeny);
    max-width: 34em;
}
.hero-stitky {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.3rem;
}
.hero-stitky li {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background: var(--pozadi);
    border: 1px solid var(--linka);
    border-radius: 999px;
    padding: 0.4em 0.9em;
    font-size: 0.9rem;
    font-weight: 600;
}
.hero-stitky svg { color: var(--primarni); }
.hero-cena { margin-top: 1.6rem; }
.hero-cena strong {
    display: block;
    font-size: clamp(1.9rem, 3.5vw, 2.4rem);
    color: var(--primarni);
    letter-spacing: -0.02em;
}
.hero-cena span { color: var(--text-tlumeny); font-size: 0.95rem; }
.hero-text { grid-column: 1; grid-row: 2; }
.hero-cena { grid-column: 1; grid-row: 3; }
.hero-tlacitka {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.6rem;
    grid-column: 1;
    grid-row: 4;
}

.hero-video { display: flex; justify-content: center; grid-column: 2; grid-row: 1 / 6; }
.telefon-ramecek {
    position: relative;
    width: min(100%, 300px);
    aspect-ratio: 9 / 16;
    border-radius: 28px;
    overflow: hidden;
    background: var(--primarni-tmava);
    box-shadow: 0 18px 48px rgba(107, 70, 193, 0.28);
    border: 6px solid #1a1a18;
}
.telefon-ramecek video,
.telefon-ramecek img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-zvuk {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    background: rgba(15, 15, 20, 0.65);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.55em 1.1em;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}
.video-zvuk:hover { background: rgba(15, 15, 20, 0.85); }
.video-zvuk svg { width: 1.1em; height: 1.1em; }

/* ---------- Fakta ---------- */
.fakta {
    background: var(--primarni);
    color: var(--bila);
    padding: 22px 0;
}
.fakta-seznam {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 18px 28px;
}
.fakta-seznam li {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
}
.fakta-ikona {
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}
.fakta-ikona svg { width: 22px; height: 22px; }
.fakta-popisek { font-size: 0.78rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.04em; }
.fakta-hodnota { font-weight: 700; font-size: 1.05rem; }

@media (max-width: 640px) {
    .fakta-seznam { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
    .fakta-seznam li { justify-content: start; }
    .fakta-ikona { width: 34px; height: 34px; border-radius: 10px; }
    .fakta-ikona svg { width: 18px; height: 18px; }
    .fakta-popisek { font-size: 0.68rem; }
    .fakta-hodnota { font-size: 0.92rem; }
}

/* ---------- Sekce ---------- */
.sekce { padding: 48px 0; }
.cta-radek { display: flex; justify-content: center; margin-top: 28px; }
.sekce-svetla { background: var(--bila); }
.sekce-tesna { padding-top: 0; }

/* ---------- Výhody ---------- */
.vyhody {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.vyhoda {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bila);
    border: 1px solid var(--linka);
    border-radius: var(--polomer);
    padding: 20px;
}
.vyhoda-ikona {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(107, 70, 193, 0.1);
    color: var(--primarni);
    flex-shrink: 0;
}
.vyhoda-ikona svg { width: 18px; height: 18px; }
.vyhoda h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.vyhoda p { font-size: 0.9rem; color: var(--text-tlumeny); }

/* ---------- Galerie ---------- */
.galerie {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.galerie-polozka {
    border-radius: var(--polomer);
    overflow: hidden;
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--linka);
}
.galerie-polozka img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s;
}
.galerie-polozka:hover img { transform: scale(1.04); }
.galerie-polozka:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* ---------- Popis + pro koho ---------- */
.popis-odstavec { margin-bottom: 1rem; font-size: 1.08rem; }
.pro-koho {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
}
.pro-koho-karta {
    background: var(--pozadi);
    border: 1px solid var(--linka);
    border-radius: var(--polomer);
    padding: 24px 20px;
}
.pro-koho-ikona {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--primarni);
    color: var(--bila);
    margin-bottom: 14px;
}
.pro-koho-ikona svg { width: 24px; height: 24px; }
.pro-koho-karta h3 { margin-bottom: 0.4rem; }
.pro-koho-karta p { font-size: 0.95rem; color: var(--text-tlumeny); }

/* ---------- Rozměry ---------- */
.rozmery-poznamka {
    color: var(--text-tlumeny);
    font-size: 1.08rem;
    max-width: 40em;
    margin-top: -0.6rem;
    margin-bottom: 1.8rem;
}
.rozmery-mrizka {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.rozmery-schema {
    background: var(--bila);
    border: 1px solid var(--linka);
    border-radius: var(--polomer);
    padding: 28px;
    display: flex;
    justify-content: center;
}
.rozmery-schema svg {
    width: auto;
    height: min(420px, 60vw);
}
.rozmery-schema-foto { padding: 0; overflow: hidden; }
.rozmery-schema-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rozmery-seznam { list-style: none; }
.rozmery-seznam li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--linka);
}
.rozmery-seznam span { color: var(--text-tlumeny); }
.rozmery-seznam strong { font-size: 1.15rem; white-space: nowrap; }

/* ---------- Lokalita ---------- */
.lokalita-mrizka {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
    align-items: center;
}
.mapa {
    position: relative;
    border-radius: var(--polomer);
    overflow: hidden;
    box-shadow: var(--stin);
    aspect-ratio: 16 / 10;
}
.mapa iframe { width: 100%; height: 100%; border: 0; }
.mapa-google {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background: var(--bila);
    color: var(--primarni);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.mapa-google:hover { background: #F2EEFB; }
.mapa-google svg { width: 1em; height: 1em; }
.dojezdova-mapa svg { width: 100%; height: auto; display: block; }
.mapa-schema svg { width: 100%; height: auto; display: block; }
.dojezdova-mapa text {
    font-family: inherit;
    paint-order: stroke;
    stroke: var(--bila);
    stroke-width: 6px;
    stroke-linejoin: round;
}
.dojezd-nazev { font-size: 23px; font-weight: 700; fill: var(--text); }
.dojezd-cas   { font-size: 18px; fill: var(--text-tlumeny); }
.dojezd-stred {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.1em;
    fill: var(--primarni);
}

/* ---------- Cena ---------- */
.cena-karta {
    background: var(--bila);
    color: var(--text);
    border: 3px solid var(--primarni);
    border-radius: 20px;
    padding: 44px 40px;
    text-align: center;
    box-shadow: 0 12px 32px rgba(107, 70, 193, 0.12);
}
.cena-karta h2 { color: var(--text); }
.cena-castka {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primarni);
}
.cena-pozn { color: var(--text-tlumeny); margin-bottom: 1.4rem; }
.cena-seznam {
    list-style: none;
    text-align: left;
    max-width: 460px;
    margin: 0 auto 1.8rem;
}
.cena-seznam li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
}
.cena-seznam svg { color: var(--zlata); margin-top: 0.2em; }


/* ---------- Investiční karta (v „pro koho") ---------- */
.pro-koho-investice {
    background: #F2EEFB;
    border-color: rgba(107, 70, 193, 0.30);
}
.pro-koho-investice p + p { margin-top: 0.35rem; }
.pro-koho-investice strong { color: var(--primarni); font-weight: 700; }

/* ---------- Prodejce ---------- */
.prodejce {
    display: flex;
    gap: 28px;
    align-items: center;
}
.prodejce-foto {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--linka);
    flex-shrink: 0;
}
.prodejce-jmeno { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.4rem; }

/* ---------- FAQ ---------- */
.faq-polozka {
    background: var(--bila);
    border: 1px solid var(--linka);
    border-radius: var(--polomer);
    margin-bottom: 10px;
    overflow: hidden;
}
.faq-polozka summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 44px;
}
.faq-polozka summary::-webkit-details-marker { display: none; }
.faq-polozka summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--primarni);
    transition: transform 0.2s;
}
.faq-polozka[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-polozka p { padding: 0 20px 16px; color: var(--text-tlumeny); }

/* ---------- Kontakt ---------- */
.kontakt-sekce { background: var(--bila); }
.kontakt-karta {
    background: var(--pozadi);
    border: 1px solid var(--linka);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}
.kontakt-podtext { color: var(--text-tlumeny); margin-bottom: 1.6rem; }
.kontakt-podtext a { color: var(--primarni); font-weight: 700; }
.formular { max-width: 420px; margin: 0 auto; text-align: left; }
.formular-pole { margin-bottom: 14px; }
.formular-pole label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.formular-pole input,
.formular-pole textarea {
    width: 100%;
    padding: 0.8em 1em;
    border: 1px solid var(--linka);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bila);
}
.formular-pole textarea {
    font-family: inherit;
    resize: vertical;
    min-height: 84px;
}
.formular-pole input:focus,
.formular-pole textarea:focus {
    outline: 2px solid var(--primarni);
    outline-offset: 1px;
    border-color: var(--primarni);
}
.pole-nepovinne { font-weight: 400; color: var(--text-tlumeny); }
.formular button { width: 100%; margin-top: 6px; }
.formular-pozn {
    font-size: 0.8rem;
    color: var(--text-tlumeny);
    margin-top: 10px;
    text-align: center;
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.whatsapp-odkaz { margin-top: 18px; }

/* Telefonní číslo se nikdy nezalomí přes dva řádky */
a[href^="tel:"] { white-space: nowrap; }

/* ---------- Patička ---------- */
.paticka {
    padding: 28px 0;
    text-align: center;
    color: var(--text-tlumeny);
    font-size: 0.85rem;
}
.paticka p { margin: 4px 0; }
.paticka strong { color: var(--text); }
.paticka a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.paticka a:hover { color: var(--primarni); }

/* ---------- Sticky lišta (mobil) ---------- */
.mobilni-lista {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--bila);
    border-top: 1px solid var(--linka);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 50;
}
.mobilni-lista .tlacitko { flex: 1; padding: 0.75em 0.5em; font-size: 0.95rem; }
.mobilni-lista.skryta { display: none !important; }
.mobilni-lista.pred-galerii { display: none !important; }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 20, 17, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox figure {
    max-width: min(1000px, 90vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lightbox img {
    width: 100%;
    height: 78vh;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox figcaption { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }
.lightbox button {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-zavrit { top: 18px; right: 18px; }
.lightbox-zpet { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-dal { right: 18px; top: 50%; transform: translateY(-50%); }

/* ============================================================
   Responzivita
   ============================================================ */
@media (max-width: 900px) {
    .hero-mrizka {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-top: 36px;
        padding-bottom: 44px;
    }
    .hero-mrizka { grid-template-rows: none; }
    .hero-text { grid-column: 1; grid-row: auto; }
    .hero-video { grid-column: 1; grid-row: auto; }
    .hero-cena { grid-column: 1; grid-row: auto; margin-top: 0; text-align: center; }
    .hero-tlacitka { grid-column: 1; grid-row: auto; margin-top: 0; justify-content: center; }
    .pro-koho { grid-template-columns: repeat(2, 1fr); }
    .vyhody { grid-template-columns: repeat(2, 1fr); }
    .lokalita-mrizka { grid-template-columns: 1fr; }
    .rozmery-mrizka { grid-template-columns: 1fr; gap: 24px; }
    .galerie { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .sekce { padding: 28px 0; }
    .sekce-tesna { padding-top: 0; }
    .hlavicka-telefon span { display: none; }
    .pro-koho { grid-template-columns: 1fr; }
    .vyhody { grid-template-columns: 1fr; }
    .prodejce { flex-direction: column; align-items: center; text-align: center; }
    .cena-karta { padding: 32px 22px; }
    .kontakt-karta { padding: 28px 18px; }
    .mobilni-lista { display: flex; }
    .hero-tlacitka .tlacitko { width: 100%; }
}
