/* ============================
   Gallery Page Styling (FIXED)
   ============================ */

.gallery-section {
    background-color: #f9f9f9;
}

/* Gallery Card */
.gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Aspect Ratio Box */
.gallery-img-wrapper {
    position: relative;
    padding-top: 75%; /* 4:3 ratio */
    overflow: hidden;
    background: #ffffff; /* IMPORTANT for contain effect */
}

/* FIXED IMAGE (NO CROPPING) */
.gallery-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    object-fit: contain;   /* 🔥 FIX: NO IMAGE CUT */
    padding: 8px;          /* breathing space */
    background: #fff;

    transition: transform 0.5s ease;
}

/* optional zoom (safe) */
.gallery-item:hover .gallery-img-wrapper img {
    transform: scale(1.05);
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 98, 181, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: #fff;
    font-size: 2rem;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* MOBILE IMPROVEMENT */
@media (max-width: 768px) {
    .gallery-img-wrapper {
        padding-top: 100%; /* square on mobile */
    }

    .gallery-img-wrapper img {
        padding: 6px;
    }
}