/**
 * DECOFI Theme (NSSV3) — Khối Đối Tác Chiến Lược (global.web_link)
 * Concept: Dual-Row Full-Viewport Infinite Marquee on Pantheon Stone Wall + Seamless Footer Connection
 * Brand Tokens: --c-primary (#ce2027) | --c-secondary (#14539a) | Fahkwang Font
 */

.block_weblink.decofi-partners-section {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 72px;
    /* Khử khoảng trống mt-12 (48px) của <footer> để khối đối tác dính liền mạch với khối Footer */
    margin-bottom: -3rem !important;
    padding: 56px 0 60px;
    overflow: hidden;
    /* Nền tường đá Pantheon đồng bộ 100% với khối slider_project và global.service */
    background-color: #f3f2ee !important;
    background-image:
        radial-gradient(ellipse 80% 90% at 50% 0%, rgba(255, 255, 255, 0.85) 0%, rgba(243, 242, 238, 0.25) 65%, rgba(218, 215, 207, 0.38) 100%),
        repeating-linear-gradient(180deg,
            transparent 0px,
            transparent 178px,
            rgba(175, 170, 158, 0.20) 178px,
            rgba(175, 170, 158, 0.20) 179px,
            rgba(255, 255, 255, 0.65) 179px,
            rgba(255, 255, 255, 0.65) 180px),
        repeating-linear-gradient(90deg,
            transparent 0px,
            transparent 478px,
            rgba(175, 170, 158, 0.16) 478px,
            rgba(175, 170, 158, 0.16) 479px,
            rgba(255, 255, 255, 0.55) 479px,
            rgba(255, 255, 255, 0.55) 480px),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='stone'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.50 0 0 0 0 0.48 0 0 0 0 0.45 0 0 0 0.048 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23stone)'/%3E%3C/svg%3E") !important;
}

/* Đảm bảo khi trang có khối đối tác ở cuối <main> thì footer áp sát không còn kẽ hở */
main:has(.decofi-partners-section)+footer {
    margin-top: 0 !important;
}

main:has(.decofi-partners-section) .block_weblink.decofi-partners-section {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   1. HEADER BAR: NẰM TRONG CONTAINER 1250PX
   ========================================================================== */
.decofi-partners-section .partners-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 32px;
}

.decofi-partners-section .partners-section-title {
    flex: 1;
    min-width: 200px;
    margin: 0 !important;
    text-transform: uppercase;
}

.decofi-partners-section .partners-header-controls {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.decofi-partners-section .partners-arrow-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.decofi-partners-section .partners-nav-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #ffffff;
    color: var(--c-secondary, #14539a);
    border: 1.5px solid var(--c-secondary, #14539a);
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.decofi-partners-section .partners-nav-btn::before {
    content: "";
    position: absolute;
    top: 7px;
    left: -2px;
    width: 15px;
    height: 1.5px;
    background-color: var(--c-secondary, #14539a);
    transform-origin: 0 0;
    transform: rotate(-45deg);
    pointer-events: none;
    z-index: 2;
}

.decofi-partners-section .partners-nav-btn:hover {
    background-color: var(--c-secondary, #14539a);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(20, 83, 154, 0.22);
}

/* ==========================================================================
   2. DẢI BĂNG CHUYỀN 2 HÀNG ĐỐI TÁC TRÀN FULL MÀN HÌNH (.partners-marquee-stage)
   ========================================================================== */
.decofi-partners-section .partners-marquee-stage {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
    padding: 4px 0;
}

.decofi-partners-section .partners-marquee-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    user-select: none;
}

.decofi-partners-section .partners-marquee-track {
    display: flex;
    align-items: center;
    gap: 30px;
    width: max-content;
    will-change: transform;
}

/* ==========================================================================
   3. THẺ LOGO ĐỐI TÁC VÁT GÓC KIẾN TRÚC (.partner-logo-card)
   (Giảm 20% kích thước khung và logo theo concept tinh gọn)
   ========================================================================== */
.decofi-partners-section .partner-card-cell {
    flex: 0 0 auto;
    width: 163px;
}

.decofi-partners-section .partner-logo-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80px;
    padding: 11px 16px;
    background-color: #ffffff;
    border: 1.5px solid var(--c-border, #d9d9d9);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Đường viền góc vát chéo 45° ở góc dưới bên phải mỗi ô logo */
.decofi-partners-section .partner-logo-card::after {
    content: "";
    position: absolute;
    bottom: 9px;
    right: -2px;
    width: 15px;
    height: 1.5px;
    background-color: var(--c-border, #d9d9d9);
    transform-origin: 100% 100%;
    transform: rotate(-45deg);
    pointer-events: none;
    z-index: 2;
    transition: background-color 0.3s ease;
}

.decofi-partners-section .partner-logo-card:hover {
    border-color: var(--c-secondary, #14539a);
    box-shadow: 0 10px 22px rgba(20, 83, 154, 0.12);
}

.decofi-partners-section .partner-logo-card:hover::after {
    background-color: var(--c-secondary, #14539a);
}

.decofi-partners-section .partner-logo-card img {
    max-width: 100% !important;
    max-height: 42px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* ==========================================================================
   4. RESPONSIVE MOBILE & TABLET
   ========================================================================== */
@media (max-width: 767px) {
    .block_weblink.decofi-partners-section {
        margin-top: 48px;
        padding: 36px 0 40px;
    }

    .decofi-partners-section .partners-header-bar {
        margin-bottom: 20px;
    }

    .decofi-partners-section .partners-marquee-stage {
        gap: 14px;
    }

    .decofi-partners-section .partners-marquee-track {
        gap: 16px;
    }

    .decofi-partners-section .partner-card-cell {
        width: 125px;
    }

    .decofi-partners-section .partner-logo-card {
        height: 66px;
        padding: 8px 11px;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
    }

    .decofi-partners-section .partner-logo-card::after {
        bottom: 7px;
        width: 12px;
    }

    .decofi-partners-section .partner-logo-card img {
        max-height: 43px !important;
    }
}