/* =========================================================================
   Detail článku
   ========================================================================= */

/* ---------- hero ---------- */

.article-hero {
    position: relative;
    overflow: hidden;
    background: var(--navy-deep);
    color: var(--white);
    isolation: isolate;
}
.article-hero-media {
    position: absolute;
    inset: 0 0 0 auto;
    width: 62%;
    z-index: -1;
}
.article-hero-media img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 45%;
    display: block;
}
/* přechod z navy do fotky */
.article-hero-media::after {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, var(--navy-deep) 0%, rgba(11, 29, 51, .85) 22%, rgba(11, 29, 51, .35) 55%, rgba(11, 29, 51, .1) 100%),
        linear-gradient(0deg, rgba(11, 29, 51, .55) 0%, rgba(11, 29, 51, 0) 45%);
}
.article-hero-inner {
    min-height: 175px;
    padding-top: 18px;
    padding-bottom: 22px;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.article-hero h1 {
    max-width: 920px;
    margin: 0;
    font-size: clamp(26px, 2.6vw + 6px, 40px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.01em;
    text-wrap: balance;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}

.article-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.article-meta .badge { font-size: 12px; padding: 4px 10px; }
.article-meta time {
    padding: 3px 10px; border-radius: 5px;
    background: rgba(255, 255, 255, .1);
    font-size: 13px; font-weight: 600;
}

/* ---------- rozvržení ---------- */

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 474px;
    gap: 24px;
    align-items: start;
    margin-top: 18px;
}

/* ---------- titulní obrázek ---------- */

.article-cover {
    position: relative;
    margin: 0 0 22px;
    aspect-ratio: 21 / 8;
    border-radius: var(--radius-img);
    overflow: hidden;
    background: var(--navy-deep);
}
.article-cover a { display: block; width: 100%; height: 100%; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }

/* fotka na výšku: celá fotka uprostřed, po stranách rozmazaná kopie */
.article-cover.is-portrait::before {
    content: '';
    position: absolute; inset: -30px;
    background: var(--cover-bg) center / cover no-repeat;
    filter: blur(28px) brightness(.6) saturate(1.2);
}
.article-cover.is-portrait img { position: relative; object-fit: contain; }

/* logo / plakát na bílém pozadí: celé, na světlém podkladu */
.article-cover.is-graphic { background: var(--surface-soft); border: 1px solid var(--line); }
.article-cover.is-graphic::before { display: none; }
.article-cover.is-graphic img { object-fit: contain; padding: 18px; }

.cover-zoom {
    position: absolute; top: 14px; right: 14px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-btn);
    background: rgba(11, 29, 51, .78);
    color: var(--white); font-size: 16px;
    transition: transform .15s, background-color .15s;
}
.article-cover a:hover .cover-zoom { background: var(--navy-deep); transform: scale(1.06); }

/* ---------- text ---------- */

.article-body { font-size: 16px; line-height: 1.65; }
.article-lead {
    margin: 0 0 14px;
    font-size: 17px; font-weight: 700; line-height: 1.55;
    color: var(--text);
}
.article-content { color: #2A333E; overflow-wrap: break-word; }
.article-content > :first-child { margin-top: 0; }
.article-content p { margin: 0 0 14px; }
.article-content h2, .article-content h3 { margin: 28px 0 10px; color: var(--text); }
.article-content h2 { font-size: 22px; }
.article-content h3 { font-size: 19px; }
.article-content ul, .article-content ol { margin: 0 0 16px; padding-left: 22px; }
.article-content li { margin-bottom: 4px; }
.article-content li::marker { color: var(--gold-dark); }
.article-content a { color: var(--navy); text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.article-content a:hover { color: var(--red); }
.article-content b, .article-content strong { color: var(--text); }
.article-content blockquote {
    margin: 22px 0; padding: 14px 20px;
    border-left: 4px solid var(--gold);
    background: var(--surface-soft);
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
    font-size: 18px; font-weight: 600; color: var(--text);
}

.article-image { margin: 22px 0; }
.article-image a { display: block; border-radius: var(--radius-img); overflow: hidden; background: var(--surface-soft); }
.article-image img { display: block; width: 100%; height: auto; transition: transform .3s; }
.article-image a:hover img { transform: scale(1.015); }
.article-image.is-portrait { max-width: 460px; }
.article-image figcaption { margin-top: 8px; font-size: 14px; color: var(--text-muted); }

.article-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 22px 0;
    border-radius: var(--radius-img);
    overflow: hidden;
    background: #000;
}
.article-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- galerie ---------- */

.article-gallery { margin-top: 28px; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 104px;
    grid-auto-flow: row dense;
    gap: 6px;
}
.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: var(--surface-soft);
}
.gallery-item.is-large { grid-column: span 2; grid-row: span 2; }
.gallery-item.is-tall { grid-row: span 2; }
/* méně fotek: jeden řádek vyšších dlaždic */
.gallery-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
.gallery-grid[data-count="1"] .gallery-item { aspect-ratio: 16 / 9; }
.gallery-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 260px; }
.gallery-grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
.gallery-grid[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; }
.gallery-item.is-hidden { display: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(11, 29, 51, 0); transition: background-color .2s;
}
.gallery-item:hover::after { background: rgba(11, 29, 51, .15); }
.gallery-more {
    position: absolute; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    background: rgba(11, 29, 51, .62);
    color: var(--white); font-size: 26px; font-weight: 800;
}

/* ---------- patička článku ---------- */

.article-footer {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
    margin-top: 28px; padding-top: 18px;
    border-top: 1px solid var(--line);
}
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.article-tags li { padding: 4px 12px; border-radius: 20px; background: var(--surface-soft); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.article-share { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.article-share > span { font-size: 14px; font-weight: 700; margin-right: 4px; }
.share-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-btn); border: 1px solid var(--line);
    background: var(--white); color: var(--navy);
    font-size: 15px; text-decoration: none; cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
.share-btn:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.share-btn.is-done { background: #2F7A3D; border-color: #2F7A3D; color: var(--white); }

/* ---------- postranní panel ---------- */

.article-sidebar { display: flex; flex-direction: column; gap: 14px; }
.side-card {
    padding: 14px 16px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 40, 70, .04);
}
.side-card .section-title { font-size: 17px; margin-bottom: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.section-head .section-title { margin: 0; }
.section-link { font-size: 13px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.section-link i { margin-left: 6px; font-size: 12px; }
.side-empty { margin: 4px 0 8px; font-size: 14px; color: var(--text-muted); }

.related-list, .event-list, .doc-list { list-style: none; margin: 0; padding: 0; }
.related-list li + li, .event-list li + li, .doc-list li + li { border-top: 1px solid var(--line); }

.related-list a {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    gap: 14px; align-items: center;
    padding: 8px 0;
    color: var(--text); text-decoration: none;
}
.related-img, .related-list .img-placeholder {
    width: 132px; height: 64px;
    object-fit: cover; border-radius: 8px; display: block;
}
.img-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-soft); color: #C9C1B4; font-size: 22px;
}
.related-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.related-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); }
.related-meta .badge { font-size: 10px; padding: 2px 7px; }
.related-title {
    font-size: 14px; font-weight: 700; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-list a > i, .event > i { color: var(--navy); font-size: 13px; transition: transform .15s; }
.related-list a:hover .related-title, a.event:hover .event-title { color: var(--red); }
.related-list a:hover > i, a.event:hover > i { transform: translateX(3px); }

.event {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 16px; align-items: center;
    padding: 6px 0;
    color: var(--text); text-decoration: none;
}
.event-date {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--gold-light) 0%, #E9C88E 100%);
    color: var(--navy-deep); line-height: 1;
}
.event-date b { font-size: 19px; font-weight: 800; }
.event-date span { margin-top: 3px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.event-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.event-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.event-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; color: var(--text-muted); }
.event-meta i { margin-right: 7px; color: var(--navy); }

.doc-list a {
    display: flex; align-items: center; gap: 14px;
    padding: 8px 4px;
    color: var(--text); text-decoration: none; font-size: 14px;
}
.doc-icon { width: 22px; font-size: 20px; text-align: center; color: var(--navy); }
.doc-pdf { color: var(--red); }
.doc-doc, .doc-docx, .doc-odt { color: #2B579A; }
.doc-xls, .doc-xlsx, .doc-ods { color: #217346; }
.doc-title { flex: 1; min-width: 0; }
.doc-title small { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.doc-dl { color: var(--navy); }
.doc-list a:hover .doc-title { color: var(--red); }

.side-social p { margin: 0 0 12px; font-size: 14px; color: var(--text-muted); }
.side-social .btn { width: 100%; margin-bottom: 6px; min-height: 40px; font-size: 14px; }

img.is-graphic { object-fit: contain !important; background: var(--white); padding: 6px; }
.related-img.is-graphic { border: 1px solid var(--line); }

/* ---------- Mohlo by vás zajímat ---------- */

.more-articles { margin-top: 44px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.article-card {
    display: flex; flex-direction: column;
    border: 1px solid var(--line); border-radius: var(--radius-card);
    overflow: hidden; background: var(--surface);
    color: var(--text); text-decoration: none;
    transition: box-shadow .2s, transform .2s;
}
.article-card:hover { box-shadow: 0 10px 28px rgba(16, 40, 70, .12); transform: translateY(-2px); }
.card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-soft); }
.card-img img, .card-img .img-placeholder { width: 100%; height: 100%; object-fit: cover; display: flex; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 18px; }
.card-title { font-size: 16px; font-weight: 700; line-height: 1.35; }
.article-card:hover .card-title { color: var(--red); }

/* =========================================================================
   Responzivita
   ========================================================================= */

@media (max-width: 1280px) {
    .article-layout { grid-template-columns: minmax(0, 1fr) 380px; }
    .related-list a { grid-template-columns: 104px minmax(0, 1fr) auto; gap: 12px; }
    .related-img, .related-list .img-placeholder { width: 104px; height: 60px; }
}

@media (max-width: 1024px) {
    .article-layout { grid-template-columns: minmax(0, 1fr); }
    .article-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
    .article-hero-media { width: 75%; }
    .article-cover { aspect-ratio: 16 / 7; }
}

@media (max-width: 760px) {
    .article-hero-media { width: 100%; }
    .article-hero-media::after {
        background: linear-gradient(0deg, var(--navy-deep) 0%, rgba(11, 29, 51, .8) 45%, rgba(11, 29, 51, .45) 100%);
    }
    .article-hero-inner { min-height: 240px; padding-top: 14px; }
    .breadcrumb ol { margin-bottom: auto; padding-bottom: 28px; }
    .breadcrumb [aria-current] { display: none; }

    .article-cover { aspect-ratio: 4 / 3; margin-bottom: 18px; }
    .article-cover.is-portrait { aspect-ratio: 4 / 5; }
    .article-lead { font-size: 16.5px; }
    .article-image.is-portrait { max-width: 100%; }

    .article-sidebar { grid-template-columns: minmax(0, 1fr); }

    .gallery-grid, .gallery-grid[data-count="3"], .gallery-grid[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 120px; }
    .gallery-grid[data-count="3"] .gallery-item:first-child, .gallery-grid[data-count="5"] .gallery-item:first-child,
    .gallery-grid[data-count="9"] .gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
    .gallery-grid[data-count="2"] { grid-auto-rows: 200px; }
    .gallery-item.is-tall { grid-row: span 2; }

    .card-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .article-card { flex-direction: row; }
    .card-img { flex: 0 0 38%; aspect-ratio: auto; min-height: 110px; }
    .card-body { padding: 12px 14px; }
    .card-title { font-size: 15px; }

    .article-footer { flex-direction: column; align-items: flex-start; }
    .article-share { margin-left: 0; }

}
