* {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f6e7c5;  /* paper — sjednoceno s .review canvas */
    color: #2b211b;             /* ink */
    display: flex;
    flex-direction: column;
}

nav {
    background-color: #1e1713;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
}

nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
}

nav li {
    height: 50px;
}

nav a {
    height: 100%;
    padding: 0 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: #f3ead6;
}

nav a:hover {
    background-color: #2b211b;
}

nav li:first-child {
    margin-right: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: 250px;
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    /* box-shadow: -10px 0 10px rgba(255, 255, 255, 0.1); */
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.sidebar li {
    width: 100%;
}

.sidebar a {
    width: 100%;
    padding: 0 30px;
    box-sizing: border-box;
}

.menu-button {
    display: none;
}

@media (max-width: 1200px) {
    .hideOnMobile {
        display: none;
    }

    .menu-button {
        display: block;
    }
}

details {
    padding: 20px;
    margin: 10px auto;
    background-color: #f6e7c5;
    border-radius: 6px;
    border: 2px solid #2b211b;
    box-shadow: 3px 3px 0 rgba(43, 33, 27, 0.15);
    color: #2b211b;
    width: min(900px, 90%);
    max-width: min(900px, 90%);
}

details h2,
details h3,
details h4 {
    color: #2b211b;
}

.details-dark {
    padding: 20px;
    margin: 10px;
    background-color: #2b211b;
    color: #f3ead6;
    border-radius: 6px;
    border: 2px solid #f3ead6;
    box-shadow: 3px 3px 0 rgba(243, 234, 214, 0.2);
}

.details-dark summary {
    color: #f3ead6;
    font-weight: 700;
}

.details-dark h2,
.details-dark h3,
.details-dark h4 {
    color: #f3ead6;
}

.donate-cta {
    padding: 16px;
    background-color: #f6e7c5;
    border-radius: 6px;
    color: #2b211b;
    border: 2px solid #2b211b;
    margin: 10px auto;
    width: min(910px, 90%);
    max-width: min(910px, 90%);
}

.donate-cta h2,
.donate-cta h3 {
    color: #2b211b;
}

.donate-cta-inner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.donate-qr {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.donate-text {
    flex: 1 1 320px;
    min-width: 0;
}

.donate-text h2 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    color: #2b211b;
}

.donate-text p {
    margin: 0 0 8px 0;
    color: #1a1410;
    line-height: 1.3;
    font-size: 0.95rem;
    min-width: 150px;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.qr {
    display: flex;
    padding: 20px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 0 0 220px;
    max-width: 260px;
}

@media (max-width: 400px) {
    .sidebar {
        width: 100%;
    }

    details {
        padding: 10px;
        margin: 10px;
    }

    .footnote {
        padding: 10px;
    }

    .donate-cta {
        margin: 10px;
        padding: 10px;
    }

    .donate-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .donate-qr {
        width: 80px;
        height: 80px;
    }
}

details summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    line-height: 1;
    color: #2b211b;
}

details summary svg {
    height: 1.5em;
    width: 1.5em;
    flex: 0 0 auto;
}

p {
    margin-top: 15px;
    margin-bottom: 15px;
}

summary::-webkit-details-marker {
    display: none;
}

summary::marker {
    content: "";
}

.summary-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
}

.text {
    margin: 10px 30px;
    color: #f3ead6;
}

:root {
    --accent: #c56a3a;
    --accent-hover: #d9804b;
    --accent-visited: #8f5d2e;
    --focus: #f0b256;
    --callout-bg: rgba(199, 144, 58, 0.08);
    --callout-text: inherit;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 0.10em;
    text-underline-offset: 0.18em;
    text-decoration-color: color-mix(in oklab, var(--accent) 65%, transparent);
    transition: color .15s ease, text-decoration-color .15s ease, background-color .15s ease;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    hyphens: none;
    word-break: break-word;
}

a:hover {
    color: var(--accent-hover);
    text-decoration-color: currentColor;
}

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

p {
    margin-top: 15px;
    margin-bottom: 15px;

    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;

    text-align-last: left;
}

.mermaid-host svg {
    max-width: 100%;
    height: auto;
}

.mermaid-host {
    overflow-x: auto;
}

h1 {
    color: #f3ead6;
    font-size: 1.5rem;
    margin: 10px auto;
}

h2 {
    font-size: 1.25rem;
    margin: 10px auto;
    color: #f3ead6;
}

h3 {
    font-size: 1rem;
    margin: 10px auto;
    color: #f3ead6;
}

ul {
    margin: 15px 0 15px 20px;
}

.social-links-container {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    font-weight: bold;
    transition: opacity 0.2s ease-in-out;
}

.social-link-item:hover {
    opacity: 0.7;
}

/* Callout Base Styles */
.callout {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
    border: 2px solid #2b211b;
    background-color: #f6e7c5;
    color: #1a1410;
}

.callout h2,
.callout h3,
.callout h4 {
    color: #1a1410;
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.callout-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #fff2e6;
}

/* Remove bottom margin from the last element in content to fit nicely */
.callout-content > :last-child {
    margin-bottom: 0;
}

/* --- Color Variants (Obsidian-like) --- */

/* Info (Blue) */
.callout-info {
    border-color: #3f6b7a;
    background-color: rgba(63, 107, 122, 0.08);
}

.callout-info .callout-header {
    color: #3f6b7a;
}

/* Danger / Highlight (Red) */
.callout-danger {
    border-color: #b64a3a;
    background-color: rgba(182, 74, 58, 0.08);
}

.callout-danger .callout-header {
    color: #b64a3a;
}

/* Warning (Yellow/Orange) */
.callout-warning {
    border-color: #c7903a;
    background-color: var(--callout-bg, rgba(199, 144, 58, 0.08));
}

.callout-warning .callout-header {
    color: #c7903a;
}

.callout-warning .callout-content {
    color: var(--callout-text, inherit);
}

/* Success / Emphasize (Green) */
.callout-success {
    border-color: #5f7f4f;
    background-color: rgba(95, 127, 79, 0.08);
}

.callout-success .callout-header {
    color: #5f7f4f;
}

/* Quote (Gray) */
.callout-quote {
    border-color: #6b5a4f;
    background-color: rgba(107, 90, 79, 0.08);
}

.callout-quote .callout-header {
    color: #6b5a4f;
}

/* Example (Purple) */
.callout-example {
    border-color: #7a5a8f;
    background-color: rgba(122, 90, 143, 0.08);
}

.callout-example .callout-header {
    color: #7a5a8f;
}

details > p:first-of-type {
    margin-top: 0;
}

details > p:last-of-type {
    margin-bottom: 0;
}

/* Web/wwwroot/app.css */

/* ... existující styly pro .callout-content ... */

.callout-content p {
    text-align: left;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 12px;
}

.lazy-image {
    width: min(900px, 100%);
    margin: 0 auto 12px auto;
    display: flex;
    justify-content: center;
    max-width: min(900px, 100%);
}

.mission-hero {
    display: flex;
    justify-content: center;
    padding: 24px 0 16px;
}

.mission-hero__img {
    width: min(940px, 95%);
    margin: 0;
    max-width: min(940px, 95%);
}

.lazy-placeholder {
    min-height: 100px;
    background: #eee;
    border-radius: 4px;
}

/* Footnote styles — centrované a zarovnané jako ostatní bloky (details, donate-cta) */
.footnote {
    padding: 12px;
    margin: 10px auto;
    width: min(900px, 90%);
    max-width: min(900px, 90%);
    box-sizing: border-box;
    color: #f3ead6;
    /* necháváme pozadí průhledné, ale můžete přidat background-color pokud chcete zvýraznit */
}

.footnote .text {
    /* odstraníme globální horizontální odsazení .text, které by narušovalo centrování */
    margin: 0;
    padding: 0 30px;
    color: inherit;
    text-align: left;
    font-size: 0.95rem;
}

.footnote p {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* === Review page — light/parchment palette === */
/* Scoped via :has(.review); higher specificity than the bare `body` rules
   above, so no !important needed. */
body:has(.review) {
    background-color: #f6e7c5;
    color: #2b211b;
}

body:has(.review) .footnote {
    color: #6e5e54;
}

body:has(.review) h1,
body:has(.review) h2,
body:has(.review) h3 {
    color: #2b211b;
}
