@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800&display=swap');
*
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
body
{
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(0deg,#fff 50%, #2196F3);
}
.container
{
    position: relative;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    transition: 0.5s;
}
.container:hover .card
{
    
    transform: scale(.7);
}
.container .card
{
    position: relative;
    width: 250px;
    height: 300px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.5s;

}
.container .card:hover
{
    filter: blur(0px);
    transform: scale(1);
}
.container .card:before
{
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1;
    transition: 0.5s;
}
.container .card:hover:before
{
    background: #000;
    transform: scaleY(1.15);
    box-shadow: 0 5px 15px rgba(0,0,0,.2);
}
.container .card:after
{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    transition: 0.5s;
    background: rgba(255,255,255,.1);
    z-index: 1;
}
.container .card:hover:after
{
    transform: scaleY(1.15);
}
.container .card:hover
{
    z-index: 1;
}
.container .card .content
{
    text-align: center;
    z-index: 2;
    padding: 0 20px;
    transition: 0.5s;
}
.container .card:hover .content
{
    color: #fff;
}
.container .card .content h2
{
    font-size: 3em;
}
.container .card .content p
{
    font-size: 0.9em;
}
.container .card .content a
{
    display: inline-block;
    margin-top: 15px;
    padding: 5px 10px;
    background: #262626;
    color: #fff;
    text-decoration: none;
}
.container .card:hover .content a
{
    background: #2196F3;
}

.h4certificates {
    color: #12304a;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    margin: 42px 20px 10px;
}

.certificate-carousel {
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 20px;
    width: min(1120px, calc(100% - 40px));
    margin: 28px auto 0;
    padding: 16px 8px 28px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-color: #168aad #dceaf1;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.certificate-carousel .card,
.certificate-carousel:hover .card,
.certificate-carousel .card:hover {
    position: relative;
    flex: 0 0 260px;
    width: 260px;
    height: 390px;
    overflow: hidden;
    border: 1px solid rgba(20, 75, 105, 0.12);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(16, 58, 82, 0.12);
    scroll-snap-align: start;
    transform: none;
    filter: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.certificate-carousel .card:hover {
    border-color: rgba(22, 138, 173, 0.45);
    box-shadow: 0 18px 38px rgba(16, 58, 82, 0.2);
    z-index: 2;
}

.certificate-carousel .card:before,
.certificate-carousel .card:after,
.certificate-carousel .card:hover:before,
.certificate-carousel .card:hover:after {
    content: none;
}

.certificate-carousel .card .content,
.certificate-carousel .card:hover .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 16px 18px;
    color: #17354a;
    text-align: center;
    transition: none;
}

.certificate-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% + 32px);
    height: 205px;
    margin: 0 -16px 12px;
    overflow: hidden;
    background: linear-gradient(145deg, #e8f5f8, #f7fbfd);
}

.certificate-preview img,
.certificate-preview iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

.certificate-preview img {
    padding: 8px;
}

.certificate-preview--pdf {
    background: #edf4f7;
}

.certificate-preview canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(16, 58, 82, 0.14);
}

.certificate-preview--error {
    padding: 18px;
    color: #31566a;
    font-size: 0.9rem;
    text-align: center;
}

.certificate-carousel .card .content h2 {
    align-self: flex-start;
    margin: 0 0 2px;
    color: #168aad;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
}

.certificate-carousel .card .content p {
    display: -webkit-box;
    flex: 1;
    overflow: hidden;
    margin: 2px 0 8px;
    font-size: 0.92rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.certificate-carousel .card .content a {
    margin-top: auto;
    padding: 9px 16px;
    border-radius: 999px;
    background: #146b8a;
    font-size: 0.85rem;
    font-weight: 600;
}

.certificate-carousel .card .content a:hover,
.certificate-carousel .card:hover .content a {
    background: #0d4c67;
}

.certificate-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 auto;
    color: #31566a;
    font-size: 0.9rem;
}

.certificate-carousel-controls button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(20, 75, 105, 0.16);
    border-radius: 50%;
    background: #fff;
    color: #146b8a;
    cursor: pointer;
    font-size: 1.35rem;
    box-shadow: 0 5px 14px rgba(16, 58, 82, 0.1);
}

.certificate-carousel-controls button:hover:not(:disabled) {
    background: #146b8a;
    color: #fff;
}

.certificate-carousel-controls button:disabled {
    cursor: default;
    opacity: 0.4;
}

@media (max-width: 600px) {
    .certificate-carousel {
        flex-direction: column;
        align-items: center;
        width: calc(100% - 24px);
        gap: 18px;
        overflow: visible;
        scroll-snap-type: none;
    }

    .certificate-carousel .card,
    .certificate-carousel:hover .card,
    .certificate-carousel .card:hover {
        flex: 0 0 390px;
        width: min(100%, 360px);
    }

    .certificate-carousel-controls {
        display: none;
    }
}