:root {
    --gold: #c5a059;
    --dark: #121212;
    --gray: #f8f9fa;
}

.premium-gallery {
    padding: 30px 0 !important;
    background: #fff;
    position: relative;
    font-family: 'Montserrat', sans-serif;
    overflow: hidden;
}

/* Background watermark text */
.gallery-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20vw;
    font-weight: 900;
    color: rgba(0,0,0,0.02);
    z-index: 0;
    pointer-events: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    position: relative;
    z-index: 2;
}

/* Header Styling */
.header-wrapper {
    text-align: center;
    margin-bottom: 70px;
}

.sub-text {
    color: #79ad70;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.main-title {
    font-size: 42px;
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 700;
}

.accent-line {
    width: 60px;
    height: 4px;
    background: #79ad70;
    margin: auto;
}

/* Grid Layout */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

/* Certificate Card Styling */
.cert-card {
    cursor: pointer;
    transition: transform 0.4s ease;
}

.card-inner {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: var(--dark);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.card-front img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
    transition: all 0.6s ease;
    opacity: 0.9;
}

/* Glass Overlay */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #79ad70;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

.overlay-content {
    text-align: center;
    color: white;
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

    .overlay-content i {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .overlay-content p {
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

/* Hover States */
.cert-card:hover .card-overlay {
    opacity: 1;
}

.cert-card:hover .overlay-content {
    transform: translateY(0);
}

.cert-card:hover .card-front img {
    transform: scale(1.1) rotate(2deg);
    filter: blur(2px);
}

.card-info {
    padding: 20px 0;
    text-align: left;
}

    .card-info h3 {
        font-size: 18px;
        color: var(--dark);
        margin-bottom: 5px;
    }

    .card-info p {
        color: #79ad70;
        
        font-size: 14px;
        font-weight: 600;
    }

/* LIGHTBOX RE-DESIGN */
.smart-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(18, 18, 18, 0.98);
    z-index: 9999;
    display: none;
    flex-direction: column;
    padding: 40px;
}

.lightbox-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s;
}

    .close-btn:hover {
        color: #79ad70;
    }

.lightbox-stage {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .lightbox-stage img {
        max-width: 100%;
        max-height: 85vh;
        border: 1px solid rgba(255,255,255,0.1);
        animation: reveal 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

@keyframes reveal {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 32px;
    }

    .card-front img {
        height: 350px;
    }
}
