/* CSS Document */


/* =====================================
   PHOTO GALLERY - VINTAGE ROCK STYLE
===================================== */

.gallery-page {
    padding: 30px 35px 50px;
    box-sizing: border-box;
}

/* Gallery heading */

.gallery-heading {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-heading > span {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #777;
}

.gallery-heading h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 52px;
    letter-spacing: 3px;
    color: #171717;
    margin: 5px 0;
}

.gallery-accent {
    width: 70px;
    height: 4px;
    background: #A83A2C;
    margin: 12px auto;
    border-radius: 4px;
}

.gallery-heading p {
    font-family: 'Lato', sans-serif;
    font-size: 17px;
    color: #555;
}

/* Gallery grid */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    max-width: 1350px;
    margin: 0 auto;
}

/* Individual photo */

.gallery-item {
    margin: 0;
    padding: 12px 12px 15px;

    background: #F4EBDD;
    border: 1px solid #D7C8B4;
    border-radius: 5px;

    box-shadow: 0 5px 12px rgba(0,0,0,0.15);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* Slightly irregular photo arrangement */

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

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

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

.gallery-item:hover {
    transform: translateY(-6px) rotate(0);
    box-shadow: 0 12px 25px rgba(0,0,0,0.22);
    z-index: 2;
}

/* Image button */

.gallery-image {
    position: relative;
    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    padding: 0;
    border: none;
    overflow: hidden;

    background: #202B2D;
    cursor: zoom-in;
}

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

    object-fit: cover;

    transition: transform 0.4s ease;
}

.gallery-image:hover img {
    transform: scale(1.06);
}

/* Zoom symbol */

.gallery-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;

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

    width: 35px;
    height: 35px;

    background: rgba(22,75,88,0.9);
    color: white;

    border-radius: 50%;
    font-size: 26px;

    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image:hover .gallery-zoom {
    opacity: 1;
}

/* Photo caption */

.gallery-item figcaption {
    display: flex;
    gap: 12px;
    align-items: center;

    padding: 12px 4px 0;

    font-family: 'Bebas Neue', sans-serif;
    font-size: 17px;
    letter-spacing: 1px;
    color: #202B2D;
}

.gallery-item figcaption span {
    color: #A83A2C;
}

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

.gallery-lightbox {
    display: none;

    position: fixed;
    inset: 0;
    z-index: 99999;

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

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

    padding: 60px 90px;
    box-sizing: border-box;
}

.gallery-lightbox.open {
    display: flex;
}

.gallery-lightbox > img {
    max-width: 100%;
    max-height: 85vh;

    object-fit: contain;

    border: 5px solid #F4EBDD;
    border-radius: 5px;

    box-shadow: 0 0 35px rgba(0,0,0,0.5);
    animation: galleryZoom 0.25s ease;
}

@keyframes galleryZoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Close button */

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 30px;

    background: none;
    border: none;

    color: white;
    font-size: 45px;
    cursor: pointer;
}

/* Navigation arrows */

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    background: #28566B;
    color: white;

    border: none;
    border-radius: 50%;

    width: 48px;
    height: 48px;

    font-size: 22px;
    cursor: pointer;

    transition: background 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #A83A2C;
}

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}

/* Image counter */

.lightbox-counter {
    position: absolute;
    bottom: 20px;

    color: white;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
}

/* =====================================
   RESPONSIVE
===================================== */

@media (max-width: 900px) {

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .gallery-page {
        padding: 25px 20px 35px;
    }
}

@media (max-width: 550px) {

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .gallery-page {
        padding: 20px 12px 30px;
    }

    .gallery-heading h1 {
        font-size: 42px;
    }

    .gallery-lightbox {
        padding: 55px 45px;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }

    .lightbox-close {
        right: 15px;
        top: 5px;
    }
}
