/* Last Item Announcer — styly
   Důraz na přístupnost: vysoký kontrast, viditelný focus, čitelná typografie,
   respektování prefers-reduced-motion, plně responzivní. */

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text: #1a2230;
    --text-muted: #4a5568;
    --accent: #1c4f8a;          /* sytá modrá, kontrast vůči bílé > 7:1 */
    --accent-dark: #143a66;
    --accent-contrast: #ffffff;
    --border: #d2d8e0;
    --focus: #c8500a;            /* výrazná oranžová pro focus, kontrast vůči světlému pozadí */
    --success-bg: #e3f4e8;
    --success-text: #14532d;
    --success-border: #8bc7a0;
    --error-bg: #fdeaea;
    --error-text: #8a1c1c;
    --error-border: #e0a0a0;
    --maxw: 60rem;
    --radius: 6px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    font-size: 1.0625rem;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* ---- Viditelný focus pro všechny interaktivní prvky ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Fallback pro prohlížeče bez :focus-visible */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* ---- Skip link ---- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: var(--accent-contrast);
    padding: 0.75rem 1.25rem;
    z-index: 100;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus {
    left: 0;
    outline: 3px solid var(--focus);
    outline-offset: -3px;
}

/* ---- Vizuálně skryté, ale dostupné odečítači ---- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---- Header ---- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    padding-block: 1rem;
}
.site-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    flex: 1 1 auto;
}
.site-title a {
    color: var(--text);
    text-decoration: none;
}
.site-title a:hover { text-decoration: underline; }

/* Hlavní navigace */
.main-nav ul,
.lang-switch ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
}
.main-nav a {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    color: var(--accent);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
}
.main-nav a:hover { text-decoration: underline; }
.main-nav a[aria-current="page"] {
    background: var(--accent);
    color: var(--accent-contrast);
}

/* Přepínač jazyků */
.lang-switch {
    flex-basis: 100%;
}
.lang-switch ul {
    gap: 0.25rem;
}
.lang-switch a {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
}
.lang-switch a:hover { background: var(--bg); }
.lang-switch a[aria-current="true"] {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
}

@media (min-width: 48rem) {
    .lang-switch { flex-basis: auto; }
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.breadcrumb ol {
    list-style: none;
    margin: 0;
    padding-block: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.breadcrumb li + li::before {
    content: "/";
    color: var(--text-muted);
}
.breadcrumb a { color: var(--accent); }
.breadcrumb [aria-current="page"] {
    color: var(--text-muted);
    font-weight: 600;
}

/* ---- Main ---- */
.site-main {
    padding-block: 2.5rem 3.5rem;
}
.site-main h1 {
    font-size: 1.9rem;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
}
.site-main h2 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--border);
}
.lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 50ch;
}
.site-main ul { padding-left: 1.4rem; }
.site-main li { margin-bottom: 0.4rem; }
.feature-list { max-width: 60ch; }

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

/* ---- Tlačítka / CTA ---- */
.button,
.contact-form button {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-contrast);
    padding: 0.7rem 1.4rem;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.button:hover,
.contact-form button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--accent-contrast);
}
.cta { margin-top: 1.5rem; }

/* ---- Changelog ---- */
.changelog-entry {
    margin-bottom: 2rem;
}
.changelog-entry h2 {
    border-bottom: 2px solid var(--accent);
}

/* ---- Formulář ---- */
.contact-form {
    max-width: 36rem;
    margin-top: 1.5rem;
}
.form-row {
    margin-bottom: 1.25rem;
}
.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.required-mark {
    color: var(--error-text);
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
}
.contact-form textarea { resize: vertical; }

/* ---- Zprávy (status/alert) ---- */
.message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 2px solid;
    margin-bottom: 1.5rem;
    max-width: 36rem;
}
.message ul { margin: 0.5rem 0 0; }
.message-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}
.message-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

/* ---- Footer ---- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-block: 1.5rem;
}
.footer-inner p { margin: 0; }

/* ---- Respektuj prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- Vysoký kontrast / forced colors ---- */
@media (forced-colors: active) {
    .main-nav a[aria-current="page"],
    .lang-switch a[aria-current="true"],
    .button,
    .contact-form button {
        border: 2px solid;
    }
}

.changelog-date {
    margin: -0.25rem 0 0.75rem;
    font-size: 0.9rem;
    color: #5a6472;
}
