/* =====================================================================
   ADNP asociace – design systém veřejného webu
   Barvy vycházejí výhradně z dosavadního schématu webu a z loga.
   Popis tokenů a komponent: docs/design-system.md
   ===================================================================== */

/* ---------- Písma (hostovaná lokálně, SIL OFL 1.1) ---------- */
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-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-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-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-face {
    font-family: "Plus Jakarta Sans";
    font-style: italic;
    font-weight: 300 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-italic-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-face {
    font-family: "Plus Jakarta Sans";
    font-style: italic;
    font-weight: 300 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-italic-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-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/fraunces-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-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/fraunces-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-face {
    font-family: "Fraunces";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/fraunces-italic-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-face {
    font-family: "Fraunces";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/fraunces-italic-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;
}

/* ---------- Tokeny ---------- */
:root {
    /* Zlatá a bronzová (goldenrod, darkgoldenrod, bronzové tóny loga) */
    --c-gold: #DAA520;
    --c-gold-dark: #B8860B;
    --c-honey: #c8a86b;
    --c-bronze: #7a5c2e;
    --c-bronze-deep: #5a3e18;
    --c-brown: #55411a;

    /* Krémové a pískové plochy */
    --c-cream: #FAF2E2;
    --c-sand: #f5e8c9;
    --c-sand-line: #d9c9a8;
    --c-paper: #fffdf9;
    --c-paper-2: #f7f4ee;
    --c-paper-3: #f4eddd;
    --c-white: #fff;

    /* Linky */
    --c-line: #ece5d8;
    --c-line-strong: #ddd2bd;
    --c-line-warm: #eadfca;

    /* Text */
    --c-ink: #2f2a22;
    --c-text: #444;
    --c-muted: #6f685c;
    --c-subtle: #97907f;

    /* Šalvějová – druhý akcent vedle zlaté */
    --c-sage: #41624c;
    --c-sage-ink: #344b3a;
    --c-sage-soft: #e6ede3;
    --c-sage-line: #c8d4c8;

    --c-fb: #1877F2;
    --c-danger: #dc3545;

    /* Průhledné varianty */
    --c-gold-a10: rgba(218, 165, 32, .10);
    --c-gold-a18: rgba(218, 165, 32, .18);
    --c-gold-a35: rgba(218, 165, 32, .35);
    --c-gold-a55: rgba(218, 165, 32, .55);
    --c-shadow: rgba(67, 52, 26, .08);

    --font-sans: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Fraunces", Georgia, "Times New Roman", serif;

    --fs-body: 1.0625rem;
    --fs-small: .9rem;
    --fs-xs: .8rem;
    --fs-lead: clamp(1.1rem, 1rem + .4vw, 1.3rem);
    --fs-h1: clamp(2.1rem, 1.4rem + 2.4vw, 3.25rem);
    --fs-h2: clamp(1.5rem, 1.22rem + 1vw, 2rem);
    --fs-h3: 1.2rem;
    --fs-display: clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;
    /* Jednotné zaoblení fotek a obrázků v obsahu */
    --radius-img: 14px;

    --shadow-xs: 0 1px 2px rgba(67, 52, 26, .05);
    --shadow-sm: 0 1px 2px rgba(67, 52, 26, .04), 0 6px 18px rgba(67, 52, 26, .06);
    --shadow-md: 0 2px 6px rgba(67, 52, 26, .05), 0 18px 40px -12px rgba(67, 52, 26, .18);
    --shadow-lg: 0 30px 70px -24px rgba(67, 52, 26, .28);
    --shadow-gold: 0 12px 30px -12px rgba(184, 134, 11, .65);

    --ease-out: cubic-bezier(.2, .7, .2, 1);
    --ease-soft: cubic-bezier(.4, 0, .2, 1);
    --dur-fast: .18s;
    --dur: .3s;
    --dur-slow: .7s;

    --container: 1200px;
    --gutter: clamp(16px, 4vw, 32px);
    --header-h: 76px;
    --section-gap: clamp(3.5rem, 7vw, 6rem);
}

/* ---------- Základ ---------- */
html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 20px);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--c-text);
    background-color: var(--c-paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

/* Stránka s widgetem Darujme se vkládá do iframe – bez vlastního pozadí */
body:has([data-darujme-widget-token]) {
    background: transparent;
}

::selection {
    background: var(--c-sand);
    color: var(--c-ink);
}

:focus-visible {
    outline: 3px solid var(--c-gold-a55);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Blazor (FocusOnNavigate) po navigaci programově fokusuje body – bez rámečku */
body:focus,
body:focus-visible,
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
    outline: none;
}

img {
    font-size: 12px;
    max-width: 100%;
}

img.full {
    width: 100%;
}

strong, b {
    font-weight: 700;
}

a {
    color: var(--c-ink);
    text-decoration: none;
    border-bottom: 1px solid var(--c-gold-a55);
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft), background-color var(--dur-fast) var(--ease-soft);
}

a:hover,
a:focus-visible {
    color: var(--c-bronze);
    border-bottom-color: var(--c-gold);
}

a:active {
    color: var(--c-bronze-deep);
}

a.nav-link {
    color: var(--c-ink);
    border: 0;
}

a.nav-link:hover {
    color: var(--c-bronze);
}

.site-main hr {
    border: 0;
    height: 1px;
    background: var(--c-line);
    opacity: 1;
}

.site-main code {
    color: var(--c-bronze-deep);
    background: var(--c-paper-3);
    padding: .1em .4em;
    border-radius: 6px;
    font-size: .9em;
}

.site-main pre code {
    padding: 0;
    background: none;
}

/* Výchozí nadpisy mimo veřejný obsah (např. wiki si řídí vlastní styly) */
h1, h2, h3 {
    line-height: 1.4;
}

h1 {
    font-size: 29px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 2px #eee;
    font-weight: 700;
}

h2 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 10px;
    font-weight: 700;
}

h3 {
    font-size: 18px;
    margin-top: 30px;
}

/* ---------- Layout ---------- */
.container {
    max-width: var(--container);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.site-main {
    position: relative;
    font-size: var(--fs-body);
    line-height: 1.75;
    color: var(--c-text);
    padding-bottom: 1rem;
}

.site-main p,
.site-main li {
    text-wrap: pretty;
}

.site-main h1,
.site-main h2 {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--c-ink);
    letter-spacing: -.015em;
    text-wrap: balance;
}

.site-main h1 {
    font-size: var(--fs-h1);
    line-height: 1.1;
    margin: 0 0 1.4rem;
    text-shadow: none;
}

.site-main h2 {
    font-size: var(--fs-h2);
    line-height: 1.2;
    margin: 2.6rem 0 .9rem;
}

.site-main h1 em,
.site-main h2 em,
.display em {
    font-style: italic;
    font-weight: 500;
    color: var(--c-gold-dark);
}

.site-main h3 {
    font-family: var(--font-sans);
    font-size: var(--fs-h3);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: var(--c-ink);
    margin: 2.1rem 0 .6rem;
}

.site-main h4 {
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1.5;
    color: var(--c-bronze);
    margin: .25rem 0 .6rem;
}

.site-main h2 a,
.site-main h3 a {
    border-bottom: 0;
    background-image: linear-gradient(var(--c-gold), var(--c-gold));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size var(--dur) var(--ease-out), color var(--dur-fast) var(--ease-soft);
}

.site-main h2 a:hover,
.site-main h3 a:hover {
    background-size: 100% 2px;
}

.site-main p {
    margin-bottom: 1.1rem;
}

.site-main ul li::marker,
.site-main ol li::marker {
    color: var(--c-gold-dark);
}

.site-main .lead,
.lead-text {
    font-size: var(--fs-lead);
    line-height: 1.65;
    color: var(--c-muted);
}

.display {
    font-family: var(--font-serif);
    font-size: var(--fs-display);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -.025em;
    color: var(--c-ink);
}

.section {
    margin-top: var(--section-gap);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    margin-bottom: 1.6rem;
}

.site-main .section-head h2 {
    margin: 0;
}

.round {
    border-radius: var(--radius);
}

/* ---------- Drobné prvky ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1rem;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--c-bronze);
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--c-gold), var(--c-gold-dark));
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .8rem;
    border-radius: var(--radius-pill);
    background: var(--c-cream);
    color: var(--c-brown);
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.chip i {
    color: var(--c-gold-dark);
}

.chip-sage {
    background: var(--c-sage-soft);
    color: var(--c-sage-ink);
}

.chip-sage i {
    color: var(--c-sage);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    border-bottom: 0;
    color: var(--c-ink);
}

.link-arrow i {
    font-size: .85em;
    color: var(--c-gold-dark);
    transition: transform var(--dur) var(--ease-out);
}

.link-arrow:hover i {
    transform: translateX(4px);
}

.icon-badge {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--c-cream), var(--c-sand));
    color: var(--c-gold-dark);
    font-size: 1.15rem;
    box-shadow: inset 0 0 0 1px var(--c-gold-a18);
}

/* ---------- Tlačítka ---------- */
.btn {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: .005em;
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background-color var(--dur-fast) var(--ease-soft), background-position .7s var(--ease-out), color var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft);
}

.btn-primary,
.btn-primary:focus {
    color: var(--c-ink);
    background-color: var(--c-gold);
    background-image: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .5) 50%, transparent 58%);
    background-size: 250% 100%;
    background-position: 100% 0;
    border: 1px solid var(--c-gold);
}

.btn-primary:hover {
    color: var(--c-ink);
    background-color: var(--c-gold);
    border-color: var(--c-gold-dark);
    background-position: 0 0;
    box-shadow: var(--shadow-gold);
}

.btn-primary:active,
.btn-primary.active,
.btn-check:active + .btn-primary,
.btn-check:checked + .btn-primary {
    color: var(--c-ink);
    background-color: var(--c-gold-dark);
    border-color: var(--c-gold-dark);
}

.btn-primary:focus-visible,
.btn-primary:focus {
    box-shadow: 0 0 0 4px var(--c-gold-a35);
}

.site-main .btn,
.site-header .btn,
.site-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border-radius: var(--radius-pill);
    padding: .68rem 1.35rem;
    font-size: .98rem;
    line-height: 1.3;
}

.site-main .btn-lg {
    padding: .9rem 1.7rem;
    font-size: 1.05rem;
}

.site-main .btn-sm {
    padding: .45rem .95rem;
    font-size: .875rem;
}

.site-main .btn:hover {
    transform: translateY(-2px);
}

.site-main .btn:active {
    transform: translateY(0);
}

.btn-soft {
    color: var(--c-ink);
    background: var(--c-white);
    border: 1px solid var(--c-line-strong);
    box-shadow: var(--shadow-xs);
}

.btn-soft:hover,
.btn-soft:focus-visible {
    color: var(--c-bronze-deep);
    background: var(--c-cream);
    border-color: var(--c-gold);
    box-shadow: var(--shadow-sm);
}

.btn .fa-heart {
    transition: transform var(--dur) var(--ease-out);
}

.btn:hover .fa-heart {
    animation: heart-beat 1s var(--ease-soft) 1;
}

/* ---------- Karty ---------- */
.card-soft {
    position: relative;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 2.6vw, 2rem);
}

.card-cream {
    background: linear-gradient(160deg, var(--c-cream) 0%, var(--c-paper) 100%);
    border-color: var(--c-line-warm);
}

.card-hover {
    transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color var(--dur) var(--ease-soft);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-line-warm);
}

.site-main .card-soft > :last-child {
    margin-bottom: 0;
}

.site-main .card-soft > h2:first-child,
.site-main .card-soft > h3:first-child {
    margin-top: 0;
}

/* Dlaždice dokumentu ke stažení */
.doc-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    color: var(--c-text);
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color var(--dur) var(--ease-soft);
}

a.doc-card {
    border-bottom: 1px solid var(--c-line);
}

a.doc-card:hover {
    color: var(--c-text);
    transform: translateY(-3px);
    border-color: var(--c-gold-a55);
    box-shadow: var(--shadow-md);
}

.doc-card strong {
    display: block;
    color: var(--c-ink);
    font-size: 1.02rem;
    line-height: 1.35;
    margin-bottom: .2rem;
}

.doc-card span {
    font-size: var(--fs-small);
    line-height: 1.55;
}

/* ---------- Zvýrazněná poznámka ---------- */
.callout {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--c-line-warm);
    border-radius: var(--radius);
    background: linear-gradient(150deg, var(--c-cream), var(--c-paper));
    color: var(--c-brown);
    line-height: 1.65;
}

.callout > i {
    margin-top: .3rem;
    color: var(--c-gold-dark);
}

/* ---------- Seznam témat s ilustrací (projevy, terapie) ---------- */
.feature-list {
    display: grid;
    gap: 1rem;
    margin: 1.75rem 0 2.75rem;
}

.feature {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: clamp(1rem, 2.4vw, 1.6rem);
    align-items: start;
    padding: clamp(1rem, 2vw, 1.35rem);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-white);
    box-shadow: var(--shadow-xs);
    transition: box-shadow .4s var(--ease-out), border-color var(--dur) var(--ease-soft);
}

.feature:hover {
    border-color: var(--c-line-warm);
    box-shadow: var(--shadow-md);
}

.site-main .feature figure {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-img);
    background: var(--c-paper-3);
    box-shadow: none;
}

.site-main .feature figure img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0;
    transition: transform .8s var(--ease-out), filter .5s var(--ease-soft);
}

.site-main .feature:hover figure img {
    transform: scale(1.05);
}

.site-main .feature h2 {
    margin: .2rem 0 .55rem;
    font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem);
}

.feature-body p:last-child {
    margin-bottom: 0;
}

.help-note {
    margin-top: 1.25rem;
    font-size: .98rem;
    line-height: 1.7;
}

.site-main .help-note h3 {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .6rem;
    font-size: 1.05rem;
}

.help-note h3 i {
    color: var(--c-gold-dark);
}

/* ---------- Seznamy s ikonami (Lic) ---------- */
.site-main .fa-ul {
    --fa-li-width: 1.5em;
    --fa-li-margin: var(--fa-li-width);
    margin-left: var(--fa-li-margin);
    padding-left: 0;
}

.site-main .fa-ul > li + li {
    margin-top: .4rem;
}

.site-main .fa-ul .fa-li {
    text-align: left;
    color: var(--c-gold-dark);
    transition: color var(--dur-fast) var(--ease-soft), transform var(--dur) var(--ease-out);
}

.site-main .fa-ul .fa-li .fa-2xs {
    color: var(--c-gold);
    vertical-align: .18em;
}

.site-main .fa-ul > li:hover > .fa-li {
    color: var(--c-gold);
    transform: translateX(2px);
}

ol.mbold li::marker {
    font-weight: 700;
    color: var(--c-subtle);
    font-size: .95rem;
}

/* ---------- Drobečková navigace ---------- */
.site-main .breadcrumb {
    --bs-breadcrumb-divider: "›";
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .15rem 0;
    margin: 0 0 1.4rem;
    padding: .38rem .95rem;
    font-size: .85rem;
    line-height: 1.5;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-xs);
}

.site-main .breadcrumb-item {
    color: var(--c-subtle);
}

.site-main .breadcrumb-item + .breadcrumb-item::before {
    color: var(--c-sand-line);
    font-weight: 700;
}

.site-main .breadcrumb-item a {
    color: var(--c-muted);
    border: 0;
}

.site-main .breadcrumb-item a:hover {
    color: var(--c-bronze);
}

.site-main .breadcrumb-item.active {
    color: var(--c-ink);
    font-weight: 600;
}

/* ---------- Obrázky, galerie, citace ---------- */
/* Výchozí styly mimo veřejný obsah (např. wiki) */
figure {
    border: 1px solid #eee;
    padding: 5px;
    background-color: #fff;
    border-radius: 5px;
    text-align: center;
}

figure img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

figure figcaption {
    font-size: 14px;
    color: #555;
    margin-top: 4px;
    font-style: italic;
}

figure figcaption a[data-lightbox] {
    float: right;
    border: 0;
    margin-right: 3px;
}

figure.m10 { margin: 10px 0; }
figure.m20 { margin: 20px 0; }
figure.w30 { width: 30%; }
figure.w50 { width: 50%; }
figure.w75 { width: 75%; }
figure.m10.fr { margin-left: 10px; margin-bottom: 0; }
figure.m20.fr { margin-left: 20px; margin-bottom: 0; }
figure.m10.fl { margin-right: 10px; margin-bottom: 0; }
figure.m20.fl { margin-right: 20px; margin-bottom: 0; }
figure.fr { float: right; }
figure.fl { float: left; }

figure a[data-lightbox] {
    position: relative;
    display: block;
    border: 0;
}

figure a[data-lightbox]::after {
    content: "🔍";
    position: absolute;
    top: 0;
    right: 0;
    background: #eee;
    opacity: 0.9;
    padding: 5px 4px 5px 4px;
    line-height: 1;
    color: #000;
    font-size: 13px;
}

/* Veřejný obsah */
.site-main figure {
    margin: 1.8rem 0;
    padding: 10px;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.site-main figure img {
    border-radius: var(--radius-img);
}

.site-main figure figcaption {
    margin: .7rem .4rem .2rem;
    font-size: .875rem;
    font-style: normal;
    line-height: 1.5;
    color: var(--c-muted);
}

.site-main figure.m10 { margin: 10px 0; }
.site-main figure.m20 { margin: 1.8rem 0; }

.site-main figure a[data-lightbox] {
    overflow: hidden;
    border-radius: var(--radius-img);
}

.site-main figure a[data-lightbox] img {
    transition: transform .6s var(--ease-out);
}

.site-main figure a[data-lightbox]:hover img {
    transform: scale(1.015);
}

.site-main figure a[data-lightbox]::after {
    content: "\f00e";
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 253, 249, .92);
    box-shadow: var(--shadow-sm);
    opacity: 1;
    color: var(--c-bronze);
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    line-height: 1;
    transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-soft);
}

.site-main figure a[data-lightbox]:hover::after {
    transform: scale(1.08);
    background: var(--c-gold);
    color: var(--c-ink);
}

.lightbox {
    font-family: var(--font-sans);
}

.lightbox a {
    border: 0;
}

.gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    margin: 1.4rem 0 1.6rem;
}

.gallery a {
    display: block;
    border: 0;
    overflow: hidden;
    border-radius: var(--radius-img);
    box-shadow: var(--shadow-xs);
    background: var(--c-paper-3);
}

.gallery img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0;
    transition: transform .7s var(--ease-out), filter var(--dur) var(--ease-soft);
}

.gallery a:hover img {
    transform: scale(1.05);
    filter: saturate(1.08);
}

/* Výchozí citace mimo veřejný obsah (např. wiki) */
blockquote {
    padding-left: 50px;
    color: #777;
    font-weight: bold;
    font-size: 110%;
    font-style: italic;
}

.site-main blockquote {
    position: relative;
    margin: 2rem 0;
    padding: 1.3rem 1.5rem 1.3rem 3.4rem;
    background: linear-gradient(150deg, var(--c-cream), var(--c-paper));
    border: 1px solid var(--c-line-warm);
    border-radius: var(--radius);
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.6;
    color: var(--c-ink);
}

.site-main blockquote::before {
    content: "\f10d";
    position: absolute;
    left: 1.2rem;
    top: 1.35rem;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
    font-size: 1.1rem;
    color: var(--c-gold);
}

.site-main blockquote p:last-child {
    margin-bottom: 0;
}

.textace h2,
.textace h3 {
    margin-top: 30px;
}

article img {
    max-width: 100%;
}

/* ---------- Video ---------- */
.video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    margin-bottom: 30px;
}

.video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* ---------- Loga partnerů ---------- */
.logos a {
    border: 0;
}

.logos img {
    height: 60px;
}

/* ---------- Formuláře ---------- */
.site-main .form-label {
    font-weight: 600;
    color: var(--c-ink);
    font-size: .95rem;
    margin-bottom: .4rem;
}

.site-main .form-control {
    padding: .72rem .95rem;
    font-size: 1rem;
    color: var(--c-ink);
    background-color: var(--c-white);
    border: 1px solid var(--c-line-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
}

.site-main .form-control:hover {
    border-color: var(--c-sand-line);
}

.site-main .form-control:focus {
    border-color: var(--c-gold);
    box-shadow: 0 0 0 4px var(--c-gold-a18);
}

.site-main .validation-message,
.site-main .validation-errors {
    color: var(--c-danger);
    font-size: .875rem;
}

.site-main .alert {
    border-radius: var(--radius);
    border-width: 1px;
    padding: 1rem 1.25rem;
}

.site-main .alert-warning {
    color: var(--c-brown);
    background: var(--c-cream);
    border-color: var(--c-sand-line);
}

/* ---------- Obsah článků (HTML z GitHubu) ---------- */
.prose {
    font-size: 1.075rem;
    line-height: 1.8;
}

.prose img {
    height: auto;
    border-radius: var(--radius-img);
}

.prose > p:first-of-type {
    font-size: var(--fs-lead);
    line-height: 1.7;
    color: var(--c-ink);
}

.prose h2 {
    margin-top: 2.8rem;
}

.prose table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 1.8rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    font-size: .95rem;
    line-height: 1.55;
    background: var(--c-white);
}

.prose th,
.prose td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--c-line);
    vertical-align: top;
}

.prose th {
    background: var(--c-cream);
    color: var(--c-ink);
    font-weight: 700;
    text-align: left;
}

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

.prose tbody tr:nth-child(even) {
    background: var(--c-paper);
}

.prose .footnotes {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-line);
    font-size: .9rem;
}

/* ---------- Animace ---------- */
@keyframes rise {
    from {
        opacity: 0;
        transform: translate3d(0, 18px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float-y {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -8px, 0); }
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    20% { transform: scale(1.22); }
    40% { transform: scale(.95); }
    60% { transform: scale(1.12); }
}

@keyframes spin-slow {
    to { transform: rotate(360deg); }
}

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(14px, -10px, 0) scale(1.04); }
}

/* Výplň „backwards“ drží výchozí stav jen během zpoždění – hover efekty pak fungují bez omezení */
.rise {
    animation: rise .9s var(--ease-out) backwards;
}

.rise-1 { animation-delay: .08s; }
.rise-2 { animation-delay: .16s; }
.rise-3 { animation-delay: .24s; }
.rise-4 { animation-delay: .32s; }

/* Postupné odhalení při scrollování (řízeno z js/site.js) */
.reveal-ready {
    opacity: 0;
}

.reveal-ready.is-visible {
    opacity: 1;
    animation: rise var(--dur-slow) var(--ease-out) backwards;
    animation-delay: var(--reveal-delay, 0s);
}

.stagger > :nth-child(2) { --reveal-delay: .07s; }
.stagger > :nth-child(3) { --reveal-delay: .14s; }
.stagger > :nth-child(4) { --reveal-delay: .21s; }
.stagger > :nth-child(5) { --reveal-delay: .28s; }
.stagger > :nth-child(6) { --reveal-delay: .35s; }
.stagger > :nth-child(n+7) { --reveal-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }

    .reveal-ready {
        opacity: 1;
    }
}

/* ---------- Responzivita ---------- */
@media (max-width: 767.98px) {
    figure.w30,
    figure.w50,
    figure.w75 {
        width: 100%;
    }

    figure.fl,
    figure.fr {
        float: none;
        margin-left: 0;
        margin-right: 0;
    }

    .side-aside,
    .story-aside {
        margin-top: 2rem;
    }
}

@media (max-width: 575.98px) {
    .feature {
        grid-template-columns: 1fr;
    }

    .site-main .feature figure {
        max-width: 132px;
    }
}

/* ---------- Tisk ---------- */
@media print {
    body {
        background: var(--c-white);
    }

    .reveal-ready {
        opacity: 1;
    }

    figure,
    .card-soft {
        box-shadow: none;
    }
}
