/**
 * Chemistry Hub - Certificates Section Styles
 */

/* =====================================================
   Certificates Section
   ===================================================== */
.ch-certificates {
    background-color: hsl(210 40% 96% / 0.3);
    width: 100%;
}

.ch-certificates-header {
    text-align: center;
    margin-bottom: 4rem;
}

.ch-certificates-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--ch-primary);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .ch-certificates-title {
        font-size: 2.25rem;
    }
}

.ch-certificates-description {
    color: var(--ch-muted-foreground);
    font-size: 1.125rem;
    max-width: 42rem;
    margin: 0 auto;
}

.ch-certificates-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .ch-certificates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ch-certificates-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ch-certificate-card {
    position: relative;
    cursor: pointer;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.ch-certificate-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ch-certificate-card:hover img {
    transform: scale(1.1);
}

.ch-certificate-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, hsl(222 60% 22% / 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
}

.ch-certificate-card:hover .ch-certificate-overlay {
    opacity: 1;
}

.ch-certificate-title {
    color: white;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ch-certificate-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background-color: var(--ch-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ch-certificate-card:hover .ch-certificate-zoom {
    opacity: 1;
}

.ch-certificate-zoom svg {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
}

/* =====================================================
   Lightbox
   ===================================================== */
.ch-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ch-lightbox.ch-lightbox-open {
    opacity: 1;
    visibility: visible;
}

.ch-lightbox-overlay {
    position: absolute;
    inset: 0;
    background-color: hsl(0 0% 0% / 0.9);
}

.ch-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10;
}

.ch-lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: hsl(0 0% 100% / 0.1);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ch-lightbox-close:hover {
    background-color: hsl(0 0% 100% / 0.2);
}

.ch-lightbox-prev,
.ch-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background-color: hsl(0 0% 100% / 0.1);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ch-lightbox-prev {
    left: -4rem;
}

.ch-lightbox-next {
    right: -4rem;
}

.ch-lightbox-prev:hover,
.ch-lightbox-next:hover {
    background-color: hsl(0 0% 100% / 0.2);
}

.ch-lightbox-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ch-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 0.5rem;
}

.ch-lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 1rem;
    font-size: 0.875rem;
}

body.ch-lightbox-active {
    overflow: hidden;
}
