


/* Base Styles */
.gallery {
    max-width: 1500px;
}

.image-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-inline: auto;
    width: 100%;
    margin: 10px 0;
}

@media only screen and (min-width: 600px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (min-width: 992px) {
    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 5px;
    padding-top: 133.33%;
    /* 4:3 Aspect Ratio */
}

.gallery-item img {
    filter: grayscale(100%);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    transition: -webkit-transform .3s ease, opacity .3s ease;
    transition: transform .3s ease, opacity .3s ease;
    transition: transform .3s ease, opacity .3s ease, -webkit-transform .3s ease;
}

.gallery-item:hover img,
.gallery-item.touch-active img {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
    opacity: .9;
}

.gallery-item img:not(.loaded) {
    cursor: not-allowed;
    opacity: 0.5; /* Optional to indicate the image is still loading */
}

.overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.overlay-content {
    text-align: center;
    color: var(--c0);
}

.gallery-item:hover .overlay,
.gallery-item.touch-active .overlay {
    opacity: 1;
}

.overlay h3 {
    font-size: var(--text-l);
    font-family: "Anton", sans-serif;
    position: relative;
	font-weight: 400;
    font-style: normal;
}

.overlay p {
    font-family: var(--body-font);
    position: relative;
    margin-top: .3rem;
    font-size: var(--text-small-p);
}

.overlay p::before {
    content: "";
    display: block;
    height: 2px;
    width: 60%;
    background: #ccc; 
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}


/* ================================================================================================ */
/* FANCY BUTTON */
/* ================================================================================================ */
/* Button Styling */
.overlay button.fancy {
    background-color: transparent;
    border: 2px solid var(--c0);
    color: var(--c0);
    padding: .75em 1em;
    font-family: var(--body-font);
}

.overlay button.fancy:hover {
    background-color: var(--c0);
    color: var(--c11);
}

.overlay button.fancy a {
    color: var(--c0);
    text-decoration: none;
}

.overlay button.fancy:hover a {
    color: var(--c11);
}

.gallery button.fancy {
    background-color: var(--c0);
    border: 2px solid var(--c11);
    border-radius: .25rem;
    color: var(--c11);
    display: inline-block;
    font-weight: var(--font-bold);
    letter-spacing: 0.05em;
    margin: 0;
    outline: none;
    padding: .75em 1em;
    position: relative;
    text-align: center;
    text-transform: none;
    transition: all 0.3s ease-in-out;
    user-select: none;
    width: 200px;
    margin-top: 1rem;
}

.gallery button.fancy::before {
    content: ' ';
    width: 1rem;
    height: 2px;
    background: var(--c11);
    top: 50%;
    left: 1.5em;
    position: absolute;
    transform: translateY(-50%);
    transform-origin: center;
}

.gallery button.fancy a {
    font-size: 1.125em;
    line-height: 1.33333em;
    padding-left: 2em;
    display: block;
    text-align: left;
    transition: all 0.3s ease-in-out;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--c11);
}

.gallery button.fancy .top-key {
    height: 2px;
    width: 1.5625rem;
    top: -2px;
    left: 0.625rem;
    position: absolute;
    background: var(--c0);
    transition: width 0.5s ease-out, left 0.3s ease-out;
}

.gallery button.fancy .bottom-key-1 {
    height: 2px;
    width: 1.5625rem;
    right: 1.875rem;
    bottom: -2px;
    position: absolute;
    background: var(--c0);
    transition: width 0.5s ease-out, right 0.3s ease-out;
}

.gallery button.fancy .bottom-key-2 {
    height: 2px;
    width: 0.625rem;
    right: 0.625rem;
    bottom: -2px;
    position: absolute;
    background: var(--c0);
    transition: width 0.5s ease-out, right 0.3s ease-out;
}

.gallery button.fancy:hover {
    color: var(--c11);
    background: var(--c0);
}

.gallery button.fancy:hover::before {
    width: 0.9375rem;
    background: var(--c11);
}

.gallery button.fancy:hover a {
    color: var(--c11);
    padding-left: 1.5em;
}

.gallery button.fancy:hover .top-key {
    left: -2px;
    width: 0px;
}

.gallery button.fancy:hover .bottom-key-1,
.gallery button.fancy:hover .bottom-key-2 {
    right: 0;
    width: 0;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {

    .gallery .gallery-content p,
    .gallery .gallery-content-2 p {
        font-size: var(--text-small-p);
    }

    .gallery button.fancy {
        width: 150px;
        padding: .5em .75em;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {

    .overlay h3 {
        font-size: var(--text-xbig-p);
    }

    .gallery button.fancy {
        width: 175px;
        padding: .6em .85em;
    }

    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {

    .gallery .gallery-content p,
    .gallery .gallery-content-2 p {
        font-size: var(--text-small-p);
    }

    .gallery .gallery-content p {
        max-width: 600px;
    }

    .gallery .gallery-content-2 p {
        max-width: 800px;
    }

    .overlay h3 {
        font-size: var(--text-xbig-p);
    }

    .gallery button.fancy {
        width: 250px;
    }

    .gallery button.fancy::before {
        width: 1.25rem;
        left: 1.75em;
    }

    .gallery button.fancy a {
        font-size: 1.25em;
    }

    .gallery button.fancy .top-key {
        width: 1.8125rem;
    }

    .gallery button.fancy .bottom-key-1 {
        width: 1.8125rem;
    }

    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery button.fancy {
        width: 200px;
        padding: .75em 1em;
    }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {

    .gallery .gallery-content p,
    .gallery .gallery-content-2 p {
        font-size: var(--text-small-p);
    }

    .overlay h3 {
        font-size: var(--text-title-l);
    }

    .gallery button.fancy {
        width: 225px;
        padding: .85em 1.1em;
    }

    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {

    .gallery .gallery-content p,
    .gallery .gallery-content-2 p {
        font-size: var(--text-small-p);
    }

    .overlay h3 {
        font-size: var(--text-l);
    }

    .gallery button.fancy {
        width: 250px;
        padding: 1em 1.25em;
    }
}

/* Ensure overlay is visible on all devices */
.gallery-item.touch-active .overlay,
.gallery-item:hover .overlay {
    opacity: 1 !important;
}

.gallery-item img,
.gallery-item.touch-active img,
.gallery-item:hover img {
    -webkit-transform: scale(1.05) !important;
    transform: scale(1.05) !important;
    opacity: .9 !important;
}

@media (hover: none) {
    .gallery-item img {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }

    .gallery-item.touch-active img {
        -webkit-transform: scale(1.05);
        transform: scale(1.05);
        opacity: .9;
    }
}