/* ==========================================================================
   Certificates & Approvals Page Styles (certificates.php)
   Design System: Instrument Sans, 1600px Max Width, 80px Inset
   ========================================================================== */

.gr-certificates-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 70px 80px 80px 80px;
    box-sizing: border-box;
}

.gr-certificates-grid {
    margin-bottom: 20px;
}

/* Certificate Card Frame */
.gr-certificate-card {
    background-color: #FFFFFF;
    border-radius: 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ECEEF2;
}

.gr-certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(42, 62, 192, 0.12);
}

.gr-certificate-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.gr-certificate-img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FAFAFA;
}

.gr-certificate-img-wrap img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}

.gr-certificate-card:hover .gr-certificate-img-wrap img {
    transform: scale(1.02);
}

/* Zoom Icon Overlay on Hover */
.gr-certificate-zoom-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 62, 192, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 2;
}

.gr-certificate-zoom-icon svg {
    width: 32px;
    height: 32px;
    stroke: #FFFFFF;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.gr-certificate-card:hover .gr-certificate-zoom-icon {
    opacity: 1;
}

/* ==========================================================================
   Native Certificate Lightbox Modal Component
   ========================================================================== */

.gr-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.gr-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Backdrop Scrim */
.gr-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
}

/* Top Floating Controls Bar */
.gr-lightbox-topbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    padding: 0 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    box-sizing: border-box;
}

.gr-lightbox-counter {
    font-family: var(--gr-font-family, 'Instrument Sans', sans-serif);
    font-size: 15px;
    font-weight: 500;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.12);
    padding: 7px 18px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
}

.gr-lightbox-title {
    font-family: var(--gr-font-family, 'Instrument Sans', sans-serif);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    display: none;
}

.gr-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gr-lightbox-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    padding: 0;
}

.gr-lightbox-btn:hover {
    background: var(--gr-primary-blue, #2A3EC0);
    border-color: #FFFFFF;
    transform: scale(1.1);
}

.gr-btn-close:hover {
    background: #E53935;
    transform: scale(1.1) rotate(90deg);
}

/* Main Lightbox Stage */
.gr-lightbox-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 90px 100px 50px 100px;
    box-sizing: border-box;
    z-index: 5;
}

.gr-lightbox-img-wrap {
    max-width: 90vw;
    max-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.gr-lightbox-img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #FFFFFF;
    user-select: none;
}

/* Prev / Next Navigation Arrows */
.gr-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 15;
    outline: none;
    padding: 0;
}

.gr-lightbox-nav:hover {
    background: var(--gr-primary-blue, #2A3EC0);
    border-color: #FFFFFF;
    transform: translateY(-50%) scale(1.12);
}

.gr-nav-prev {
    left: 36px;
}

.gr-nav-next {
    right: 36px;
}

/* Responsive Breakpoints */
@media (max-width: 1560px) {
    .gr-certificates-container {
        padding-left: 50px;
        padding-right: 50px;
    }
}

@media (max-width: 1279px) {
    .gr-certificates-container {
        padding-left: 24px;
        padding-right: 24px;
    }
    .gr-lightbox-stage {
        padding: 80px 70px 40px 70px;
    }
    .gr-nav-prev {
        left: 16px;
    }
    .gr-nav-next {
        right: 16px;
    }
}

@media (max-width: 768px) {
    .gr-certificates-container {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 40px;
        padding-bottom: 40px;
    }
    .gr-lightbox-topbar {
        padding: 0 16px;
        height: 64px;
    }
    .gr-lightbox-stage {
        padding: 70px 16px 30px 16px;
    }
    .gr-lightbox-nav {
        width: 44px;
        height: 44px;
    }
    .gr-nav-prev {
        left: 10px;
    }
    .gr-nav-next {
        right: 10px;
    }
    .gr-lightbox-btn {
        width: 40px;
        height: 40px;
    }
}
