/* ==========================================================================
   Uhelné sklady Pelhřimov – hlavní styl
   Bez frameworků: vlastní mřížka, vanilla JS, inline SVG ikony.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Proměnné
   -------------------------------------------------------------------------- */
:root {
    --barva-cervena: #b52218;
    --barva-cervena-tmava: #9f160f;
    --barva-cervena-svetla: #be261b;
    --barva-cervena-hrana: #93130d;
    --barva-cervena-text: #e03e2d;

    --barva-seda: #5e5f5e;
    --barva-cerna: #222222;
    --barva-bila: #ffffff;
    --barva-text: #5e5f5e;
    --barva-nadpis: #000000;

    --gradient-cerveny: linear-gradient(180deg, var(--barva-cervena) 0%, var(--barva-cervena-tmava) 100%);
    --gradient-cerveny-obraceny: linear-gradient(0deg, var(--barva-cervena) 0%, var(--barva-cervena-tmava) 100%);
    --gradient-tmavy: linear-gradient(180deg, #414241 0%, #232323 100%);

    --pismo: 'Dosis', 'Segoe UI', system-ui, -apple-system, sans-serif;

    --mezera: 24px;          /* rozestup sloupců (gutter) */
    --sirka-obsahu: 1320px;
}

/* --------------------------------------------------------------------------
   2. Reset a základní typografie
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--pismo);
    color: var(--barva-text);
    text-align: center;
    background: url('../img/ui/bg.png');
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--barva-cervena);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    margin: 0;
    padding: 0;
    color: var(--barva-nadpis);
    font-weight: 600;
}

h1 {
    font-size: 2rem;
    line-height: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.5rem;
    line-height: 2rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    margin-bottom: 1rem;
}

p {
    color: var(--barva-text);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.5rem;
    text-align: justify;
    margin: 0 0 1rem;
}

ul {
    margin-bottom: 1rem;
}

ul li {
    font-size: 15px;
    font-weight: 300;
    line-height: 24px;
}

/* Skryté pro myš, čitelné pro odečítače obrazovky */
.jen-pro-ctecku {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Viditelný focus pro klávesnici */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--barva-cervena-text);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. Mřížka
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--sirka-obsahu);
    margin: 0 auto;
    padding: 0 12px;
}

.mrizka {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--mezera) / -2);
}

.mrizka > * {
    width: 100%;
    padding: 0 calc(var(--mezera) / 2);
}

.mrizka--stred {
    align-items: center;
}

/* Tlačítko */
.btn {
    display: inline-block;
    color: var(--barva-bila);
    font-family: var(--pismo);
    font-size: 1.25rem;
    font-weight: 500;
    text-align: center;
    padding: 2px 30px;
    border: 0;
    cursor: pointer;
    background: var(--gradient-cerveny);
}

.btn:hover {
    color: var(--barva-bila);
    text-decoration: none;
    background: var(--gradient-cerveny-obraceny);
}

/* --------------------------------------------------------------------------
   4. Horní lišta (vyhledávání + telefon)
   -------------------------------------------------------------------------- */
.hlavicka {
    position: relative;
    border-bottom: 8px solid var(--barva-seda);
}

.lista-top {
    background: var(--barva-cerna);
    padding: 8px 0;
}

.lista-top__obsah {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.hledani {
    position: relative;
    width: 100%;
    max-width: 360px;
}

.hledani input[type="search"] {
    display: block;
    width: 100%;
    margin: 0;
    padding: 5px 40px 5px 10px;
    font-family: var(--pismo);
    font-size: 1rem;
    color: #f6f6f6;
    background: var(--barva-seda);
    border: none;
    border-radius: 5px;
}

.hledani input[type="search"]::placeholder {
    color: #e3e0e0;
}

.hledani__odeslat {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0;
    background: url('../img/ui/search.png') no-repeat center center var(--barva-seda);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.telefon-top {
    color: var(--barva-bila);
    font-size: 1.5rem;
}

.telefon-top a {
    color: var(--barva-bila);
}

.telefon-top a:hover {
    text-decoration: none;
}

.telefon-top .predvolba {
    color: var(--barva-seda);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. Hlavička s logem
   -------------------------------------------------------------------------- */
.lista-logo {
    background: url('../img/ui/header.gif');
}

.lista-logo__obsah {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 8px 0;
}

.logo {
    display: inline-block;
    max-width: 100%;
}

.odkazy-hlavicka {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.banner,
.banner img {
    display: block;
    height: 60px;
    width: auto;
}

.socialni-ikona {
    display: block;
    width: 40px;
    height: 40px;
    background-size: cover;
    background-repeat: no-repeat;
}

.socialni-ikona--facebook {
    background-image: url('../img/ui/facebook.png');
}

/* --------------------------------------------------------------------------
   6. Hlavní menu
   -------------------------------------------------------------------------- */
.menu-hlavni {
    position: absolute;
    width: 100%;
    z-index: 5;
}

.menu-hlavni .container {
    padding: 0;
}

.hamburger {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 50px;
    padding: 0 8px;
    color: var(--barva-bila);
    background: var(--gradient-cerveny);
    border: 0;
    cursor: pointer;
}

.hamburger svg {
    width: 35px;
    height: 35px;
    fill: currentColor;
}

.menu-hlavni ul {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-hlavni ul.je-otevrene {
    display: block;
}

.menu-hlavni li {
    flex: 1 1 0;
    border-left: 1px solid var(--barva-cervena-svetla);
    border-right: 1px solid var(--barva-cervena-hrana);
    background: var(--gradient-cerveny);
}

.menu-hlavni li:first-child {
    border-left: none;
}

.menu-hlavni li:last-child {
    border-right: none;
}

.menu-hlavni li:hover {
    background: var(--gradient-tmavy);
}

.menu-hlavni a {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0.75rem 0.5rem;
    color: var(--barva-bila);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
}

.menu-hlavni a.je-aktivni {
    background: rgba(0, 0, 0, 0.18);
}

/* --------------------------------------------------------------------------
   7. Úvodní fotopás
   -------------------------------------------------------------------------- */
.promo {
    width: 100%;
    height: 250px;
    background: url('../img/ui/promo.webp') center center / cover no-repeat;
    border-bottom: 8px solid var(--barva-seda);
}

@media (max-width: 320px) {
    .promo {
        height: 200px;
    }
}

/* --------------------------------------------------------------------------
   8. Tři boxy na úvodní straně
   -------------------------------------------------------------------------- */
.boxy {
    padding: 4rem 0;
    background: url('../img/ui/boxes.gif');
    border-bottom: 8px solid var(--barva-seda);
}

.boxy .container {
    padding: 0 5rem;
}

.boxy .mrizka > * {
    margin-top: 60px;
}

.boxy .mrizka > *:first-child {
    margin-top: 0;
}

.box {
    height: 100%;
    padding: 1rem;
    background: var(--barva-cerna);
    border-radius: 7px;
    box-shadow: 0 29px 30px 0 rgba(0, 0, 0, 0.75);
}

.box__ikona {
    position: relative;
    display: inline-block;
    margin-top: -35px;
    padding: 20px;
    border-radius: 55px;
    background: var(--gradient-cerveny);
}

.box__ikona img {
    display: block;
    width: 69px;
}

.box h2 {
    color: var(--barva-bila);
    font-size: 1.5rem;
    font-weight: 500;
    margin: 1rem 0 0;
}

.box__text {
    color: var(--barva-seda);
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: 1rem;
}

.box__radek {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: 1rem;
}

.box__radek svg {
    width: 1em;
    height: 1em;
    fill: var(--barva-bila);
    flex: none;
}

.box__radek a {
    color: var(--barva-seda);
    text-decoration: none;
}

.box__radek--email a {
    color: var(--barva-cervena);
}

.box .btn {
    margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   9. Obsah stránky
   -------------------------------------------------------------------------- */
.obsah {
    padding: 2rem 0 4rem;
}

.obsah img {
    border: 5px solid var(--barva-bila);
}

.text-obsah {
    color: var(--barva-text);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.5rem;
    text-align: justify;
}

.text-obsah h1,
.text-obsah h2,
.text-obsah h3 {
    text-align: left;
}

.zvyrazneni {
    color: var(--barva-cervena-text);
}

/* Tabulky v obsahu */
.tabulka {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.tabulka th,
.tabulka td {
    padding: 4px 8px 4px 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--barva-bila);
}

.tabulka th {
    font-weight: 600;
}

.tabulka--parametry th:first-child,
.tabulka--parametry td:first-child {
    width: 22%;
}

.tabulka--cenik th:nth-child(1),
.tabulka--cenik td:nth-child(1) {
    width: 50%;
}

.tabulka--cenik th:nth-child(2),
.tabulka--cenik td:nth-child(2) {
    width: 20%;
}

.tabulka--cenik th:nth-child(3),
.tabulka--cenik td:nth-child(3) {
    width: 30%;
}

.tabulka--dvousloupcova th,
.tabulka--dvousloupcova td {
    width: 50%;
}

.poznamka {
    font-size: 0.8rem;
    text-align: left;
}

/* Drobečková navigace */
.drobecky {
    padding: 0.75rem 0;
    font-size: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--barva-bila);
}

.drobecky a {
    text-transform: uppercase;
}

.drobecky svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: var(--barva-seda);
    vertical-align: -2px;
}

.drobecky span {
    margin: 0 5px;
}

/* Bílý blok s ozdobným rohem (úvodní strana) */
.uvodni-text {
    padding: 1.5rem;
    padding-top: calc(1.5rem + 66px);
    margin-top: 1rem;
    background: var(--barva-bila) url('../img/ui/homepage-content-top.gif') top center no-repeat;
}

/* Dvousloupcová stránka: text + obrázek */
.stranka__obrazek {
    text-align: center;
    margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   10. Galerie a lightbox
   -------------------------------------------------------------------------- */
.galerie {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--mezera);
    margin-top: 1.5rem;
    padding: 0;
    list-style: none;
}

.galerie figure {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    margin: 0 auto;
    padding: 5px;
    border: thin solid #c0c0c0;
}

.galerie a {
    display: block;
}

.galerie img {
    display: block;
    width: 100%;
}

.galerie figcaption {
    padding: 3px;
    color: #222;
    font: italic smaller sans-serif;
    text-align: center;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox[open],
.lightbox.je-otevreny {
    display: flex;
}

.lightbox__obrazek {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 5px solid var(--barva-bila);
}

.lightbox__popis {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1rem;
    color: var(--barva-bila);
    font-size: 1rem;
    text-align: center;
}

.lightbox__tlacitko {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--barva-bila);
    font-size: 32px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    cursor: pointer;
}

.lightbox__tlacitko:hover {
    background: var(--barva-cervena);
}

.lightbox__zavrit {
    top: 1rem;
    right: 1rem;
}

.lightbox__predchozi {
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
}

.lightbox__dalsi {
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}

/* --------------------------------------------------------------------------
   11. Mapa
   -------------------------------------------------------------------------- */
.mapa {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
}

.mapa iframe {
    display: block;
    width: 100%;
    height: 350px;
    border: 0;
}

/* --------------------------------------------------------------------------
   12. Patička
   -------------------------------------------------------------------------- */
.paticka {
    padding: 2rem 0;
    color: var(--barva-seda);
    text-align: center;
    background: url('../img/ui/footer.gif');
}

.paticka h2 {
    color: var(--barva-bila);
    font-size: 1.5rem;
    text-transform: uppercase;
}

.paticka__kontakt {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.75rem;
    margin-bottom: 1rem;
}

.paticka__kontakt:last-child {
    margin-bottom: 0;
}

.paticka__kontakt small {
    font-size: 1rem;
    font-weight: 500;
}

.paticka__kontakt a,
.paticka__kontakt a:hover {
    color: var(--barva-seda);
    text-decoration: none;
}

.paticka nav {
    line-height: 1.5rem;
}

.paticka nav a {
    color: var(--barva-seda);
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: underline;
}

.paticka nav a:hover {
    text-decoration: none;
}

.paticka__copy {
    font-size: 0.95rem;
}

.paticka__copy a {
    color: var(--barva-seda);
}

.paticka__sloupec + .paticka__sloupec {
    margin-top: 2rem;
}

/* Počítadlo TOPlist */
.paticka__toplist {
    margin: 1rem 0 0;
    opacity: 0.6;
}

.paticka__toplist img {
    display: inline-block;
}

/* --------------------------------------------------------------------------
   13. Responzivní varianty
   -------------------------------------------------------------------------- */

/* ≥ 576 px */
@media (min-width: 576px) {
    .galerie {
        grid-template-columns: repeat(2, 1fr);
    }

    .paticka {
        text-align: left;
    }

    .paticka__sloupec {
        text-align: left;
    }
}

/* ≥ 768 px */
@media (min-width: 768px) {
    .lista-top__obsah {
        flex-direction: row;
        justify-content: space-between;
    }

    .lista-logo__obsah {
        flex-direction: row;
        justify-content: space-between;
        padding: 0;
    }

    .odkazy-hlavicka {
        justify-content: flex-end;
    }

    .hamburger {
        display: none;
    }

    .menu-hlavni ul {
        display: flex !important;
    }

    .promo {
        height: 479px;
        margin-top: -80px;
    }

    .galerie {
        grid-template-columns: repeat(4, 1fr);
    }

    .boxy .container {
        padding: 0;
    }

    .boxy .mrizka > * {
        width: 33.3333%;
        margin-top: 0;
    }

    /* dvousloupcové rozvržení stránek */
    .stranka--dva-sloupce .stranka__text {
        width: 66.6667%;
    }

    .stranka--dva-sloupce .stranka__obrazek {
        width: 33.3333%;
        margin-top: 0;
        text-align: right;
    }

    .uvodni-text {
        width: 66.6667%;
        margin-top: 0;
        padding: 1.5rem;
        padding-left: calc(1.5rem + 66px);
        background: var(--barva-bila) url('../img/ui/homepage-content-left.gif') top left no-repeat;
    }

    .uvodni-obrazek {
        width: 33.3333%;
        text-align: left;
    }

    .kontakt-mrizka > * {
        width: 50%;
    }

    .mapa {
        margin-top: 0;
    }

    .paticka__sloupec {
        width: 50%;
    }

    .paticka__sloupec + .paticka__sloupec {
        margin-top: 0;
    }
}

/* ≥ 992 px */
@media (min-width: 992px) {
    .paticka__sloupec--kontakt {
        width: 33.3333%;
    }

    .paticka__sloupec--navigace {
        width: 25%;
    }

    .paticka__sloupec--copy {
        width: 41.6667%;
        text-align: right;
        align-self: flex-end;
        margin-top: 0;
    }

    .menu-hlavni ul {
        justify-content: space-between;
    }
}

/* ≥ 1200 px */
@media (min-width: 1200px) {
    .lista-top__obsah {
        justify-content: center;
        gap: 0;
    }

    .lista-top__obsah > * {
        width: 33.3333%;
    }

    .lista-top__obsah .telefon-top {
        text-align: right;
    }

    .stranka--dva-sloupce .stranka__text {
        width: 75%;
    }

    .stranka--dva-sloupce .stranka__obrazek {
        width: 25%;
    }

    .uvodni-text {
        width: 75%;
    }

    .uvodni-obrazek {
        width: 25%;
    }

    .stranka--dva-sloupce .stranka__text img,
    .stranka--dva-sloupce .stranka__obrazek img {
        max-width: 80%;
    }
}

/* ≥ 1400 px */
@media (min-width: 1400px) {
    .boxy .container {
        padding: 0 12rem;
    }
}

/* --------------------------------------------------------------------------
   14. Tisk
   -------------------------------------------------------------------------- */
@media print {
    .lista-top,
    .menu-hlavni,
    .promo,
    .boxy,
    .paticka,
    .lightbox {
        display: none !important;
    }

    body {
        background: none;
        color: #000;
    }
}
