/* =========================================================
   vojcek.cz – veřejná část
   Vychází z původního vzhledu (viz _puvodni/), upraveno pro mobil.
   ========================================================= */

@font-face {
    font-family: "Rubik Dirt";
    src: url("font/rubik-dirt-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
    font-display: swap;
}
@font-face {
    font-family: "Rubik Dirt";
    src: url("font/rubik-dirt-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    font-display: swap;
}

:root {
    --cervena: #c40000;
    --cervena-tmava: #7a0000;
    --cervena-svetla: #ff3333;
    --papir: #f1ece2;
    --text: #fff;
    --sedy: #cfcfcf;
    --punk: "Rubik Dirt", Impact, "Arial Black", sans-serif;
    --okraj: 30px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4;
    cursor: url("cursor.cur"), auto;
}

/* Pozadí z původního webu – jako pevná vrstva, aby fungovalo i na iPhonu */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at top left, var(--cervena) 0%, transparent 35%),
        radial-gradient(circle at top right, var(--cervena-tmava) 0%, transparent 35%),
        linear-gradient(#222, #000);
}

img { max-width: 100%; }

a { color: inherit; }

:focus-visible {
    outline: 3px solid var(--cervena-svetla);
    outline-offset: 3px;
}

/* ---------- tlačítka (původní styl) ---------- */

.tlacitko {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    padding: 12px 25px;
    border: 2px solid #fff;
    background: rgba(255, 255, 255, .05);
    transition: background .2s, color .2s;
    font-weight: bold;
    white-space: nowrap;
}

.tlacitko:hover,
.tlacitko:active {
    background: #b30000;
}

/* =========================================================
   PLAKÁT (titulní stránka a akce v archivu)
   ========================================================= */

.stranka-plakat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.plakat-obal {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plakat {
    position: relative;
    line-height: 0;
    box-shadow: 0 0 40px rgba(0, 0, 0, .8);
}

.plakat img {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
}

/* klikací místa přes jména kapel */
.zona {
    position: absolute;
    border-radius: 4px;
    cursor: url("cursor.cur"), pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    -webkit-tap-highlight-color: transparent;
}

.zona:hover,
.zona:focus-visible,
.zona:active {
    transform: scale(1.08);
    background: rgba(255, 0, 0, .08);
    box-shadow: 0 0 15px rgba(255, 0, 0, .5);
    outline: none;
}

.archiv-stitek {
    margin: 0 0 12px;
    font-family: var(--punk);
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--sedy);
    text-transform: uppercase;
}

/* odkazy v rohu (Minulé akce / Aktuální akce) */
.horni-lista {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.horni-lista:empty { display: none; }

.horni-lista .tlacitko {
    padding: 9px 18px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
}

/* Úzké obrazovky na šířku plakátu (tablet) – lišta nad plakát */
@media (max-width: 1100px) {
    .stranka-plakat { justify-content: flex-start; }
    .horni-lista {
        position: static;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 14px;
    }
    .plakat img { max-height: calc(100dvh - 100px); }
}

@media (min-width: 769px) {
    .archiv-stitek + .plakat img { max-height: calc(100dvh - 90px); }
}
@media (min-width: 769px) and (max-width: 1100px) {
    .archiv-stitek + .plakat img { max-height: calc(100dvh - 150px); }
}

/* tlačítka kapel – jen na mobilu */
.kapely-mobil { display: none; }

@media (max-width: 768px) {
    .stranka-plakat {
        padding: 12px 12px calc(24px + env(safe-area-inset-bottom));
    }

    /* na mobilu plakát přes celou šířku, výška se dopočítá */
    .plakat img {
        max-width: calc(100vw - 24px);
        max-height: none;
    }

    /* na mobilu jsou odkazy až pod tlačítky kapel */
    .plakat-obal { width: 100%; }
    .horni-lista { order: 5; margin: 24px 0 0; }
    .stranka-plakat .horni-lista .tlacitko { background: rgba(255, 255, 255, .05); }

    .kapely-mobil {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-top: 20px;
    }

    .kapela-tlacitko {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        min-height: 56px;
        background: var(--papir);
        color: #111;
        text-decoration: none;
        font-family: var(--punk);
        font-size: 1.35rem;
        text-transform: uppercase;
        clip-path: polygon(0 6%, 3% 0, 97% 3%, 100% 0, 99% 50%, 100% 94%, 96% 100%, 4% 97%, 0 100%, 1% 50%);
        transform: rotate(-.6deg);
        transition: transform .15s, background .15s;
        -webkit-tap-highlight-color: transparent;
    }

    .kapela-tlacitko:nth-child(even) { transform: rotate(.6deg); }

    .kapela-tlacitko:active {
        transform: scale(.97);
        background: #fff;
    }

    .kapela-tlacitko .cas {
        flex: none;
        background: #111;
        color: var(--cervena-svetla);
        padding: 4px 8px;
        font-size: 1.05rem;
        white-space: nowrap;
    }

    .kapela-tlacitko .jmeno { flex: 1; line-height: 1.1; }

    .kapela-tlacitko .pocet {
        flex: none;
        font-family: Arial, Helvetica, sans-serif;
        font-size: .8rem;
        font-weight: bold;
        color: #555;
        text-transform: none;
    }
}

/* =========================================================
   STRÁNKY S OBSAHEM (galerie, archiv)
   ========================================================= */

.vodoznak {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 55%;
}

@media (max-aspect-ratio: 1/1) {
    .vodoznak { background-size: 85%; }
}

.obsah {
    position: relative;
    z-index: 1;
    max-width: 1600px;
    margin: auto;
    padding: var(--okraj);
    padding-bottom: calc(var(--okraj) + env(safe-area-inset-bottom));
}

.obsah.stred {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hlavicka {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
}

.hlavicka .zpet {
    position: absolute;
    top: 0;
    left: 0;
}

h1 {
    margin: 0 0 10px;
    padding: 0 200px;
    font-family: var(--punk);
    font-weight: normal;
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 0, 0, .4);
}

.stred h1 { padding: 0; }

.info {
    margin: 0;
    color: var(--sedy);
}

.oddel { color: var(--cervena-svetla); padding: 0 .2em; }

.prazdna-galerie {
    text-align: center;
    color: var(--sedy);
    font-size: 1.2rem;
    padding: 60px 0;
}

/* ---------- galerie ---------- */

/* Bez JS: sloupce jako v původní verzi. S JS se fotky rozloží zleva doprava (galerie.js). */
.galerie {
    column-count: 4;
    column-gap: 20px;
}

.galerie.zednik {
    column-count: auto;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.galerie .sloupec {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.foto {
    display: block;
    margin-bottom: 20px;
    break-inside: avoid;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
    cursor: zoom-in;
    transition: transform .2s, box-shadow .2s;
    -webkit-tap-highlight-color: transparent;
}

.zednik .foto { margin-bottom: 0; }

.foto img {
    display: block;
    width: 100%;
    height: auto;
}

@media (hover: hover) {
    .foto:hover {
        transform: scale(1.03);
        box-shadow: 0 0 20px rgba(255, 0, 0, .5);
    }
}

.foto:focus-visible { box-shadow: 0 0 0 3px var(--cervena-svetla); outline: none; }

@media (max-width: 1100px) { .galerie { column-count: 3; } }

@media (max-width: 900px) {
    :root { --okraj: 20px; }
    .galerie { column-count: 2; }
    h1 { padding: 0; }
    .hlavicka .zpet {
        position: static;
        margin-bottom: 18px;
    }
}

@media (max-width: 600px) {
    :root { --okraj: 12px; }
    .galerie, .galerie.zednik, .galerie .sloupec { column-gap: 8px; gap: 8px; }
    .foto { margin-bottom: 8px; border-radius: 4px; }
    .hlavicka { margin-bottom: 24px; }
    .hlavicka .zpet { padding: 8px 16px; }
    .info { font-size: .9rem; }
}

.kapely-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 50px 0 10px;
}

@media (max-width: 600px) {
    .kapely-nav { flex-direction: column; align-items: stretch; text-align: center; }
    .kapely-nav .tlacitko { white-space: normal; }
}

/* ---------- lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .96);
    cursor: default;
    -webkit-user-select: none;
    user-select: none;
}

.lightbox[hidden] { display: none; }

.lb-scena {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

.lb-obrazek {
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: 0 0;
    will-change: transform;
    -webkit-user-drag: none;
}

@media (min-width: 769px) {
    .lb-obrazek {
        max-width: calc(100vw - 180px);
        max-height: calc(100dvh - 40px);
    }
}

.lb-lista {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(8px + env(safe-area-inset-top)) 12px 24px 20px;
    background: linear-gradient(rgba(0, 0, 0, .7), transparent);
    pointer-events: none;
}

.lb-lista > * { pointer-events: auto; }

.lb-pocitadlo { color: var(--sedy); font-size: .95rem; }

.lb-akce { display: flex; gap: 4px; }

.lb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    padding: 0;
    background: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
}

.lb-btn svg { width: 28px; height: 28px; fill: currentColor; }
.lb-btn:hover, .lb-btn:active { color: var(--cervena-svetla); background: rgba(255, 255, 255, .08); }

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: #fff;
    font-size: 70px;
    line-height: 1;
    padding: 20px;
    cursor: pointer;
}

.lb-nav:hover { color: var(--cervena-svetla); }
.lb-predchozi { left: 10px; }
.lb-dalsi { right: 10px; }

/* na dotykových zařízeních se listuje tahem, šipky jen nenápadně */
@media (hover: none) {
    .lb-nav { font-size: 34px; padding: 14px 10px; opacity: .55; }
    .lb-predchozi { left: 0; }
    .lb-dalsi { right: 0; }
}

.lightbox.zoom .lb-nav { display: none; }

.lb-hlaska {
    position: absolute;
    left: 50%;
    bottom: calc(30px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    background: #b30000;
    color: #fff;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: bold;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.lb-hlaska.videt { opacity: 1; }

/* ---------- archiv ---------- */

.archiv-mrizka {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
}

.archiv-karta {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: rgba(0, 0, 0, .5);
    border: 2px solid rgba(255, 255, 255, .15);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.archiv-karta img {
    display: block;
    width: 100%;
    height: auto;
}

.archiv-karta:hover {
    transform: translateY(-4px);
    border-color: #b30000;
    box-shadow: 0 0 20px rgba(255, 0, 0, .5);
}

.archiv-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px 16px;
}

.archiv-text strong {
    font-family: var(--punk);
    font-weight: normal;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.archiv-text span { color: var(--sedy); font-size: .9rem; }
.archiv-kapely { color: #999 !important; }

@media (max-width: 600px) {
    .archiv-mrizka { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .archiv-text { padding: 8px 10px 12px; }
    .archiv-text strong { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
