/* ========================================
   Vzdělávací program - Intenzivní péče
   Stylesheet
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f5f7fa;
    margin: 0;
    padding: 20px;
}

/* --- Page container --- */
body > * {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Typography --- */
h1 {
    font-size: 1.6rem;
    color: #1a3a5c;
    margin: 0.3em auto;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.02em;
}

h1 + h1 {
    margin-top: 0;
    color: #2980b9;
    font-size: 1.5rem;
}

h2 {
    font-size: 1.35rem;
    color: #1a3a5c;
    border-bottom: 3px solid #2980b9;
    padding-bottom: 0.4em;
    margin-top: 2em;
    margin-bottom: 0.8em;
}

h2[style*="text-align: center"] {
    border-bottom: none;
    color: #7f8c8d;
    font-size: 1.1rem;
    font-weight: 400;
    margin-top: 0.5em;
}

h3 {
    font-size: 1.15rem;
    color: #2c3e50;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    padding-left: 0.5em;
    border-left: 4px solid #2980b9;
}

h4 {
    font-size: 1rem;
    color: #555;
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}
/*
p {
    margin: 0.5em 0;
}*/

/* --- Horizontal rule --- */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, #2980b9, #e0e0e0);
    margin: 2.5em auto;
    max-width: 1100px;
}

/* --- Tables --- */
table {
    width: 100%;
    max-width: 1100px;
    margin: 1em auto;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.92rem;
    border: none !important;
}

thead {
    background: #f9f3d0 !important;
}

thead th {
    background: #f9f3d0;
    color: #2c3e50;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    border: 1px solid #e0d9a8;
    font-size: 0.93rem;
}

tbody td,
tbody th {
    padding: 8px 12px;
    border: 1px solid #e8e8e8;
    vertical-align: top;
}

tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

tbody th {
    background: #f9f3d0 !important;
    font-weight: 600;
    color: #2c3e50;
    text-align: left;
}

tfoot th {
    background: #eef2f7;
    color: #1a3a5c;
    font-weight: 700;
    padding: 10px 12px;
    border: 1px solid #d0d8e0;
    text-align: center;
}

tfoot tr:last-child th {
    background: #dce6f0;
    font-size: 1rem;
}

/* --- Table caption --- */
caption {
    caption-side: bottom;
    font-size: 0.85rem;
    color: #7f8c8d;
    padding: 10px 12px;
    text-align: left;
    font-style: italic;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-top: none;
    border-radius: 0 0 6px 6px;
}

/* --- Lists --- */
ul {
    padding-left: 1.5em;
    /*margin: 0.5em 0;*/
}

li {
    margin-bottom: 0.35em;
    line-height: 1.5;
}

li::marker {
    color: #2980b9;
}

/* --- Hide empty yellow separator rows in practice tables --- */
tbody tr:has(> td[style*="FFFFC5"] > strong:empty) {
    display: none;
}

/* --- Bold text in tables --- */
td strong {
    color: #1a3a5c;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    table {
        font-size: 0.82rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    thead th,
    tbody td,
    tbody th {
        padding: 6px 8px;
    }
}

/* --- Print styles --- */
@media print {
    body {
        background: #fff;
        padding: 0;
        color: #000;
        font-size: 10pt;
    }

    table {
        box-shadow: none;
        page-break-inside: avoid;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    hr {
        background: #000;
        height: 1px;
    }
}
