.local-branch {
    background-color: #161616;
}

.local-branch .container {
    padding: 72px 0;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ================= TAB ================= */

.location-name {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.location-name-branch {
    cursor: pointer;
    color: #BDBDBD;
    font-size: 16px;
    line-height: 150%;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
}

.location-name-branch.active,
.location-name-branch:hover {
    background-color: #EE1C23;
    color: #FFFFFF;
}

/* Ẩn hiện nội dung chi nhánh */
.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

/* ================= CARD ================= */

.location-name-follow {
    display: none; 
}

.location-name-follow.active {
    display: flex;   
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
}

.location-name-follow-card {
    flex: 0 0 calc((100% - 48px) / 3);
    border: 1px solid #212121;
    background-color: #141414;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: all 0.3s ease;
    justify-content: space-between;
}

.location-name-follow-card:hover {
    transform: translateY(-1px);
}

.location-name-follow-card img {
    width: 100%;
    height: auto;
    min-height: 256px;
    object-fit: cover;
}

.location-name-follow-card .namebranch {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 18px;
    line-height: 146%;
    letter-spacing: 1%;
}

.infobranch-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.infobranch-item span {
    display: flex;
    flex-wrap: nowrap;
    color: #E0E0E0;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    gap: 8px;
    letter-spacing: 1%;
}

.infobranch-item span img {
    width: 24px;
    height: 24px;
    min-height: 24px;
}

/* ================= BUTTON ================= */

.btn-branch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
}

.btn-branch a {
    padding: 12px 20px;
    width: 100%;
    border: 1px solid #FFFFFF;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 2%;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-branch a:first-child {
    background-color: #EE1C23;
    border: 1px solid #EE1C23;
}

.btn-branch a:hover {
    background-color: #ffffff;
    color: #EE1C23;
}

.btn-branch a svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: all 0.3s ease;
}

.btn-branch a:hover svg {
    fill: #EE1C23;
}

/* ================= POPUP MAP ================= */

.map-popup {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.map-popup.active {
    display: block;
}

.map-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.map-popup-content {
    position: relative;
    width: 92%;
    max-width: 1000px;
    margin: 5% auto;
    background: #161616;
    border: 2px solid #EE1C23;
    border-radius: 16px;
    padding: 24px;
    animation: popupFade 0.3s ease;
}

.map-popup-content iframe {
    width: 100%;
    height: 500px;
    border-radius: 12px;
}

.close-popup {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #EE1C23;
    color: #fff;
    border: none;
    font-size: 22px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.close-popup:hover {
    background: #ffffff;
    color: #EE1C23;
}

@keyframes popupFade {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


@media screen and (max-width: 1024px) {
    .location-name-follow.active {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .location-name-follow-card {
        flex: unset; 
    }
}

@media screen and (max-width: 768px) {
    .local-branch .container {
        padding: 48px 10px;
    }
     .location-name-follow.active {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width:560px) {
    .btn-branch {
        grid-template-columns: 1fr;
    }
    .location-name-follow-card img {
        min-height: auto;
    }
}