/*=============== BRANCHES SECTION ===============*/
.branches__container {
    padding-top: 2rem;
    row-gap: 3rem;
}

.branches__content {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    display: grid;
}

.branch__card {
    background-color: var(--container-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px hsla(228, 66%, 45%, .08);
    transition: .4s;
    border: 1px solid rgba(239, 193, 169, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.branch__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px hsla(228, 66%, 45%, .12);
    border-color: var(--first-color);
}

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

.branch__title {
    font-size: var(--h3-font-size);
    color: var(--title-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.branch__title i {
    color: var(--first-color);
    font-size: 1.25rem;
}

.branch__details {
    font-size: var(--small-font-size);
    color: var(--text-color);
    line-height: 1.6;
}

.branch__map {
    width: 100%;
    height: 350px;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.branch__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Location Selector Styles */
.location-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.location-btn {
    padding: 0.5rem 1rem !important;
    font-size: var(--smaller-font-size) !important;
    background: #e4ded778 !important;
    color: var(--text-color) !important;
    border: 1px solid rgba(239, 193, 169, 0.3) !important;
    border-radius: 0.5rem !important;
    cursor: pointer;
    transition: 0.3s;
}

.location-btn.active {
    background: var(--first-color) !important;
    color: #fff !important;
    border-color: var(--first-color) !important;
    box-shadow: 0 4px 12px rgba(239, 193, 169, 0.4);
}

.location-btn:hover:not(.active) {
    background: rgba(239, 193, 169, 0.1) !important;
    border-color: var(--first-color) !important;
}

.branch-map-frame {
    display: none;
    transition: opacity 0.3s ease;
}

.branch-map-frame.active {
    display: block;
}

/* Dark Theme Adjustments */
body.dark-theme .branch__card {
    background-color: #1a1c1e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(239, 193, 169, 0.1);
}

body.dark-theme .branch__title {
    color: var(--title-color);
}

body.dark-theme .branch__details {
    color: var(--text-color-light);
}

body.dark-theme .branch__map {
    border-color: var(--border-color);
}

/* Dark mode map filter - Removed to keep maps white as requested */
body.dark-theme .branch__map iframe {
    /* filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%); */
}

body.dark-theme .location-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-color) !important;
    border-color: rgba(239, 193, 169, 0.2) !important;
}

body.dark-theme .location-btn.active {
    background: var(--first-color) !important;
    color: #000 !important;
}

/* RTL Support */
body.rtl .branch__title {
    flex-direction: row;
}

@media screen and (max-width: 767px) {
    .branches__content {
        grid-template-columns: 1fr;
    }
}
