/* VOŠ 98 – společný stylesheet. Bez frameworků, jen CSS custom properties + grid. */

:root {
    color-scheme: light dark;
    --accent: #006699;
    --accent-strong: #004d73;
    --accent-soft: #e3f1f8;
    --accent-contrast: #ffffff;
    --bg: #f4f7f9;
    --surface: #ffffff;
    --surface-2: #eef3f6;
    --text: #1b2430;
    --muted: #5b6875;
    --border: #d5dee5;
    --link: #005c8a;
    --ok: #1a7f37;
    --ok-soft: #dafbe1;
    --no: #b42318;
    --no-soft: #fde8e6;
    --maybe: #9a6700;
    --maybe-soft: #fff4d6;
    --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 6px 20px rgb(16 24 40 / 6%);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --accent: #3ea5dc;
        --accent-strong: #7cc6ec;
        --accent-soft: #10303f;
        --accent-contrast: #061a24;
        --bg: #0e151c;
        --surface: #161f28;
        --surface-2: #1d2833;
        --text: #e6edf3;
        --muted: #9aa8b5;
        --border: #2c3a47;
        --link: #6cc0ea;
        --ok: #4ac26b;
        --ok-soft: #12321c;
        --no: #ff7b72;
        --no-soft: #3d1a17;
        --maybe: #e3b341;
        --maybe-soft: #3a2d0f;
        --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);
    }
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: var(--link);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--accent-strong);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

h1,
h2,
h3 {
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
}

h1 {
    font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
}

h2 {
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
}

h3 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1rem;
}

address {
    font-style: normal;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 60ch;
}

.container {
    width: min(100% - 2rem, 72rem);
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--accent-contrast);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Hlavička */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

@media (max-width: 40rem) {
    .site-header {
        position: static;
    }
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-block: 0.6rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
}

.brand__logo {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    image-rendering: auto;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__name {
    font-weight: 700;
    font-size: 1.15rem;
}

.brand__sub {
    font-size: 0.8rem;
    color: var(--muted);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.site-nav a {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.site-nav__form {
    display: inline;
    margin: 0;
}

.site-nav__logout {
    padding: 0.4rem 0.75rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.site-nav__logout:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

/* Obsah */

.site-main {
    flex: 1;
    padding-block: 1.5rem 3rem;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin: 0 0 1.25rem;
    padding: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.breadcrumbs li + li::before {
    content: "›";
    margin-right: 0.5rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.section {
    margin-block: 2.5rem;
}

.section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.section__head p {
    margin: 0;
    color: var(--muted);
}

/* Úvodní stránka */

.hero {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    align-items: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: var(--radius);
    background:
        radial-gradient(60rem 30rem at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
        linear-gradient(135deg, var(--accent-soft), var(--surface));
    border: 1px solid var(--border);
}

.hero h1 {
    margin-bottom: 0.75rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--accent);
    color: var(--accent-contrast);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
    background: var(--accent-strong);
    color: var(--accent-contrast);
    transform: translateY(-1px);
}

.btn--secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn--secondary:hover {
    background: var(--surface-2);
    color: var(--text);
}

.cards {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
}

.card__media {
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card--portrait .card__media img {
    object-fit: contain;
    padding: 0.5rem;
}

.card__body {
    padding: 1rem 1.1rem 1.2rem;
}

.card__body h3 {
    margin-bottom: 0.35rem;
}

.card__body h3 a {
    color: var(--text);
    text-decoration: none;
}

.card__body h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.card__body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.video-box {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
    .video-box {
        grid-template-columns: minmax(0, 3fr) minmax(14rem, 2fr);
        align-items: start;
    }
}

.video-box video {
    width: 100%;
    border-radius: var(--radius);
    background: #000;
    box-shadow: var(--shadow);
}

.panel {
    padding: 1.25rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.panel h3 {
    margin-bottom: 0.5rem;
}

.panel ul {
    margin: 0;
    padding-left: 1.1rem;
}

.two-col {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.link-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
}

.link-list li:last-child {
    border-bottom: 0;
}

.link-list small {
    color: var(--muted);
}

/* Galerie */

.gallery {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.gallery--portrait {
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
}

.gallery__link {
    display: block;
    color: inherit;
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.gallery figure {
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.gallery__link:hover figure {
    transform: translateY(-3px);
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--surface-2);
    transition: transform 0.3s ease;
}

.gallery--portrait img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.gallery__link:hover img {
    transform: scale(1.03);
}

.gallery figcaption {
    padding: 0.5rem 0.7rem 0.6rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.gallery-section {
    margin-bottom: 1.5rem;
}

.gallery-section h2 {
    margin-bottom: 0.75rem;
}

.pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
}

.pager__next {
    text-align: right;
}

@media (max-width: 40rem) {
    .pager {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pager__next {
        text-align: center;
    }
}

/* Upozornění */

.notice {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 1.25rem;
}

.notice--info {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.notice--ok {
    background: var(--ok-soft);
    border-color: color-mix(in srgb, var(--ok) 40%, transparent);
}

.notice--error {
    background: var(--no-soft);
    border-color: color-mix(in srgb, var(--no) 40%, transparent);
}

.notice ul {
    margin: 0.25rem 0 0;
    padding-left: 1.1rem;
}

/* Tabulky */

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 0.65rem 0.9rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--surface-2);
    font-weight: 600;
    white-space: nowrap;
}

th a {
    color: inherit;
}

th[aria-sort="descending"] a::after {
    content: " ↓";
    color: var(--accent);
}

tbody tr:last-child td {
    border-bottom: 0;
}

td.num,
th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.badge {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge--ok {
    background: var(--ok-soft);
    color: var(--ok);
}

.badge--no {
    background: var(--no-soft);
    color: var(--no);
}

.badge--maybe {
    background: var(--maybe-soft);
    color: var(--maybe);
}

/* Formuláře */

.form {
    display: grid;
    gap: 1rem;
    padding: 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form__row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.field {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.field label,
.field legend,
.field > span {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0;
}

.field small {
    color: var(--muted);
    font-weight: 400;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.field textarea {
    min-height: 8rem;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--accent);
}

.smileys {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.smileys label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    cursor: pointer;
    font-weight: 400;
    font-size: 0.9rem;
}

.smileys label:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.smileys input {
    margin: 0;
}

.smileys img {
    width: 15px;
    height: 15px;
}

.form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.form__hint {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0;
}

.form--narrow {
    max-width: 26rem;
}

.field--check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Návštěvní kniha – příspěvky */

.entries {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.entry {
    padding: 1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.entry__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.entry__name {
    font-weight: 700;
}

.entry__date {
    color: var(--muted);
    font-size: 0.85rem;
}

.entry__links {
    font-size: 0.85rem;
    color: var(--muted);
}

.entry__body {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.entry__smiley {
    display: inline-block;
    vertical-align: -3px;
    margin-left: 0.25rem;
}

/* Patička */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.9rem;
    color: var(--muted);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-block: 1.25rem;
}

.site-footer p {
    margin: 0;
}

/* Lightbox */

.lightbox {
    padding: 0;
    border: 0;
    max-width: 100vw;
    max-height: 100dvh;
    width: 100vw;
    height: 100dvh;
    background: transparent;
    color: #fff;
}

.lightbox::backdrop {
    background: rgb(5 10 15 / 92%);
}

.lightbox__inner {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    width: 100%;
    height: 100%;
    padding: 3.5rem 1rem 1rem;
}

.lightbox__img {
    justify-self: center;
    align-self: center;
    /* fotky z roku 2001 mají jen ~500 px, box je záměrně větší a obrázek se do něj dopočítá */
    width: min(100%, 64rem);
    height: calc(100dvh - 7rem);
    object-fit: contain;
}

.lightbox__caption {
    text-align: center;
    padding-top: 0.75rem;
    font-size: 0.95rem;
    color: #d7dee6;
    min-height: 1.5rem;
}

.lightbox__counter {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    font-size: 0.9rem;
    color: #d7dee6;
}

.lightbox__btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 12%);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.lightbox__btn:hover {
    background: rgb(255 255 255 / 25%);
}

.lightbox__btn--close {
    top: 0.75rem;
    right: 1rem;
}

.lightbox__btn--prev,
.lightbox__btn--next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__btn--prev {
    left: 0.75rem;
}

.lightbox__btn--next {
    right: 0.75rem;
}

.lightbox__btn[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
