/* ==========================================================================
   0. CẤU HÌNH STICKY FOOTER (ÉP FOOTER LUÔN HÍT ĐÁY MÀN HÌNH KHI NỘI DUNG NGẮN)
   ========================================================================== */
html, body {
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

/* Các thẻ bọc nội dung chính tự dãn ra để đẩy Footer xuống tận cùng */
#page,
.site,
main,
#main,
.site-main,
#primary,
.main-content,
.site-content,
.content-area,
.woocommerce-cart,
.woocommerce-page {
    flex: 1 0 auto !important;
}

/* ==========================================================================
   AGENCY CUSTOM FOOTER (CHUẨN KHUÔN 1440PX & TỐI ƯU KHOẢNG CÁCH GỌN ĐẸP)
   ========================================================================== */
footer,
.site-footer,
.agency-custom-footer {
    background-color: #2b5341;
    color: var(--text-white, #F7F8F9);
    padding: 70px 0 30px 0;
    font-family: var(--font-sans, inherit) !important;
    width: 100% !important;
    overflow: hidden;
    margin-top: auto !important; /* Đẩy footer xuống đáy */
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    flex-shrink: 0 !important;  /* Không bị co lại */
}

/* KHUNG CHỨA FOOTER CHUẨN CONTAINER 1440PX TOÀN TRANG */
.agency-custom-footer .container,
.agency-custom-footer .site-container,
.agency-custom-footer .af-container,
.agency-custom-footer > .container {
    max-width: var(--container-max-w, 1440px) !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding-left: var(--container-pad-x, 20px) !important;
    padding-right: var(--container-pad-x, 20px) !important;
    box-sizing: border-box !important;
}

/* KHUNG LƯỚI FOOTER (DESKTOP - 5 CỘT GIỮ NGUYÊN BẢN CŨ) */
.af-top-row {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1.4fr 1fr 1.6fr; 
    gap: 35px;
    margin-bottom: 40px;
    text-align: left;
}

/* TIÊU ĐỀ CỘT */
.af-col-title {
    color: var(--text-white, #ffffff);
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 14px; /* Giữ khoảng cách gọn dưới tiêu đề */
    text-transform: none;
    font-family: var(--font-sans, inherit);
    text-align: left;
}

/* CỘT 1: LOGO & SOCIAL */
.af-main-logo {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 0 8px 0; /* Căn trái */
    transition: all 0.3s ease;
}

.af-tagline {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 22px;
    font-family: var(--font-sans, inherit);
    text-align: left;
}

.af-social-title-desktop {
    display: block;
}

.af-social-title-mobile {
    display: none;
}

.af-social-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-white, #ffffff);
    text-align: left;
}

.af-icons {
    display: flex;
    justify-content: flex-start; /* Căn trái */
    gap: 10px;
}

.social-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-circle:hover {
    background-color: #ffffff;
    color: #2b5341;
}

.social-circle.zalo-icon span {
    font-size: 11px;
    font-weight: 700;
}

/* CÁC CỘT MENU (DANH MỤC SẢN PHẨM / DỊCH VỤ) */
.af-menu { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    text-align: left;
}

.af-menu li { 
    margin-bottom: 8px; /* Khoảng cách giữa các mục menu siêu gọn */
    line-height: 1.4;
}

.af-menu li a { 
    color: rgba(255, 255, 255, 0.85); 
    text-decoration: none; 
    font-size: 14.5px; 
    font-weight: 400;
    display: inline-block;
    transition: all 0.2s ease; 
}

.af-menu li a:hover { 
    color: #ffffff; 
    padding-left: 4px; 
}

/* CỘT THÔNG TIN LIÊN HỆ */
.af-contact-info {
    text-align: left;
    margin: 0;
    padding: 0;
}

.af-contact-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.45;
    margin-top: 0;
    margin-bottom: 8px;
    text-align: left;
}

.af-contact-info p strong {
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    display: inline-block;
    margin-right: 4px;
}

.af-contact-info a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s ease;
}

.af-contact-info a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* RIÊNG COPYRIGHT LUÔN CĂN GIỮA */
.af-bottom {
    text-align: center !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15); 
    padding-top: 25px;
    margin-top: 10px;
}

.copyright {
    margin: 0 auto !important;
    text-align: center !important;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
}

/* ==========================================================================
   RESPONSIVE (CHỈ ẨN SẢN PHẨM TRÊN TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
    .col-products {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .agency-custom-footer .container,
    .agency-custom-footer .site-container,
    .agency-custom-footer .af-container,
    .agency-custom-footer > .container {
        padding-left: 25px !important;
        padding-right: 25px !important;
    }

    .af-top-row { 
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; 
        gap: 30px 25px !important; 
    }
    .col-brand { grid-column: 1 / -1 !important; margin-bottom: 5px !important; }
    .col-projects { grid-column: 1 / 2 !important; }
    .col-services { grid-column: 2 / 3 !important; }
    .col-contact { grid-column: 1 / -1 !important; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;}
}

@media (max-width: 767px) {
    .agency-custom-footer {
        padding: 35px 0 20px 0;
    }

    .af-social-title-desktop {
        display: none !important;
    }

    .af-social-title-mobile {
        display: block !important;
    }

    .agency-custom-footer .container,
    .agency-custom-footer .site-container,
    .agency-custom-footer .af-container,
    .agency-custom-footer > .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Bố cục Responsive 2 cột song song chuẩn theo ảnh thiết kế */
    .af-top-row { 
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; 
        gap: 25px 20px !important; 
        margin-bottom: 25px !important;
    }

    .col-brand { 
        grid-column: 1 / -1 !important; 
        margin-bottom: 5px !important;
    }

    .col-projects {
        grid-column: 1 / 2 !important;
    }

    .col-services {
        grid-column: 2 / 3 !important;
    }

    .col-products { 
        grid-column: 1 / -1 !important; 
    }

    .col-products .af-menu {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        column-gap: 24px !important;
        row-gap: 5px !important;
        align-items: baseline !important;
        width: 100% !important;
    }

    .col-products .af-menu li {
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }

    .col-products .af-menu li a {
        font-size: 14px !important;
        line-height: 1.35 !important;
        display: inline-block !important;
    }

    .col-contact { 
        grid-column: 1 / -1 !important; 
    }

    .af-col { 
        text-align: left !important; 
    }

    .af-main-logo { 
        margin: 0 0 12px 0 !important;
    }

    .af-icons { 
        justify-content: flex-start !important; 
    }

    .af-col-title {
        margin-bottom: 12px !important;
        font-size: 16px;
        font-weight: 600;
    }

    .af-menu li {
        margin-bottom: 7px !important;
    }

    .af-menu li a {
        font-size: 14px;
    }

    .af-contact-info p {
        margin-bottom: 8px !important;
        font-size: 14px;
    }

    .af-bottom, .copyright {
        text-align: center !important;
    }
}


