/* ===================== */
/* GALLERY.CSS - With Proper Image Frames */
/* ===================== */

:root {
    --primary-blue: #0d47a1;
    --accent-gold: #f9a825;
}

.page-animate::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("../images/logo.png");
    background-repeat: repeat;
    background-size: 260px auto;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
    animation: watermarkFloat 30s infinite linear;
}

@keyframes watermarkFloat {
    0% { background-position: 0 0; }
    100% { background-position: 260px 260px; }
}

.gallery-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-title {
    font-size: 42px;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 12px;
}

.gallery-subtitle {
    font-size: 20px;
    color: #1565c0;
}

/* Framed Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(13, 71, 161, 0.18);
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    background: white;
    padding: 12px;
    border: 3px solid #f8f9fa;
}

.gallery-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 70px rgba(13, 71, 161, 0.25), 0 0 0 4px #f9a825;
}

.image-frame {
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    background: #fff;
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.7s ease;
}

.gallery-item:hover .image-frame img {
    transform: scale(1.06);
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(13, 71, 161, 0.92));
    color: white;
    padding: 28px 20px 22px;
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay h3 {
    margin: 0 0 6px 0;
    font-size: 19px;
    font-weight: 600;
}

.gallery-overlay p {
    margin: 0;
    font-size: 14.5px;
    opacity: 0.95;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.96);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox img {
    max-width: 96%;
    max-height: 92vh;
    border-radius: 16px;
    box-shadow: 0 0 80px rgba(249, 168, 37, 0.7);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 48px;
    color: white;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #f9a825;
    transform: scale(1.15);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
    .gallery-title {
        font-size: 34px;
    }
}