/* ==========================================================================
   SECTION: CERTIFICATE LIST (MINH CHỨNG CHO CHẤT LƯỢNG SẢN PHẨM)
   Path: template-parts/sections/certificate-list/style.css
   ========================================================================== */

.certificate-list {
    padding: 70px 0 85px 0;
    background-color: var(--color-bg-main, #FFF5E8);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.certificate-list__container {
    max-width: 1250px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    position: relative;
    z-index: 2;
}

.certificate-list__header {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 45px auto;
}

.certificate-list__title {
    font-family: var(--font-primary, 'Parastoo', serif);
    font-size: var(--fs-h2, 38px);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-heading, #2F2B29);
    margin: 0 0 16px 0;
}

.certificate-list__desc {
    font-family: var(--font-secondary, 'Be Vietnam Pro', sans-serif);
    font-size: var(--fs-body-s, 18px);
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-body, #5C5752);
    margin: 0;
}

/* ==========================================================================
   1. DESKTOP LAYOUT: EQUAL COLUMNS GRID (CĂN GIỮA NẾU CÓ 2 HOẶC 4 THẺ)
   ========================================================================== */
.certificate-list__desktop-only {
    display: block;
    width: 100%;
}

.certificate-list__grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

.certificate-list__card {
    flex: 0 1 calc(25% - 18px);
    max-width: 380px;
    min-width: 260px;
    background-color: #FFFFFF;
    border: 1px solid #EAE2D8;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: var(--transition-base, all 0.3s ease-in-out);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-sizing: border-box;
}

.certificate-list__card {
    position: relative;
    cursor: pointer;
}

.certificate-list__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.certificate-list__card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.certificate-list__zoom-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: rgba(47, 43, 41, 0.75);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.certificate-list__card:hover .certificate-list__zoom-icon {
    opacity: 1;
    transform: scale(1);
}

/* LIGHTBOX MODAL FULLSCREEN POPUP (NẰM TẬP TRUNG Ở BODY TRÊN CÙNG) */
.cert-lightbox-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 30px 20px !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-sizing: border-box !important;
}

.cert-lightbox-modal.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.cert-lightbox-modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
}

.cert-lightbox-modal__content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cert-lightbox-modal.is-open .cert-lightbox-modal__content {
    transform: scale(1);
}

.cert-lightbox-modal__img {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    background-color: #ffffff;
}

.cert-lightbox-modal__close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 42px;
    height: 42px;
    background: #ffffff;
    color: #2F2B29;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 3;
}

.cert-lightbox-modal__close:hover {
    background: #EFE8DF;
    transform: scale(1.1);
}

/* FOOTER NÚT BẤM BÊN DƯỚI */
.certificate-list__footer {
    text-align: center;
    margin-top: 35px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.certificate-list__btn {
    background: linear-gradient(135deg, #A86B52 0%, var(--color-accent-2, #794B38) 100%);
    color: var(--text-white, #ffffff) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 6px;
    font-family: var(--ff-btn-m, var(--font-secondary, sans-serif));
    font-size: var(--fs-btn-m, 14px);
    font-weight: var(--fw-btn-m, 600);
    transition: var(--transition-base, all 0.3s ease);
    box-shadow: 0 4px 12px rgba(121, 75, 56, 0.2);
}

.certificate-list__btn:hover {
    background: var(--color-accent-2, #794B38);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(121, 75, 56, 0.3);
}

/* ==========================================================================
   2. MOBILE LAYOUT: SWIPER SLIDER CHẤM TRÒN PHÂN TRANG (CHUẨN MẪU ẢNH 2)
   ========================================================================== */
.certificate-list__mobile-only {
    display: none;
}
