/* ==========================================================
   CSS FOOTER XINGFA (BẢN FINAL - CHUẨN TỈ LỆ VÀNG)
   ========================================================== */

/* --- TỔNG THỂ FOOTER --- */
.xf-custom-footer {
    background: linear-gradient(135deg, #0c141d 0%, #1a2533 100%);
    color: #d1d5db;
    padding: 50px 0 20px 0;
    font-family: Arial, Helvetica, sans-serif;
    border-top: 3px solid #f5bc18;
}

.xf-custom-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- PHẦN TOP: LOGO & SOCIAL --- */
.xf-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 25px;
    margin-bottom: 35px;
    border-bottom: 1px solid rgba(245, 188, 24, 0.2);
}

.xf-footer-logo {
    display: inline-block;
    margin-bottom: 12px;
}

.xf-footer-logo img {
    max-width: 350px; 
    height: auto;
}

.xf-slogan-sub {
    font-size: 20px;
    font-weight: 600;
    color: #f5bc18;
    margin: 0;
    line-height: 1.2;
}

.xf-social-box a {
    color: #f5bc18 !important;
    font-size: 26px;
    margin-left: 20px;
    transition: transform 0.3s, color 0.3s;
    display: inline-block;
}

.xf-social-box a:hover {
    color: #ffffff !important;
    transform: scale(1.15);
}

/* --- LƯỚI GRID DÒNG 1 (4 CỘT ĐỀU NHAU) --- */
.xf-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.xf-mt-40 { margin-top: 40px; }

/* --- THẺ CARD & ĐỊNH DẠNG TEXT --- */
.xf-footer-card {
    padding: 10px 0;
}

.xf-footer-heading {
    font-size: 16px;
    font-weight: 700;
    color: #f5bc18 !important;
    margin: 0 0 20px 0 !important;
    text-transform: uppercase;
    line-height: 1.4;
}

.xf-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
}

.xf-footer-list li { margin-bottom: 8px; }

.xf-footer-card a {
    color: #d1d5db !important; 
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.xf-footer-card a:hover { 
    color: #f5bc18 !important; 
}

/* --- LƯỚI GRID DÒNG 2 (TỈ LỆ VÀNG 1.5 : 1 : 1) --- */
.xf-grid-bottom {
    grid-template-columns: 1.5fr 1fr 1fr !important;
}

/* Trang trí Bản đồ */
.xf-grid-bottom .xf-map-box iframe {
    width: 100% !important;
    height: 380px !important; /* Đủ cao để hiện rõ map */
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
}

/* --- BUTTON & FORM ĐĂNG KÝ --- */
.xf-btn-hotline {
    display: inline-block;
    background: #f5bc18 !important;
    color: #0c141d !important;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    margin-top: 10px;
    transition: background 0.3s;
}

.xf-btn-hotline:hover { 
    background: #e0a800 !important; 
    color: #000 !important; 
}

.xf-footer-form input,
.xf-footer-form select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: none;
    border-radius: 2px;
    background: #ffffff;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}

.xf-footer-form button {
    background: #f5bc18;
    color: #121b27;
    border: none;
    padding: 12px 20px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.3s;
    width: 100%;
}

.xf-footer-form button:hover { 
    background: #e0a800; 
}

/* --- COPYRIGHT --- */
.xf-copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #8892b0;
}

/* ==========================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================== */
@media (max-width: 1024px) {
    /* Tablet: Cả Dòng 1 và Dòng 2 đều rớt xuống 2 cột */
    .xf-footer-grid, 
    .xf-grid-bottom { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 20px; 
    }
}

@media (max-width: 768px) {
    /* Mobile: Căn giữa phần Top */
    .xf-footer-top { 
        flex-direction: column; 
        text-align: center; 
        gap: 15px; 
    }
    
    /* Mobile: Tất cả trở về 1 cột dọc */
    .xf-footer-grid, 
    .xf-grid-bottom { 
        grid-template-columns: 1fr !important; 
        gap: 15px; 
    }
    
    .xf-mt-40 { margin-top: 15px; }
    
    /* Bản đồ lùn lại để vuốt dễ hơn trên màn hình nhỏ */
    .xf-grid-bottom .xf-map-box iframe {
        height: 250px !important; 
    }
}
/* ==========================================================
   CSS CHO POPUP (MODAL) HỆ THỐNG CHI NHÁNH
   ========================================================== */
.xf-modal-overlay {
    display: none; /* Ẩn mặc định */
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Nền đen mờ */
    backdrop-filter: blur(3px); /* Hiệu ứng kính mờ cho web hiện đại */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Class kích hoạt hiển thị */
.xf-modal-overlay.show-modal {
    display: flex;
    opacity: 1;
}

.xf-modal-box {
    background: linear-gradient(135deg, #1a2533 0%, #0c141d 100%);
    border: 2px solid #f5bc18;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    transform: translateY(-30px);
    transition: transform 0.3s ease;
    color: #d1d5db;
}

.xf-modal-overlay.show-modal .xf-modal-box {
    transform: translateY(0); /* Hiệu ứng trượt nhẹ từ trên xuống */
}

/* Nút X tắt Popup */
.xf-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #d1d5db;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.xf-modal-close:hover {
    color: #f5bc18;
}

/* Định dạng chữ bên trong Popup */
.xf-modal-title {
    color: #f5bc18;
    font-size: 22px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.xf-modal-info p {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 15px;
}

.xf-modal-info strong {
    color: #ffffff; /* Làm sáng các chữ In đậm (Địa chỉ, Hotline...) */
}

/* 1. Ép chiều cao cố định đúng bằng tổng độ cao của 4 bài viết bên trái */
.col-md-4 .list_cn {
    height: 847px !important;      /* Giảm từ 1050px xuống 820px (hoặc chỉnh từ từ cho đến khi bằng mép) */
    max-height: 847px !important;
    overflow-y: scroll !important; 
    padding-right: 12px;
    box-sizing: border-box;
}

/* Tay kéo thanh cuộn */
.col-md-4 .list_cn::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.col-md-4 .list_cn::-webkit-scrollbar-thumb:hover {
    background: #777;
}