:focus-visible {
    outline: 2px solid #e3f036 !important;
    outline-offset: 2px !important;
}

nav.ct-nabidka-2 {
    border-top: 1px solid var(--theme-border-color, #e0e0e0);
    margin-top: 1em;
    padding-top: 0.5em;
}

nav #menu-sekundarni-menu-1 {
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
}

nav #menu-sekundarni-menu-1 .menu-item a {
    color: var(--theme-text-color);
}

nav #menu-sekundarni-menu-1 .menu-item a:hover {
    color: var(--theme-link-hover-color);
}

.single-obor .ct-container-full {
    margin-top: -100px;
    z-index: 10;
    position: relative;
}

.single-obor .ct-media-container img {
    max-width: 1600px;
    margin: 0 auto;
}

/* === Obor Kuchař Čísník === */
.single-obor.postid-25 .hero-section[data-type=type-2]>figure .ct-media-container img {
    object-position: 0% 97%;
}

/* === Obor Ošetřovatel === */
.single-obor.postid-27 .hero-section[data-type=type-2]>figure .ct-media-container img {
    object-position: 0% 25%;
}

/* === wp-block-file (Soubor) === */
.wp-block-file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0 24px;
    border-bottom: 1px solid #e2ecf7;
    font-family: 'Figtree', system-ui, sans-serif;
}

/* PDF náhled (pokud povolen) — vlastní řádek nad title+tlačítko */
.wp-block-file__embed {
    order: -1;
    flex-basis: 100%;
    width: 100%;
}

/* Levá část: ikona + text stack */
.wp-block-file__left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.wp-block-file__embed~.wp-block-file__left {
    margin-top: 8px;
}

/* Ikona — prázdná výchozí, doplní typ-selektory níže */
.wp-block-file__left::before {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Ikony dle třídy přidané PHP filterem */
.wp-block-file--pdf .wp-block-file__left::before {
    background-image: url('../img/pdf.svg');
}

.wp-block-file--doc .wp-block-file__left::before {
    background-image: url('../img/doc.svg');
}

.wp-block-file--xls .wp-block-file__left::before {
    background-image: url('../img/xls.svg');
}

.wp-block-file--ppt .wp-block-file__left::before {
    background-image: url('../img/ppt.svg');
}

/* Textový sloupec */
.wp-block-file__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Název souboru */
.wp-block-file__text>a {
    color: #000;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Podtitulek (PDF, 0.4 MB) — #666 = 5.74:1, WCAG AA */
.wp-block-file__meta {
    color: #666;
    font-size: 12px;
    line-height: 24px;
}

/* Tlačítko Stáhnout (vpravo) */
.wp-block-file .wp-block-file__button,
.wp-block-file .wp-block-file__button:visited {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border: 1px solid #41547b;
    border-radius: 4px;
    background: transparent;
    color: #41547b;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color .15s, color .15s;
}

.wp-block-file .wp-block-file__button:hover {
    background: #41547b;
    color: #fff;
}

/* Download ikona v tlačítku */
.wp-block-file .wp-block-file__button::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-color: #41547b;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color .15s;
}

.wp-block-file .wp-block-file__button:hover::after {
    background-color: #fff;
}


.sub-menu {
    border-bottom: 2px solid var(--theme-palette-color-1);
}

/* === Kontakty === */

.kontakty-wrap {
    font-family: 'Figtree', system-ui, sans-serif;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 60%, var(--theme-palette-color-7));
}

.kontakty-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.55;
}

/* First column wider for name + position */
.kontakty-table td:first-child,
.kontakty-table th:first-child {
    width: 50%;
}

.kontakty-table thead th {
    padding: 12px 20px;
    background: var(--theme-palette-color-7);
    color: var(--theme-palette-color-3);
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 60%, var(--theme-palette-color-7));
}

.kontakty-table tbody tr {
    border-bottom: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 40%, var(--theme-palette-color-7));
    transition: background-color .1s;
}

.kontakty-table tbody tr:last-child {
    border-bottom: none;
}

.kontakty-table tbody tr:hover {
    background: var(--theme-palette-color-7);
}

.kontakty-table td {
    padding: 13px 20px;
    vertical-align: middle;
    color: var(--theme-palette-color-4);
}

.kontakty-table td strong {
    font-weight: 600;
    display: block;
    color: var(--theme-palette-color-4);
}

.kontakty-pozice {
    color: var(--theme-palette-color-3);
    font-size: 12px;
    margin-top: 1px;
    line-height: 1.4;
}

.kontakty-meta {
    color: var(--theme-palette-color-3);
    font-size: 12px;
}

/* Phone numbers stacked as block links */
.kontakty-tel-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kontakty-tel-list a {
    display: block;
}

.kontakty-table a {
    color: var(--theme-palette-color-1);
    transition: color .15s;
    text-decoration: underline;
}

.kontakty-table a:hover {
    color: var(--theme-palette-color-2);
}

@media (max-width: 640px) {
    .kontakty-table thead {
        display: none;
    }

    .kontakty-table tbody tr {
        display: block;
        border-bottom: none;
        border-top: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 40%, var(--theme-palette-color-7));
        padding: 0;
    }

    .kontakty-table tbody tr:first-child {
        border-top: none;
    }

    .kontakty-table td {
        display: block;
        padding: 7px 16px;
        border-bottom: none;
        width: 100% !important;
    }

    .kontakty-table td:first-child {
        padding-top: 16px;
        padding-bottom: 6px;
    }

    .kontakty-table td:last-child {
        padding-bottom: 12px;
        padding-top: 12px;
    }

    .kontakty-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 10px;
        font-weight: 700;
        color: var(--theme-palette-color-4);
        text-transform: uppercase;
        letter-spacing: 0.6px;
        margin-bottom: 2px;
    }

    .kontakty-table td:first-child::before {
        display: none;
    }

    .kontakty-name-link {
        font-size: 15px;
        font-weight: 600;
        text-decoration: none !important;
        color: var(--theme-palette-color-1);
    }
}

/* === Kontakt name link in table === */

.kontakty-name-link {
    color: inherit;
    text-decoration: none;
}

.kontakty-name-link:hover {
    color: var(--theme-palette-color-1);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* === Kontakt detail === */

.kontakt-detail-back {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 14px;
    color: var(--theme-palette-color-1);
    text-decoration: none;
    font-family: 'Figtree', system-ui, sans-serif;
}

.kontakt-detail-back:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kontakt-detail-card {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    font-family: 'Figtree', system-ui, sans-serif;
    background: var(--theme-palette-color-6);
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 60%, var(--theme-palette-color-7));
    border-radius: 10px;
    padding: 2rem;
    max-width: 760px;
}

.kontakt-detail-photo {
    flex-shrink: 0;
}

.kontakt-detail-img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.kontakt-detail-body {
    flex: 1;
    min-width: 0;
}

.kontakt-detail-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--theme-palette-color-4);
    margin: 0 0 .35rem;
    line-height: 1.25;
}

.kontakt-detail-pozice {
    font-size: 15px;
    color: var(--theme-palette-color-3);
    margin: 0 0 .75rem;
}

.kontakt-detail-oddeleni {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1.25rem;
}

.kontakt-detail-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-palette-color-1);
    background: color-mix(in srgb, var(--theme-palette-color-1) 12%, var(--theme-palette-color-7));
    border-radius: 4px;
    padding: 2px 8px;
    letter-spacing: 0.2px;
}

.kontakt-detail-info {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.kontakt-detail-row {
    display: flex;
    gap: 1rem;
    font-size: 15px;
    align-items: baseline;
}

.kontakt-detail-row dt {
    min-width: 110px;
    font-weight: 600;
    color: var(--theme-palette-color-3);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.kontakt-detail-row dd {
    margin: 0;
    color: var(--theme-palette-color-4);
}

.kontakt-detail-row a {
    color: var(--theme-palette-color-1);
    text-decoration: none;
}

.kontakt-detail-row a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 600px) {
    .kontakt-detail-card {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .kontakt-detail-img {
        width: 100px;
        height: 100px;
    }

    .kontakt-detail-row {
        flex-direction: column;
        gap: .15rem;
    }

    .kontakt-detail-row dt {
        min-width: unset;
    }
}

/* === Napsali o nás (reference) === */

.reference-list {
    font-family: 'Figtree', system-ui, sans-serif;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 48px;
}

@media (max-width: 768px) {
    .reference-list {
        grid-template-columns: 1fr;
    }
}

.reference-card {
    border-bottom: 1px solid #e2ecf7;
}


.reference-card__link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 0;
    text-decoration: none;
    transition: color .15s;
}

.reference-card:not(:has(.reference-card__link)) {
    padding: 18px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reference-card__link:hover .reference-card__title {
    color: #4162ae;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.reference-card__meta {
    margin: 0;
    color: #5a6080;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.65;
    letter-spacing: 0.2px;
}

.reference-card__title {
    margin: 0;
    color: #1c2040;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    transition: color .15s;
}

/* External link indicator */
.reference-card__link .reference-card__title::after {
    content: '';
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    margin-bottom: 2px;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background-color: #d0d4e8;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7zm-1 14H5V5h6V3H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6h-2v6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7zm-1 14H5V5h6V3H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6h-2v6z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color .15s;
}

.reference-card__link:hover .reference-card__title::after {
    background-color: #4162ae;
}

.wp-block-icon svg.has-background {
    padding: 4px !important;
}

@media(min-width: 1024px) {
    button.ct-header-search {
        border-left: 1px solid #d0d4e8 !important;
        padding-left: 16px !important;
    }
}

@media (min-width: 1000px) {

    .home [data-layout=enhanced-grid]>*:nth-child(1),
    .home [data-layout=enhanced-grid]>*:nth-child(2) {
        grid-column: span 3 !important;
    }

    .home [data-layout=enhanced-grid]>*:nth-child(n+3) {
        grid-column: span 2 !important;
    }
}

/* === Global table styles (wp-block-table, entry-content) === */

table,
th,
td {
    border: 0 !important;
}

.wp-block-table:not(.kontakty-wrap),
.entry-content:not(.kontakty-wrap) .wp-block-table {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 60%, var(--theme-palette-color-7));
    margin-block: 1.75rem;
}

.wp-block-table:not(.kontakty-wrap) table,
.entry-content table:not(.kontakty-table) {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.55;
}

.wp-block-table:not(.kontakty-wrap) table thead th,
.entry-content table:not(.kontakty-table) thead th {
    padding: 12px 20px;
    background: var(--theme-palette-color-7);
    color: var(--theme-palette-color-3);
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 60%, var(--theme-palette-color-7));
}

.wp-block-table:not(.kontakty-wrap) table tbody tr,
.entry-content table:not(.kontakty-table) tbody tr {
    border-bottom: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 40%, var(--theme-palette-color-7));
    transition: background-color .1s;
}

.wp-block-table:not(.kontakty-wrap) table tbody tr:last-child,
.entry-content table:not(.kontakty-table) tbody tr:last-child {
    border-bottom: none;
}

.wp-block-table:not(.kontakty-wrap) table tbody tr:hover,
.entry-content table:not(.kontakty-table) tbody tr:hover {
    background: var(--theme-palette-color-7);
}

.wp-block-table:not(.kontakty-wrap) table td,
.wp-block-table:not(.kontakty-wrap) table th,
.entry-content table:not(.kontakty-table) td,
.entry-content table:not(.kontakty-table) th {
    padding: 12px 20px;
    vertical-align: middle;
    color: var(--theme-palette-color-4);
}

.wp-block-table:not(.kontakty-wrap) table td strong,
.entry-content table:not(.kontakty-table) td strong {
    font-weight: 600;
}



@media (max-width: 640px) {

    .wp-block-table:not(.kontakty-wrap) table thead,
    .entry-content table:not(.kontakty-table) thead {
        display: none;
    }

    .wp-block-table:not(.kontakty-wrap) table tbody tr,
    .entry-content table:not(.kontakty-table) tbody tr {
        display: block;
        border-bottom: none;
        border-top: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 40%, var(--theme-palette-color-7));
    }

    .wp-block-table:not(.kontakty-wrap) table tbody tr:first-child,
    .entry-content table:not(.kontakty-table) tbody tr:first-child {
        border-top: none;
    }

    .wp-block-table:not(.kontakty-wrap) table td,
    .entry-content table:not(.kontakty-table) td {
        display: block;
        padding: 7px 16px;
        width: 100% !important;
        border-bottom: none;
    }

    .wp-block-table:not(.kontakty-wrap) table tr td:first-child,
    .entry-content table:not(.kontakty-table) tr td:first-child {
        padding-top: 12px;
    }

    .wp-block-table:not(.kontakty-wrap) table tr td:last-child,
    .entry-content table:not(.kontakty-table) tr td:last-child {
        padding-bottom: 12px;
    }
}