```css
@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400&display=swap');

/* =========================================
   PINNED PHOTO GALLERY
   ========================================= */

.fg-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 20px;
    width: 100%;
    align-items: start;
}


/* =========================================
   PHOTO / PAPER TILE
   ========================================= */

.fg-gallery-item {
    position: relative;
    width: 100%;
    cursor: pointer;

    background: #fff;
    padding: 8px;

    /* ONLY CHANGE:
       more white space underneath the photo */
    padding-bottom: 38px;

    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.10),
        0 7px 14px rgba(0, 0, 0, 0.12),
        0 16px 28px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

    overflow: visible;
}


/* =========================================
   Different natural-looking angles
   ========================================= */

.fg-gallery-item:nth-child(5n+1) {
    transform: rotate(-1.2deg);
}

.fg-gallery-item:nth-child(5n+2) {
    transform: rotate(0.8deg);
}

.fg-gallery-item:nth-child(5n+3) {
    transform: rotate(-0.5deg);
}

.fg-gallery-item:nth-child(5n+4) {
    transform: rotate(1.3deg);
}

.fg-gallery-item:nth-child(5n+5) {
    transform: rotate(-0.7deg);
}


/* =========================================
   PHOTO HOVER
   ========================================= */

.fg-gallery-item:hover {
    transform: rotate(5deg) translateY(-4px);

    box-shadow:
        0 4px 7px rgba(0, 0, 0, 0.12),
        0 12px 20px rgba(0, 0, 0, 0.16),
        0 22px 35px rgba(0, 0, 0, 0.10);

    z-index: 10;
}


/* =========================================
   IMAGE
   ========================================= */

.fg-gallery-image {
    display: block;
    width: 100%;

    /* ONLY CHANGE:
       force image area to 1:1 */
    aspect-ratio: 1 / 1;
    object-fit: cover;
}


/* =========================================
   PIN
   ========================================= */

.fg-gallery-pin {
    position: absolute;

    top: -35px;
    right: 10px;

    width: 45px;
    height: auto;

    z-index: 20;

    pointer-events: none;

    filter:
        drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.25));
}


/* =========================================
   PAPERCLIP
   ========================================= */

.fg-gallery-clip {
    position: absolute;

    top: -12px;
    left: -8px;

    width: 48px;
    height: auto;

    z-index: 21;

    pointer-events: none;

    transition: transform 0.28s ease;
}


/* Paperclip lifts and zooms when
   the whole image is hovered */

.fg-gallery-item:hover .fg-gallery-clip{
    transform: translateY(-9px) scale(1.12);
}


/* =========================================
   LIGHTBOX
   ========================================= */

.fg-lightbox {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 999999;

    background: rgba(0, 0, 0, 0.85);

    align-items: center;
    justify-content: center;

    padding: 30px;

    cursor: pointer;
}

.fg-lightbox.active {
    display: flex;
}


/* Enlarged image */

.fg-lightbox-image {
    max-width: 95%;
    max-height: 90vh;

    width: auto;
    height: auto;

    object-fit: contain;

    cursor: default;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.35);
}


/* Close button */

.fg-lightbox-close {
    position: absolute;

    top: 15px;
    right: 25px;

    color: white;

    font-size: 40px;
    line-height: 1;

    cursor: pointer;

    z-index: 2;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

    .fg-gallery {
        grid-template-columns: repeat(1, 1fr);
        gap: 22px 12px;
    }

    .fg-gallery-item {
        padding: 6px;

        /* Keep larger bottom border on mobile */
        padding-bottom: 32px;
    }

    .fg-gallery-pin {
        width: 35px;

        top: -7px;
        right: -6px;
    }

    .fg-gallery-clip {
        width: 38px;

        top: -9px;
        left: -6px;
    }

    .fg-gallery-item:hover .fg-gallery-clip {
        transform: translateY(-7px) scale(1.10);
    }

    .fg-lightbox {
        padding: 15px;
    }

    .fg-lightbox-image {
        max-width: 96%;
        max-height: 88vh;
    }

    .fg-lightbox-close {
        top: 10px;
        right: 15px;

        font-size: 36px;
    }

}

.fg-gallery-pin {
    transition: transform 0.28s ease !important;
    transform-origin: center center !important;
}

.fg-gallery-item:hover .fg-gallery-pin {
    transform: scale(1.25) !important;
}


/* =========================================
   POLAROID PHOTO ONLY
   ========================================= */

/* Keep the original 3-column desktop layout */
@media (min-width: 769px) {
    .fg-gallery {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        width: 100% !important;
        gap: 32px 28px !important;
    }
}

/* Square photo */
.fg-gallery-image {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    object-fit: cover !important;
}

/* Larger white Polaroid bottom */
.fg-gallery-item {
    padding-bottom: 50px !important;
}

@media (max-width: 768px) {
    .fg-gallery {
        gap: 28px 16px !important;
    }
}

@media (max-width: 768px) {
    .fg-gallery {
        row-gap: 35px !important;
        column-gap: 16px !important;
    }
}

@media (max-width: 768px) {
    .fg-gallery {
        row-gap: 50px !important;
    }

    .fg-gallery-item {
        margin-bottom: 10px !important;
    }
}


/* =========================================
   FILENAME FONT ONLY
   ========================================= */

.fg-gallery-image-name {
    position: absolute !important;
    left: 10px !important;
    bottom: 10px !important;

    font-family: "Kalam", cursive !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    letter-spacing: 0.2px !important;

    color: #4a4a4a !important;

    z-index: 50 !important;
    pointer-events: none !important;
}