/**
 * Přehled hal (custom/block-prehled-hal) — frontend styly (SAMOSTATNÝ versovaný stylesheet, NE @import v additionalStyle.css).
 * Enqueue s filemtime v custom_blocks_enqueue_scripts() kvůli Cloudflare cache (docs/08 §F).
 */

/* ============================================================
   Přehled hal (custom/block-prehled-hal) — frontend
   ============================================================ */
.wp-block-custom-prehled-hal .hall-overview {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 28px;
    align-items: start;
    margin-top: 24px;
    width: 100%;
}

/* --- levý sloupec: accordion kategorií --- */
.wp-block-custom-prehled-hal .hall-overview__side {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
}

.wp-block-custom-prehled-hal .hall-cat + .hall-cat {
    border-top: 1px solid #ededed;
}

.wp-block-custom-prehled-hal .hall-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 15px 18px;
    background: none;
    border: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #1e1e1e;
    cursor: pointer;
    text-align: left;
}

.wp-block-custom-prehled-hal .hall-cat-chev {
    flex: none;
    display: inline-flex;
    color: #9a9a9a;
    transition: transform .25s, color .25s;
}

.wp-block-custom-prehled-hal .hall-cat-chev svg {
    width: 16px;
    height: 16px;
}

.wp-block-custom-prehled-hal .hall-cat.is-open .hall-cat-chev {
    transform: rotate(180deg);
    color: #d91920;
}

.wp-block-custom-prehled-hal .hall-cat-list {
    padding: 0 0 12px;
}

.wp-block-custom-prehled-hal .hall-cat-list.is-hidden {
    display: none;
}

.wp-block-custom-prehled-hal .hall-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 18px 8px 26px;
    background: none;
    border: 0;
    font-family: inherit;
    font-size: 15px;
    color: #5a5a5a;
    cursor: pointer;
    transition: color .12s;
}

.wp-block-custom-prehled-hal .hall-item:hover {
    color: #1e1e1e;
}

.wp-block-custom-prehled-hal .hall-item.is-selected {
    color: #d91920;
    font-weight: 700;
}

/* --- pravý blok: detail haly = grid (info | foto) --- */
.wp-block-custom-prehled-hal .hall-detail {
    display: grid;
    grid-template-columns: minmax(200px, 0.6fr) minmax(0, 1.9fr);
    column-gap: 44px;
    align-items: start;
}

/* všechno kromě fotky → levý (informační) sloupec; fotka → pravý sloupec */
.wp-block-custom-prehled-hal .hall-detail > :not(.hall-detail__photo) {
    grid-column: 1;
}

.wp-block-custom-prehled-hal .hall-detail.is-hidden {
    display: none;
}

.wp-block-custom-prehled-hal .hall-detail__title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: #1e1e1e;
    margin: 0;
}

.wp-block-custom-prehled-hal .hall-detail__subtitle {
    font-size: 15px;
    color: #7a7a7a;
    margin: 6px 0 0;
}

.wp-block-custom-prehled-hal .hall-detail__metrics {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 26px 0 0;
}

.wp-block-custom-prehled-hal .hall-metric {
    display: flex;
    flex-direction: column;
}

.wp-block-custom-prehled-hal .hall-metric__value {
    font-size: 30px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.05;
}

.wp-block-custom-prehled-hal .hall-metric__label {
    font-size: 14px;
    color: #8a8a8a;
    margin-top: 2px;
}

.wp-block-custom-prehled-hal .hall-detail__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0 0;
}

.wp-block-custom-prehled-hal .hall-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 13px 22px;
    border: 1px solid #d91920;
    border-radius: 4px;
    background: #fff;
    color: #d91920;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.wp-block-custom-prehled-hal .hall-btn:hover {
    background: #d91920;
    color: #fff;
}

.wp-block-custom-prehled-hal .hall-btn__arrow {
    display: inline-flex;
}

.wp-block-custom-prehled-hal .hall-btn__arrow svg {
    width: 16px;
    height: 16px;
}

.wp-block-custom-prehled-hal .hall-detail__doc {
    margin: 24px 0 0;
    padding: 0;
    max-width: none;
}

.wp-block-custom-prehled-hal .hall-detail__doc .document-list-item {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

.wp-block-custom-prehled-hal .hall-detail__doc .document-detail-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wp-block-custom-prehled-hal .hall-detail__doc .document-title {
    white-space: nowrap;
}

/* „Stáhnout" se ukáže až při najetí myší na dokument */
.wp-block-custom-prehled-hal .hall-detail__doc .download-button {
    opacity: 0;
    transition: opacity .15s;
}

.wp-block-custom-prehled-hal .hall-detail__doc:hover .download-button,
.wp-block-custom-prehled-hal .hall-detail__doc:focus-within .download-button {
    opacity: 1;
}

.wp-block-custom-prehled-hal .hall-detail__photo {
    grid-column: 2;
    grid-row: 1 / span 100;
    align-self: start;
    margin: 0;
}

.wp-block-custom-prehled-hal .hall-detail__photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

@media screen and (max-width: 991px) {
    .wp-block-custom-prehled-hal .hall-overview {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wp-block-custom-prehled-hal .hall-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .wp-block-custom-prehled-hal .hall-detail__photo {
        grid-column: 1;
        grid-row: auto;
        order: -1;
        margin: 0;
    }
}

@media screen and (max-width: 600px) {
    .wp-block-custom-prehled-hal .hall-detail__title {
        font-size: 24px;
    }

    .wp-block-custom-prehled-hal .hall-metric__value {
        font-size: 24px;
    }

    .wp-block-custom-prehled-hal .hall-detail__metrics {
        gap: 18px 28px;
    }

    .wp-block-custom-prehled-hal .hall-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}
