/* ═══════════════════════════════════════════════════════════════
   Mariánský sloup Praha – Styly veřejného webu
   Sdílená paleta, reset a základ jsou v main.css.
   ═══════════════════════════════════════════════════════════════ */

/* ── Veřejný web – tělo a layout ────────────────────────────── */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.75;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Typografie ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    color: var(--gold);
    line-height: 1.3;
    margin-bottom: 0.5em;
    cursor: default;
    font-weight: 600;
}

h1 { font-size: clamp(1.8rem, 3.5vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.25rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--link-hover); text-decoration: underline; }

strong, b { color: var(--gold-light); }

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
    margin: 1rem auto;
    border: 1px solid var(--border);
    user-select: none;
    pointer-events: none;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
th {
    background: var(--bg-secondary);
    color: var(--gold);
    padding: 0.6rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-light);
}
td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
}
tr:hover td { background: var(--bg-secondary); }

blockquote {
    border-left: 3px solid var(--gold-muted);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ── Tlačítka ────────────────────────────────────────────────── */
.btn-primary {
    display: inline-block;
    background: var(--gold);
    color: var(--bg-deep);
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-weight: bold;
    transition: background var(--transition);
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-primary:hover { background: var(--gold-light); color: var(--bg-deep); text-decoration: none; }

/* ── Hlavička ────────────────────────────────────────────────── */
.site-header {
    background: var(--bg-nav);
    border-bottom: 2px solid var(--gold-dim);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 64px;
}

.site-brand {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    flex-shrink: 0;
}
.site-brand:hover { text-decoration: none; }
.brand-main {
    font-size: 1.2rem;
    font-weight: normal;
    color: var(--gold);
    letter-spacing: 0.02em;
}
.brand-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}


/* ── Scrollable page nav (years / categories) ────────────────── */
.page-nav-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}
.page-nav {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}
.page-nav::-webkit-scrollbar { display: none; }
.page-nav ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
}
.page-nav ul li { margin-bottom: 0; }
.page-nav a {
    color: var(--text-secondary);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    white-space: nowrap;
    text-decoration: none;
    display: block;
    transition: background var(--transition), color var(--transition);
}
.page-nav a:hover {
    background: var(--bg-secondary);
    color: var(--gold-light);
}
.page-nav a.active {
    background: var(--bg-secondary);
    color: var(--gold);
    font-weight: 600;
}
.page-nav-arrow {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #7ab3d4;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.3rem 1.15rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), color var(--transition);
}
.page-nav-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}
.page-nav-arrow:hover { 
    color: var(--gold-light);
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* ── Hamburger button ────────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: 0.5rem;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}

/* ── Mobile dropdown nav ─────────────────────────────────────── */
.mobile-nav {
    display: none;
}
.mobile-nav ul {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.5rem 1.5rem 0.75rem;
    list-style: none;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
}
.mobile-nav a {
    display: block;
    color: var(--text-secondary);
    padding: 0.45rem 0.75rem;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}
.mobile-nav a:hover { background: var(--bg-secondary); color: var(--gold-light); }
.mobile-nav a.active { color: var(--gold); font-weight: 600; }

/* ── Obsah stránky ───────────────────────────────────────────── */
.site-main { flex: 1; padding: 2rem 1.5rem; }

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}


/* ── Intro ────────────────────────────────────────────────────── */
.page-intro {
    text-align: center;
    padding: 2rem 1rem;
}
.intro-image {
    width: 50%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ── Hero ────────────────────────────────────────────────────── */
.page-hero {
    background: linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-deep) 100%);
    border-bottom: 1px solid var(--border);
    padding: 3rem 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--gold);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}
.hero-sub {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-style: italic;
}

/* ── Sekce nadpis ────────────────────────────────────────────── */
.section-heading {
    color: var(--gold);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* ── Aktuality na Homepage ───────────────────────────────────── */
.index-articles {
    padding: 2rem 0 3rem;
}
.index-articles-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.index-articles-more {
    text-align: center;
    margin-top: 1rem;
}

/* ── Kartičky článků (grid) ──────────────────────────────────── */
.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), background var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
}
.article-card:hover {
    border-color: var(--gold-muted);
    background: var(--bg-secondary);
}
.article-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.3rem;
    font-style: italic;
}
.article-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-light);
    margin: 0;
    cursor: inherit;
}
.article-card-title a {
    color: inherit;
    text-decoration: none;
}
.article-card:hover .article-card-title { color: var(--gold); }
.article-card.no-link { cursor: default; }
.article-card.no-link:hover { border-color: var(--border); background: var(--bg-card); }
.article-card.no-link:hover .article-card-title { color: var(--gold-light); }
.article-card-subtitle { margin: 0.15rem 0 0.35rem; font-size: 0.875rem; color: var(--text-muted); font-weight: 400; }
.article-card-body { flex: 1; min-width: 0; padding: 1rem 1.25rem; }
.article-thumb-wrap { flex-shrink: 0; }
.article-thumb-wrap img { margin: 0; background-color: white; border-radius: 0 0 var(--radius-lg) var(--radius-lg); border: none; }
.article-thumb { width: 100%; max-height: 200px; object-fit: cover; display: block; }
@media (min-width: 640px) {
    .article-card { flex-direction: row; align-items: stretch; }
    .article-thumb-wrap { width: 180px; min-width: 180px; position: relative; overflow: hidden; }
    .article-thumb-wrap img { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
    .article-thumb { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; }
}
.article-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    line-height: 1.5;
}

/* ── Statický článek ───────────────────────────────────────────── */
.article-body > p > img {
    margin: 3rem auto;
}

/* ── Fotogalerie pod clankem ─────────────────────────────────── */
.article-gallery[data-gallery="true"] {
    margin-top: 2.8rem;
}

.article-gallery-shell {
    position: relative;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + 4px);
    padding: 0.9rem;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(255, 214, 128, 0.08), transparent 52%),
        linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 92%, black 8%), color-mix(in srgb, var(--bg-secondary) 88%, black 12%));
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.article-gallery-shell:focus-visible {
    outline: 2px solid var(--gold-muted);
    outline-offset: 2px;
}

.article-gallery-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.6rem;
}

.article-gallery-counter {
    color: var(--text-muted);
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.86rem;
    justify-self: end;
    cursor: default;
}

.article-gallery-open {
    justify-self: end;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 0;
    padding-top: 0.1rem;
    background: rgba(20, 22, 30, 0.46);
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1;
    backdrop-filter: blur(4px);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.article-gallery-open:hover {
    color: var(--gold-light);
    background: rgba(28, 30, 39, 0.62);
    border-color: var(--gold-muted);
}

@media (max-width: 640px) {
    .article-gallery-open { display: none; }
}

.article-gallery-stage {
    position: relative;
    aspect-ratio: 4 / 3;
    height: clamp(250px, 58vw, 610px);
    border-radius: calc(var(--radius-lg) + 2px);
    border: 1px solid var(--border);
    background:
        radial-gradient(80% 80% at 50% 45%, rgba(255, 255, 255, 0.06), transparent 72%),
        color-mix(in srgb, var(--bg-secondary) 90%, black 10%);
    overflow: hidden;
}

.article-gallery-frame {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-gallery-main-image {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    margin: 0;
    border: none;
    border-radius: 0;
    padding: 0;
}

.article-gallery-caption {
    display: none;
}

.article-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    background: rgba(18, 20, 28, 0.52);
    color: var(--text-primary);
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 999px;
    padding: 0;
    padding-bottom: 0.3rem;
    font-size: 2.5rem;
    line-height: 1;
    backdrop-filter: blur(3px);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.article-gallery-nav.is-prev {
    left: 0.9rem;
    padding-right: 0.05rem;
}

.article-gallery-nav.is-next {
    right: 0.9rem;
    padding-left: 0.05rem;
}

.article-gallery-nav:hover {
    color: var(--gold-light);
    background: rgba(28, 30, 39, 0.7);
    border-color: var(--gold-muted);
}

.article-gallery-thumbs-wrap {
    margin-top: 0.85rem;
}

.article-gallery-thumbs {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.15rem 0.1rem 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--gold-dim) 70%, var(--border) 30%) rgba(0, 0, 0, 0.06);
}

.article-gallery-thumbs::-webkit-scrollbar {
    height: 0.45rem;
}

.article-gallery-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255, 214, 128, 0.35);
    border-radius: 999px;
}

.article-gallery-thumb {
    width: 98px;
    min-width: 98px;
    height: 76px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    background: color-mix(in srgb, var(--bg-secondary) 92%, black 8%);
    padding: 0;
    cursor: pointer;
    transition: transform 0.22s ease, border-color 0.2s, box-shadow 0.2s;
}

.article-gallery-thumb:hover {
    transform: translateY(-2px);
    border-color: var(--gold-muted);
}

.article-gallery-thumb:focus-visible {
    outline: 2px solid var(--gold-muted);
    outline-offset: 2px;
}

.article-gallery-thumb.is-active {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px rgba(255, 214, 128, 0.35);
}

.article-gallery-thumb img {
    width: 100%;
    height: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    object-fit: cover;
}

.article-gallery-thumb.is-portrait img {
    object-fit: contain;
    background: color-mix(in srgb, var(--bg-secondary) 95%, black 5%);
}

body.article-lightbox-open {
    overflow: hidden;
}

.article-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(7, 8, 11, 0.9);
    backdrop-filter: blur(3px);
    padding: 1rem;
}

.article-lightbox.is-open {
    display: flex;
}

.article-lightbox-panel {
    width: min(1120px, 94vw);
    max-height: 92vh;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, #13141b, #0d0e13);
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.article-lightbox-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.article-lightbox-counter {
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: default;
}

.article-lightbox-caption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted, #8a8fa8);
    padding: 0.4rem 1rem 0.6rem;
    min-height: 1.6em;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.article-lightbox-close,
.article-lightbox-nav {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.article-lightbox-close {
    width: 2rem;
    height: 2rem;
    padding: 0;
    padding-top: 0.15rem;
    font-size: 1.25rem;
    line-height: 1;
}

.article-lightbox-close:hover,
.article-lightbox-nav:hover {
    border-color: var(--gold-muted);
    color: var(--gold-light);
    background: rgba(255, 214, 128, 0.1);
}

.article-lightbox-viewport {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}

.article-lightbox-image {
    width: 100%;
    height: min(74vh, 760px);
    object-fit: contain;
    margin: 0;
    border: none;
    border-radius: 0;
    padding: 0.75rem 3.8rem;
}

.article-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.article-lightbox-nav.is-prev { left: 0.8rem; }
.article-lightbox-nav.is-next { right: 0.8rem; }

@media (max-width: 720px) {
    .article-gallery-shell {
        padding: 0.72rem;
        border-radius: 14px;
    }

    .article-gallery-toolbar {
        grid-template-columns: 1fr auto;
    }

    .article-gallery-open {
        justify-self: end;
    }

    .article-gallery-main-image {
        height: 100%;
    }

    .article-gallery-nav {
        width: 2.7rem;
        height: 2.7rem;
        font-size: 1.75rem;
    }

    .article-gallery-thumb {
        width: 82px;
        min-width: 82px;
        height: 68px;
    }

    .article-lightbox {
        padding: 0.45rem;
    }

    .article-lightbox-panel {
        width: 100%;
        max-height: 96vh;
        border-radius: 12px;
    }

    .article-lightbox-image {
        padding: 0.4rem 2.45rem;
        height: min(74vh, 620px);
    }

    .article-lightbox-nav {
        width: 1.9rem;
        height: 1.9rem;
        font-size: 1.05rem;
    }

    .article-lightbox-nav.is-prev { left: 0.38rem; }
    .article-lightbox-nav.is-next { right: 0.38rem; }
}

/* ── Detail článku ───────────────────────────────────────────── */
.article-detail { padding: 1rem 0; }

.article-detail address { margin-bottom: 1.25rem; font-style: normal; }

.article-date-large {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.article-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.attachment-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text);
    text-decoration: none;
    background: var(--bg-card);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.attachment-btn:hover {
    background: var(--gold-dim);
    border-color: var(--gold-muted);
    color: var(--gold-light);
    text-decoration: none;
}
.attachment-icon { font-size: 1rem; }
.article-meta {
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.article-author {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.article-source {
    margin-top: 2rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

/* ── 404 ─────────────────────────────────────────────────────── */
.not-found {
    text-align: center;
    padding: 4rem 1rem;
}
.not-found h1 { margin-bottom: 1rem; }
.not-found p { color: var(--text-secondary); margin-bottom: 2rem; }

/* ── Patička ─────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-nav);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.footer-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    cursor: default;
}
.footer-name > a {
    text-decoration: none;
    cursor: pointer;
    color: var(--text-muted);
}
.footer-name > a:hover {
    color: var(--link-hover);
}

/* ── Responzivita ────────────────────────────────────────────── */
.year-heading { display: none; }
@media (max-width: 640px) {
    .page-nav-wrapper { display: none; }
    .year-heading { display: block; font-size: 1.8rem; }
}
@media (max-width: 750px) {
    .main-nav { display: none; }
    .header-inner nav.page-nav { display: none; }
    .nav-toggle { display: flex; margin-left: auto; }
    .mobile-nav.open { display: block; border-top: 1px solid var(--gold-dim); }
    .header-inner { flex-wrap: nowrap; }
}
