:root {
    --blok-office-font-base: "Helvetica Neue", Arial, sans-serif;
    --blok-office-color-text: #0f172a;
    --blok-office-color-muted: #64748b;
    --blok-office-color-border: rgba(15, 23, 42, 0.12);
    --blok-office-color-card: #ffffff;
    --blok-office-color-shadow: rgba(15, 23, 42, 0.08);
    --blok-office-primary: #53b947;
    --blok-office-primary-dark: #3f9a39;
}

.blok-office-grid {
    box-sizing: border-box;
    max-width: 1170px;
    margin: 0 auto;
    padding-right: 1rem;
    padding-left: 1rem;
}

.blok-office-grid {
    font-family: var(--blok-propsync-font-base, var(--blok-office-font-base));
    color: var(--blok-office-color-text);
    display: block;
    width: 100%;
}

.blok-office-grid .blok-propsync-alert {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: rgba(225, 29, 72, 0.12);
    color: #c81e55;
    font-weight: 600;
    text-align: center;
}

.blok-office-map-container {
    width: 100%;
    margin-bottom: 2rem;
    overflow: hidden;
}

.blok-office-map {
    width: 100%;
    height: 500px;
    min-height: 400px;
}

/* Remove rounded corners from Leaflet popup */
.blok-office-map .leaflet-popup-content-wrapper {
    border-radius: 0 !important;
}

.blok-office-map .leaflet-popup-tip {
    display: none;
}

.blok-map-popup {
    font-family: var(--blok-office-font-base);
    padding: 0.5rem;
}

.blok-map-popup h4 {
    margin: 0 0 0.75rem 0;
    color: var(--blok-office-color-text);
    font-size: 1.1rem;
    font-weight: 700;
}

.blok-map-popup__address {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--blok-office-color-text);
}

.blok-map-popup__phone {
    display: inline-block;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #9baf1e !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.blok-map-popup__phone:hover,
.blok-map-popup__phone:focus {
    color: #9baf1e !important;
    opacity: 0.8;
    text-decoration: none;
}

.blok-map-popup__phone:visited {
    color: #9baf1e !important;
}

.blok-map-popup__group {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
}

.blok-map-popup__group strong {
    color: var(--blok-office-color-text);
}

.blok-map-popup__label {
    margin: 0.5rem 0 0.25rem 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--blok-office-color-text);
}

.blok-map-popup__value {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--blok-office-color-muted);
}

.blok-map-popup p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.blok-map-popup p strong {
    color: var(--blok-office-color-text);
}

.blok-office-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.office-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.office-group__heading {
    color: rgb(31, 36, 25);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.5;
    font-family: var(--font-1);
    text-align: left;
}

.blok-branch-details {
    border: 1px solid #ccc;
    padding: clamp(20px, 2vw, 40px);
}

.branch-details .row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.branch-details .col-12 {
    flex: 1 1 100%;
}

.branch-details .col-md-3 {
    max-width: 100%;
}

.blok-branch-details__title {
    color: #1f2419;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.5;
    font-family: var(--font-1);
    text-align: left;
    padding-bottom: .5rem !important;
}

.blok-branch-details__lead {
    margin: 0;
    text-align: left;
    color: #000000;
    font-size: clamp(1rem, 1vw, 1rem);
    line-height: 1.65;
    font-family: var(--font-2);
}

.branch-details__lead a {
    color: inherit;
    font-size: clamp(1rem, 1vw, 1rem);
    line-height: 1.65;
    font-family: var(--font-2);
    text-decoration: none;
    color: #9baf1e;
}

.branch-details__lead a:hover,
.branch-details__lead a:focus {
    color: var(--blok-office-primary);
}

.branch-details__label {
    color: #000000;
    font-size: clamp(1rem, 1vw, 1rem);
    line-height: 1.65;
    font-family: var(--font-2);
    font-weight: bolder;
    margin-bottom: 0.5rem !important;
    text-align: left;
}

.branch-details__text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--blok-office-color-text);
    text-align: left;
}

.branch-details__text--muted {
    color: var(--blok-office-color-muted);
    font-style: italic;
}

.button-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blok-copy-button {
    color: #000 !important;
    border: 2px solid var(--brand-color-1) !important;
    background: none !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 150px;
    font-size: 1.25rem !important;
    line-height: 1 !important;
    cursor: pointer;
    font-weight: 400;
    background-color: transparent !important;
    overflow: hidden;
    transition: color 0.3s ease;
    display: inline-flex;
    position: relative;
    padding: 16px 30px;
    z-index: 1;
}

.blok-copy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--brand-color-1);
    transition: height 0.4s ease-in-out;
    z-index: -1;
}

.blok-copy-button:hover,
.blok-copy-button:focus {
    color: #fff !important;
    border: 2px solid var(--brand-color-1) !important;
}

.blok-copy-button:hover::before,
.blok-copy-button:focus::before {
    height: 100%;
}

@media (min-width: 768px) {
    /* Desktop: 3-column layout */
    .blok-branch-details .row {
        display: flex;
        gap: 2rem;
        align-items: flex-start;
    }
    
    .blok-branch-details .office-name-column,
    .blok-branch-details .office-address-column,
    .blok-branch-details .button-stack {
        flex: 0 0 calc(33.333% - 1.35rem);
    }
    
    .branch-details .col-md-3 {
        flex: 0 0 calc(25% - 1.5rem);
        max-width: calc(25% - 1.5rem);
    }

    .branch-details__label {
        padding-top: 45px;
        margin-top: 0;
    }

    .mobile-address-section{
        display: none;
    }
}

@media (max-width: 767.98px) {
    .branch-details {
        padding: 1.5rem 1.25rem;
    }
    
    .blok-branch-details .row {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
    }
    
    /* Mobile: 2-column layout side by side */
    /* Left side - office name and address stacked vertically */
    .blok-branch-details .office-name-column {
        flex: 0 0 50%;
        padding-right: 0;
        padding-left: 0;
    
        display: flex;
        flex-direction: column;
    }
    
    .blok-branch-details .office-address-column {
        display: none; /* Hide on mobile, will show in office-name-column area */
    }
    
    /* Right side - buttons */
    .blok-branch-details .button-stack {
        flex: 0 0 38%;
    }

    .branch-details__label {
        padding-top: 0;
        margin-top: 0.5rem;
    }

    .button-stack {
        padding-top: 0;
    }
    
    .blok-copy-button {
        font-size: 0.8rem !important;
    }
    
    .blok-office-map {
        height: 350px;
        min-height: 300px;
    }

    #office-shortcode .featured-box {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .blok-copy-button {
        min-width: 120px;
        padding: 8px 15px;
    }

    .branch-details__text {
        font-size: 0.9rem;
    }

    .blok-branch-details__title {
        font-size: clamp(1.1rem, 2vw, 1.25rem);
    }

    .featured-box {
        padding: 3rem 0;
    }
}

/* Leaflet tile fix - only on larger screens (tablets and desktops) */
@media (min-width: 769px) {
    .leaflet-container img.leaflet-tile {
        mix-blend-mode: normal;
        width: 256px !important;
        height: 256px !important;
    }
}

/* Office Grid Social Media Links */
.blok-office-grid-socials {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
}

.blok-office-grid-socials li {
    list-style: none;
}

.blok-office-grid-socials a {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: var(--brand-color-1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}

.blok-office-grid-socials a:hover {
    background-color: var(--brand-color-4);
    color: var(--brand-color-2);
}

.blok-office-grid-socials svg {
    width: 14px;
    height: 14px;
}
