/* ==========================================================
   CLENA — About Certificates Section Styles (Single Row)
   File: assets/css/about/about-certificates.css
   ========================================================== */

.about-certificates-section {
    position: relative;
    background: #ffffff; /* Solid white background */
    padding: 60px 0;
    z-index: 10;
}

.about-certificates-container {
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
}

/* ── Header Styling ─────────────────────────────────────── */
.about-certificates-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px auto;
}

.about-certificates-tagline {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    color: var(--secondary, var(--secondary));
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.about-certificates-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--primary, var(--primary));
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.about-certificates-divider {
    width: 60px;
    height: 4px;
    background: var(--secondary, var(--secondary));
    margin: 0 auto 20px auto;
    border-radius: 2px;
}

.about-certificates-subtitle {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-secondary, #666666);
    margin: 0;
}

/* ── Grid with Exact Width & Height ────────────────────── */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columns in a single row */
    gap: 24px;
    align-items: center;
    justify-items: center; /* Center items in their columns */
    max-width: 1200px;
    margin: 0 auto;
}

.certificate-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 160px; /* Exact uniform width for portraits and squares */
    height: 160px;    /* Exact uniform height */
    overflow: hidden; /* Crops excess white space from scaled images */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* 
 * Allow landscape logo items (DAkkS) to take up more width and bleed into grid gaps 
 * so the text is fully legible and significantly larger without being cropped.
 */
.certificate-item.val-orientation-landscape {
    max-width: 220px; 
    overflow: visible; /* Let it bleed into the grid gaps */
}

.certificate-img {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.3s ease;
}

/* 
 * Adjust scale factor dynamically for non-square images to trim empty margin/paddings
 * so the actual graphics appear at the same visual size as the square badges.
 */
.certificate-img.img-orientation-portrait {
    object-fit: contain;
    transform: scale(1.48); /* Zoom in portrait images to crop top/bottom white margins */
}

.certificate-img.img-orientation-landscape {
    object-fit: contain;
    transform: scale(1.22); /* Scaled larger to display the logo text clearly */
}

.certificate-img.img-orientation-square {
    object-fit: contain; /* Render square badges standard size (no margins) */
}

/* Simple hover effect: scale up the container */
.certificate-item:hover {
    transform: scale(1.08);
}

/* ── Responsive Styling ───────────────────────────────── */
@media (max-width: 1024px) {
    .certificates-grid {
        gap: 16px;
    }
    
    .certificate-item {
        max-width: 130px;
        height: 130px;
    }
    
    .certificate-item.val-orientation-landscape {
        max-width: 180px;
    }

    .certificate-img.img-orientation-portrait {
        transform: scale(1.48);
    }

    .certificate-img.img-orientation-landscape {
        transform: scale(1.22);
    }
}

@media (max-width: 991px) {
    .certificates-grid {
        grid-template-columns: repeat(3, 1fr); /* Wrap to 3 columns on tablet */
        gap: 24px;
    }
    
    .certificate-item {
        max-width: 160px;
        height: 160px;
    }

    .certificate-item.val-orientation-landscape {
        max-width: 220px;
    }
}

@media (max-width: 575px) {
    .about-certificates-section {
        padding: 50px 0;
    }
    
    .about-certificates-heading {
        font-size: 28px;
    }

    .certificates-grid {
        grid-template-columns: repeat(2, 1fr); /* Wrap to 2 columns on mobile */
        gap: 20px;
    }
    
    .certificate-item {
        max-width: 140px;
        height: 140px;
    }

    .certificate-item.val-orientation-landscape {
        max-width: 190px;
    }
}
