:root {
    /* Paleta odvozená z ikony */
    --primary: #2eb8c8;       /* Tyrkysová (z levé strany ikony) */
    --secondary: #5ad684;     /* Zelená (z pravé strany ikony) */
    --primary-dark: #1b8d9c;  
    --primary-light: #e6fafc;
    --accent: #5ad684;
    
    /* Neutrální barvy */
    --ink: #1a1a1a;
    --ink-muted: #5a5a5a;
    --rule: #eaeaea;
    --bg: #fafafa;
    --white: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
    scroll-behavior: smooth; 
    overflow-x: clip;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    overflow-x: clip; 
}

/* ── NAV ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    justify-content: center;
    gap: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}
nav a {
    color: rgba(255,255,255,0.85);
    padding: 14px 22px;
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
    border-bottom: 2px solid transparent;
}
nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
    border-bottom-color: #fff;
}

/* ── HEADER ── */
header {
    /* Přidáme cestu k obrázku přímo do vlastnosti background za gradient */
    background: 
        linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%), 
        url('pic/Kost_ZABAGED_podklad.jpg');
    
    background-size: cover;
    background-position: center;
    background-blend-mode:multiply; 

    color: white;
    padding: 5rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}
header::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 100%;
    pointer-events: none;
}
.header-inner {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}
.header-katedra {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.header-katedra a{
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}
header h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    max-width: 780px;
    margin-bottom: 2rem;
}
.header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
}
.header-meta span strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
}

/* ── LAYOUT ── */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

section {
    padding-top: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
}
section:last-child { border-bottom: none; }

/* ── SECTION HEADINGS ── */
.section-label {
    font-size: 1.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    line-height: 1.2;
}
.header-inner h2{
    font-size: 1.2rem;
    font-weight: 600;
    color: var (var(--bg));
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    padding-top: 1.3rem;
    line-height: 1.0;
}
h3{
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    margin-top: 1rem;
    line-height: 1.0;
}
h4{
    font-size: 1.2rem;
    font-weight: 600;
    color: var (--rule);
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    padding-top: 1.3rem;
    line-height: 1.0;
}

/* ── ABSTRACT BLOCK ── */
.abstract-block {
    background: var(--white);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    border-radius: 2px;
    margin-bottom: 2rem;
}
.abstract-block p {
    color: var(--ink-muted);
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.8;
}

.abstract-block summary {
    cursor: pointer;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    list-style-type: "🔽 "; /* Volitelná změna ikonky šipky */
}

.abstract-block[open] summary {
    list-style-type: "... ";
}

.abstract-card {
    border-left: 4px solid var(--primary-dark);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
    max-width: 800px;
    line-height: 1.6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
#more-text {
     display: none;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-dark);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.read-more-btn:hover {
    color: var(--primary);
    text-decoration: none;
}


/* ── IMAGE ── */
.figure {
    margin: 2rem 0;
}
.figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    display: block;
    border: 1px solid var(--rule);
}
.figure figcaption {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin-top: 0.6rem;
}
.obr{
    font-size: 0.7rem;
    color: var(--ink-muted);
    text-align: center;
}
/* ── GOALS ── */
.goal-text, .placeholder-text {
    color: var(--ink-muted);
    line-height: 1.85;
}
.goal-text p + p { margin-top: 1rem; }

/* ── DATA TABLE (SMALL CARDS) ── */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.data-card {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1.2rem 1.4rem;
}
.data-card .dc-label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.4rem;
}
.data-card .dc-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary-dark);
}
.header-katedra a:hover{
    color: var(--bg);
}
p a{
    text-decoration: none;
    color: var(--ink);
}
p a:hover{
    color: var(--primary);
}

/* ── BREAKOUT TABULKA ── */
.table-breakout {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.table-breakout-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}
.table-container-wrapper {
    margin: 2.5rem 0;
}
#tag-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: var(--white);
    position: relative;
    -webkit-overflow-scrolling: touch;
}

#tag-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
#tag-table th {
    background: var(--primary);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

/* ── TABULKOVÉ STYLY JS ── */
#tag-filters .fpill {
    font-size: 0.72rem;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid var(--rule);
    background: var(--white);
    color: var(--ink-muted);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background .15s, color .15s, border-color .15s;
}
#tag-filters .fpill.active, #tag-filters .fpill:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
}
#tag-table tbody tr {
    border-bottom: 1px solid var(--rule);
    transition: background .1s;
}
#tag-table tbody tr.row-even { background: var(--white); }
#tag-table tbody tr.row-odd { background: var(--bg); }
#tag-table tbody tr:hover { background: var(--primary-light); }
#tag-table tbody tr.row-hidden { display: none; }

.cell-isom {
    padding: 10px 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    color: var(--primary-dark);
    white-space: nowrap;
    vertical-align: top;
}
.cell-name { padding: 10px 12px; color: var(--ink-muted); vertical-align: top; }
.cell-source { padding: 10px 12px; white-space: nowrap; vertical-align: top; }
.cell-code { padding: 10px 12px; vertical-align: top; }

/* Odznaky zdroje */
.src-osm { font-size: 10px; padding: 3px 6px; border-radius: 3px; background: #e0f2f1; color: #00796b; font-weight: 500; }
.src-zab { font-size: 10px; padding: 3px 6px; border-radius: 3px; background: #e8f5e9; color: #2e7d32; font-weight: 500; }
.src-dmp { font-size: 10px; padding: 3px 6px; border-radius: 3px; background: #fdf2e9; color: #d35400; font-weight: 500; }
.empty-state { color: #999; font-size: 11px; }
.src-or { font-size: 10px; color: #999; font-weight: bold; }

/* Pilulky kódu (OSM, ZABAGED) */
.tag-pill {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    border-radius: 3px;
    padding: 4px 8px;
    margin: 2px 2px 2px 0;
    line-height: 1.5;
    word-break: break-word;
    white-space: normal;
    max-width: 400px;
}
.tag-pill.osm { background: #f4f4f4; border: 1px solid var(--rule); color: var(--ink); }
.tag-pill.zab { background: #e8f5e9; border: 1px solid #c8e6c9; color: #2e7d32; }
.tag-pill.dmp { background: #fdf2e9; border: 1px solid #fae5d3; color: #d35400; }

/* ── MAP BUTTON ── */
.map-cta {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #787878;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: var(--rule);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}
.btn-primary svg { flex-shrink: 0; }

/* ── DOWNLOAD BOX ── */
.download-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.dl-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--rule);
    padding: 10px 18px;
    text-decoration: none;
    color: var(--ink);
    font-size: 0.88rem;
    border-radius: 4px;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.dl-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}
.dl-icon {
    width: 16px; height: 16px;
    opacity: 0.5;
}

/* ── FOOTER ── */
footer {
    background: var(--ink);
    color: rgba(255,255,255,0.45);
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}
footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
footer a:hover { color: #fff; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
header h1 { animation: fadeUp 0.7s ease both; }
header .header-meta { animation: fadeUp 0.7s 0.15s ease both; }

/* ── RESPONSIVE STYLES (MEDIA QUERIES) ── */

/* Tablety a menší desktopy */
@media (max-width: 768px) {
    #tag-table {
        font-size: 0.7rem;
    }
    .tag-pill {
        font-size: 10px;
        padding: 2px 4px;
    }
}

/* Telefony a menší tablety */
@media (max-width: 600px) {
    nav a {
        flex: 1 1 auto;
        padding: 10px 5px;
        font-size: 0.65rem;
        text-align: center;
    }

    header { 
        padding: 4rem 1.5rem 3rem; 
    }

    .header-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }

    .container { 
        padding: 1.5rem 1rem; 
    }

    .section-label {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3{
    font-size: 1.2rem;
}

    .abstract-block {
        padding: 1rem;
    }
    
    .map-cta {
        justify-content: center;
    }
}

/* Velmi úzké telefony */
@media (max-width: 480px) {
    .download-grid {
        flex-direction: column;
    }
    .dl-item {
        width: 100%;
        justify-content: center;
    }
}