/* Specifické rozšíření stylů pro stránku Pobočky. */

.branches-hero {
    min-height: 20rem;
}

#nase-pobocky {
    scroll-margin-top: 5rem;
}

#rychly-kontakt {
    scroll-margin-top: 5rem;
}

.branch-selector-button {
    position: relative;
}

.branch-selector-button.hidden {
    display: none !important;
}

.branch-selector-button.is-active {
    border-color: rgba(179, 32, 37, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 244, 238, 0.97));
    box-shadow: 0 16px 34px rgba(21, 27, 35, 0.08);
}

.branch-selector-button.is-active .text-brand-900 {
    color: #b32025;
}

@media (min-width: 1024px) {
    .branches-main-grid {
        --branch-left-card-height: auto;
    }

    .branch-list-card {
        align-self: start;
    }

    #mapa-panel {
        display: flex;
        align-self: start;
        height: var(--branch-left-card-height);
        min-height: var(--branch-left-card-height);
    }

    .branch-map-panel {
        display: flex;
        flex-direction: column;
        gap: 0.9rem;
        width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .branch-interactive-map {
        position: static;
        width: 100% !important;
        height: auto !important;
        flex: 0 0 calc(70% - 0.45rem);
        min-height: 0;
        max-height: none !important;
    }

    .branch-location-image {
        flex: 1 1 calc(30% - 0.45rem);
        min-height: 0;
        height: auto;
    }

    .branch-detail-panel {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: var(--branch-left-card-height);
    }

    .branch-detail-panel > .branch-detail-actions {
        margin-top: auto !important;
        padding-top: 0;
    }
}

.branch-map-panel.hidden,
.branch-detail-panel.hidden {
    display: none !important;
}

.branch-map-panel {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.branch-map-surface::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(247, 245, 241, 0.55) 0%, rgba(247, 245, 241, 0) 38%),
        radial-gradient(circle at 20% 28%, rgba(179, 32, 37, 0.09), transparent 16%),
        radial-gradient(circle at 68% 64%, rgba(21, 27, 35, 0.08), transparent 18%),
        radial-gradient(circle at 82% 22%, rgba(169, 129, 87, 0.12), transparent 14%);
    pointer-events: none;
}

.branch-interactive-map {
    display: block;
    width: 100%;
    height: 22rem;
    max-height: none;
    border: 0;
    overflow: hidden;
    border-radius: 0.8rem;
    background: #ece8df;
}

.branch-location-image {
    display: block;
    width: 100%;
    height: 11rem;
    border-radius: 0.8rem;
    object-fit: cover;
    object-position: center;
}

.branch-map-pin::before,
.branch-map-pin::after {
    content: "";
    position: absolute;
    inset: 50%;
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.branch-map-pin::before {
    width: 2.2rem;
    height: 2.2rem;
    background: rgba(179, 32, 37, 0.12);
}

.branch-map-pin::after {
    width: 0.75rem;
    height: 0.75rem;
    background: #ffffff;
}

.branch-map-pin--secondary::before {
    width: 1.7rem;
    height: 1.7rem;
    background: rgba(21, 27, 35, 0.08);
}

.branch-map-pin--secondary::after {
    width: 0.55rem;
    height: 0.55rem;
    background: #ffffff;
}

.branch-detail-actions {
    padding-top: 0.125rem;
}

.branch-detail-tag {
    display: inline-flex;
    min-height: 1.9rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    background: #b32025;
    padding: 0.45rem 0.85rem;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: none;
    transition: background 0.25s ease, transform 0.25s ease;
}

.branch-detail-tag:hover,
.branch-detail-tag:focus-visible {
    background: #97191d;
    box-shadow: none;
    transform: translateY(-1px);
}

.branch-detail-tag--static {
    cursor: default;
}

.branch-detail-tag--static:hover,
.branch-detail-tag--static:focus-visible {
    background: #b32025;
    transform: none;
}

.branch-detail-tag--brand {
    background: #151b23;
    cursor: default;
}

.branch-detail-tag--brand:hover,
.branch-detail-tag--brand:focus-visible {
    background: #151b23;
    transform: none;
}

.branch-contact-tabs {
    overflow: hidden;
}

.branch-contact-tabs-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid rgba(203, 213, 225, 0.82);
    background: rgba(255, 255, 255, 0.68);
}

.branch-contact-tab-button {
    min-height: 1.95rem;
    border: 0;
    border-right: 1px solid rgba(203, 213, 225, 0.82);
    background: rgba(248, 250, 252, 0.92);
    color: #151b23;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.25s ease, color 0.25s ease;
}

.branch-contact-tab-button:last-child {
    border-right: 0;
}

.branch-contact-tab-button.is-active {
    background: #b32025;
    color: #ffffff;
}

.branch-contact-tab-button:not(.is-active):hover,
.branch-contact-tab-button:not(.is-active):focus-visible {
    background: #b32025;
    color: #ffffff;
    outline: none;
}

.branch-contact-tab-panel {
    padding: 1rem;
}

.branch-contact-value {
    word-break: normal;
    overflow-wrap: anywhere;
}

@media (min-width: 1180px) {
    .branch-contact-value {
        white-space: nowrap;
        font-size: 0.92rem;
        line-height: 1.55;
    }
}

.branch-opening-hours {
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.72);
}

.branch-opening-hours:first-child {
    margin-top: 0;
}

.branch-opening-hours summary {
    display: flex;
    min-height: 2.3rem;
    cursor: pointer;
    list-style: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.95rem;
    color: #151b23;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.25s ease, color 0.25s ease;
}

.branch-opening-hours summary::-webkit-details-marker {
    display: none;
}

.branch-opening-hours summary::after {
    content: "";
    width: 0.48rem;
    height: 0.48rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.25s ease;
}

.branch-opening-hours[open] summary {
    border-bottom: 1px solid rgba(203, 213, 225, 0.82);
    background: #ffffff;
    color: #b32025;
}

.branch-opening-hours[open] summary::after {
    transform: rotate(225deg) translate(-2px, -1px);
}

.branch-opening-hours-body {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem 0.95rem 0.95rem;
}

.branch-opening-hours-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.35;
}

.branch-opening-hours-row strong {
    color: #151b23;
    font-weight: 800;
    text-align: right;
}

.branch-opening-hours-note {
    margin-top: 0.35rem;
    border-top: 1px solid rgba(203, 213, 225, 0.68);
    padding-top: 0.75rem;
    color: #b32025;
    font-size: 0.8rem;
    font-weight: 800;
}

.branch-call-actions {
    display: grid;
    gap: 0.75rem;
}

.branch-detail-actions > .branch-call-actions {
    margin-top: 0 !important;
}

.branch-call-actions.hidden {
    display: none !important;
}

.branch-cta-disabled {
    border: 1px solid rgba(203, 213, 225, 0.92);
    background: rgba(248, 250, 252, 0.88);
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.branch-form-alert {
    margin-bottom: 1rem;
    border: 1px solid rgba(179, 32, 37, 0.24);
    border-radius: 0.7rem;
    background: rgba(179, 32, 37, 0.06);
    padding: 0.85rem 1rem;
    color: #97191d;
    font-size: 0.88rem;
    font-weight: 700;
}

.branch-form-feedback {
    margin-top: 1.5rem;
    border: 1px solid;
    border-radius: 0.7rem;
    padding: 0.9rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
}

.branch-form-feedback ul {
    margin-top: 0.55rem;
    padding-left: 1.2rem;
    font-weight: 500;
    list-style: disc;
}

.branch-form-feedback--success {
    border-color: rgba(22, 101, 52, 0.24);
    background: rgba(22, 101, 52, 0.07);
    color: #166534;
}

.branch-form-feedback--error {
    border-color: rgba(179, 32, 37, 0.24);
    background: rgba(179, 32, 37, 0.06);
    color: #97191d;
}

.branch-form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.branch-form-error {
    margin-top: 0.45rem;
    color: #b32025;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.45;
}

.branch-form-field input:not([type="checkbox"]):focus,
.branch-form-field select:focus,
.branch-form-field textarea:focus,
#branch-contact-form input:not([type="checkbox"]):focus,
#branch-contact-form select:focus,
#branch-contact-form textarea:focus {
    border-color: #b32025;
    box-shadow: 0 0 0 3px rgba(179, 32, 37, 0.1);
}

.branch-form-field select option:checked,
#branch-contact-form select option:checked {
    background: rgba(179, 32, 37, 0.1);
    color: #b32025;
}

.branch-form-field.is-invalid input:not([type="checkbox"]),
.branch-form-field.is-invalid select,
.branch-form-field.is-invalid textarea {
    border-color: rgba(179, 32, 37, 0.72);
    background: rgba(179, 32, 37, 0.025);
    box-shadow: 0 0 0 3px rgba(179, 32, 37, 0.08);
}

.branch-form-field.is-invalid input[type="checkbox"] {
    outline: 2px solid rgba(179, 32, 37, 0.36);
    outline-offset: 2px;
}

@media (max-width: 1023px) {
    .branches-hero {
        min-height: 17rem;
    }
}

@media (max-width: 767px) {
    .branch-interactive-map {
        height: 18rem;
        max-height: none;
    }

    .branch-location-image {
        height: 10rem;
    }
}
