/**
 * Branch Single Template Styles
 *
 * Minimal CSS for branch single page layout.
 */

.branch-single {
    padding: 0;
    max-width: none;
    /* Allow full width sections */
}

.branch-container {
    max-width: var(--global-content-width);
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* -------------------------------------------------------------------------
   Hero Section
   ------------------------------------------------------------------------- */
.branch-section-hero {
    background-color: #fff;
}

/* Breadcrumbs */
.branch-breadcrumbs {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    /* Reduced from 2rem */
    color: var(--global-palette5, #666);
}

.branch-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.branch-breadcrumbs a:hover {
    text-decoration: underline;
}

.branch-breadcrumbs .separator {
    margin: 0 0.5em;
}

.branch-breadcrumbs .current {
    color: var(--global-palette4, #333);
    font-weight: 600;
}

/* Hero Grid */
.branch-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Title */
.branch-title {
    font-size: 3rem;
    margin: 0 0 1rem;
    /* Reduced from 1.5rem */
    line-height: 1.1;
    font-weight: 800;
    /* Bolder */
    color: #000;
}

/* Description */
.branch-description {
    margin-bottom: 3rem;
    /* More space */
    line-height: 1.6;
    color: var(--global-palette4, #333);
    font-size: 1.1rem;
}

/* Buttons */
.branch-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    /* More gap */
    margin-bottom: 4rem;
    /* Significant gap to address */
}

.branch-buttons .kb-button {
    border-radius: 50px;
    /* Pill shape */
    padding-left: 2rem;
    padding-right: 2rem;
}

.branch-buttons .kt-btn-arrow {
    margin-left: 0.5em;
}

/* Info Row (Address & Hours) */
.branch-info-row {
    display: flex;
    gap: 6rem;
    /* Wide gap */
}

.branch-info-block {
    font-size: 1.25rem;
    /* Larger font */
    line-height: 1.4;
    color: #000;
}

.branch-info-label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #000;
    font-size: 1.1rem;
}

/* Hours superscript */
.branch-hours sup {
    font-size: 0.65em;
    vertical-align: super;
}

/* Featured Image */
.branch-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}


/* -------------------------------------------------------------------------
   Details Section (Grey)
   ------------------------------------------------------------------------- */
.branch-section-details {
    background-color: var(--global-palette9, #f7f7f7);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.branch-detail-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #000;
    font-size: 1rem;
}

.branch-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.branch-link:hover {
    color: var(--global-palette1);
}

/* Top Rows: Email & Phones */
.branch-details-top-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Match bottom grid for alignment */
    gap: 4rem;
    margin-bottom: 3rem;
}

.branch-phone-item {
    margin-bottom: 0.25rem;
}

/* Divider */
.branch-divider {
    border: 0;
    border-top: 1px solid #000;
    margin: 0 0 3rem 0;
    opacity: 1;
}

/* Bottom Grid: Director & Specialists */
.branch-details-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* 1/3 for director, 2/3 for specialists */
    gap: 4rem;
}

.branch-director-section {
    /* Director specific styles if needed */
}

.branch-specialists-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Person Card */
.branch-person-card {
    margin-bottom: 1.5rem;
}

.branch-person-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #333;
}

.branch-person-phone,
.branch-person-email {
    display: block;
    margin-bottom: 0.25rem;
    color: #555;
}

/* -------------------------------------------------------------------------
   Map Section
   ------------------------------------------------------------------------- */
.branch-section-map {
    background-color: #fff;
    /* Padding handled by container */
}

.branch-section-map .branch-container {
    padding-top: 0;
    /* Minimized spacing from previous section */
}

.branch-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.branch-map-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.branch-map-wrapper {
    width: 100%;
    background: #f0f0f0;
    /* Maintain aspect ratio or fixed height if needed, but iframes usually have their own dimensions */
    border-radius: 4px;
    /* Optional rounded corners */
    overflow: hidden;
}

.branch-google-map-embed iframe {
    width: 100%;
    display: block;
    min-height: 400px;
    /* Ensure a minimum height */
    border: 0;
}

.branch-osm-map {
    min-height: 400px;
}

/* Ensure Meta Box map canvas fills container */
.rwmb-map-field {
    height: 400px;
    /* Fallback */
}


/* -------------------------------------------------------------------------
   Mobile Responsiveness
   ------------------------------------------------------------------------- */
/* Mobile Contacts (Hidden Desktop) */
.branch-mobile-contacts {
    display: none;
}

@media (max-width: 991px) {
    .branch-hero-grid {
        gap: 2rem;
    }

    .branch-details-bottom-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

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

    /* Reordering Hero Content */
    .branch-hero-content {
        display: flex;
        flex-direction: column;
    }

    .branch-title {
        font-size: 2rem;
        order: 1;
    }

    .branch-info-row {
        flex-direction: column;
        gap: 1.5rem;
        order: 2;
        margin-bottom: 2rem;
    }

    .branch-mobile-contacts {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        order: 3;
        margin-bottom: 2rem;
    }

    .branch-buttons {
        order: 4;
        margin-bottom: 2rem;
    }

    .branch-description {
        order: 5;
    }

    .branch-hero-image {
        order: 0;
        /* Fall to bottom */
        margin-bottom: 0;
    }

    /* Details Grid adjustments */
    .branch-details-top-grid {
        display: none;
        /* Hide desktop email/phones */
    }

    .branch-specialists-grid {
        grid-template-columns: 1fr;
        /* 1 column for specialists on mobile */
    }

    .branch-map-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}