/* Define CSS custom properties (variables) for scrollbar colors */
:root {
    --scrollbar-thumb-color: #00c5e8;
    /* Color of the scrollbar thumb (handle) */
    --scrollbar-track-color: #f3f3f3;
    /* Color of the scrollbar track (background) */
}



/* Style the scrollbar and its thumb and track */
/* For WebKit-based browsers (Chrome, Safari) */
::-webkit-scrollbar {
    width: 12px;
    /* Width of the scrollbar */
}

::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-color);
    border-radius: 6px;
    /* Rounded corners for the scrollbar thumb */
}

::-webkit-scrollbar-thumb:hover {
    background-color: #008cd3;
    /* Color when hovering over the scrollbar thumb */
}

::-webkit-scrollbar-track {
    background-color: var(--scrollbar-track-color);
}

h1 {
    color: #ffffff;
    font-family: 'Helvetica', sans-serif;
    font-size: 62px;
    font-weight: 400;
    line-height: 72px;
    margin: 0 0 24px;
    text-align: center;
    text-transform: uppercase;
}


h2 {
    color: #ffffff;
    font-family: 'Helvetica', sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 36px;
    margin: 0 0 24px;
    text-align: center;
    text-transform: uppercase;
}


p {
    color: #f8f8f8;
    font-family: 'Helvetica', sans-serif;
    font-size: 22px;
    font-weight: 200;
    line-height: 32px;
    margin: 0 0 24px;
}


a {
    color: #c8c8c8;
    text-decoration: underline;
}


a:hover {
    color: #1c1c1c;
    text-decoration: underline;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    /* Prevent scrolling on the body itself */
}

body {
    width: 100%;
    color: white;
    font-weight: bold;
    margin: 0;
    padding: 0;
    background-color: #a2d5f2;
    background-image: url('background.png');
    background-size: cover;
    /* This will make sure the image covers the entire container */
    background-position: center;
    /* This will center the image in the container */
    background-repeat: no-repeat;
    background-attachment: fixed;
}

#albums-container {
    max-width: 70%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    /* Center vertically */
    padding: 20px;
    margin: 0 auto;
}


.album {
    border: 4px solid white;
    background: rgba(8, 163, 184, 0.2);
    /* Semi-transparent white background */
    backdrop-filter: blur(10px);
    /* Apply a blur to the background */
    text-align: center;
    transition: box-shadow 0.3s ease-in-out;
    position: relative;
    cursor: pointer;
    width: calc(50% - 40px);
    max-width: 600px;
    margin: 10px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #333;
    /* Text color */
}



.album:before {
    content: '';
    display: block;
    padding-top: 100%;
}

.album-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 10px;
}

.album:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}



/* Styles for the gallery once an album is chosen */
#gallery {
    display: none;
    /* Gallery is hidden by default */
    max-width: 1050px;
    margin: 0 auto;
    padding: 90px 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: 250px;
    gap: 5px;
    grid-auto-flow: dense;
}

.image-box {
    background-color: #d7d7d8;
    overflow: hidden;
    position: relative;
}

.image-box:nth-child(7n + 1) {
    grid-column: span 2;
    grid-row: span 2;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-box:hover img {
    transform: scale(1.1);
}

/* Styles for back-button */
#back-button-container {
    position: fixed;
    /* Fixed position relative to the viewport */
    top: 10px;
    left: 10px;
    z-index: 1000;
    width: 100px;
    height: 100px;
}

#back-button {
    padding: 10px 20px;
    color: white;
    background-color: transparent;
    border: none;
    cursor: pointer;
    filter: invert(100%);
    display: flex; /* Use flex layout to center the image inside the button */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */

}

#back-button img {
    max-width: 100%; /* Limit the image width to not exceed the button size */
    max-height: 100%; /* Limit the image height to not exceed the button size */
}




/* Additional media query adjustments for smaller screens */
@media (max-width: 820px) {
    ::-webkit-scrollbar {
        width: 8px;
        /* Width of the scrollbar */
    }

    h1 {
        font-size: 62px;
        font-weight: 800
    }


    h2 {
        font-size: 24px;
    }


    p {
        font-size: 18px;
    }

    .album {
        width: calc(100% - 40px);
        /* Full width on smaller screens */
    }
}

@media (max-width: 480px) {
    #gallery {
        grid-template-columns: 1fr;
    }

    .image-box:nth-child(7n + 1) {
        grid-column: unset;
        grid-row: unset;
    }

    .album {
        width: calc(100% - 20px);
        /* Full width on smaller screens */
    }

    h1 {
        font-size: 62px;
        font-weight: 800
    }


    h2 {
        font-size: 20px;
    }


    p {
        font-size: 16px;
    }
}

@media (min-width: 1024px) {
    #gallery {
        max-width: 1000px;
    }
}

/* Medium screens (tablets) */

@media (max-width: 1023px) {
    #gallery {
        max-width: 1000px;
    }
}

/* Small screens (phones) */

@media (max-width: 767px) {
    #gallery {
        max-width: 600px;
    }
}

.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    /* Above everything else */
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: 70%;
    /* or 100% if you want the image to be as large as possible */
    /* max-height: 100%; Adjust the percentage as needed */
    display: block;
    /* This makes sure it respects max-width and max-height */
    margin: auto;
    /* This will help center the image if it's not filling the container */
}

/* Stile per tablet e smartphone */
@media screen and (max-width: 768px) {
    .modal-content img {
        max-width: 100%;
        object-fit: cover;
        display: block;
        margin: 0 auto;
    }

}


.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    background: none;
    border: none;
}

.prev-image,
.next-image {
    position: absolute;
    top: 50%;
    font-size: 30px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    filter: invert(100%);
}


.prev-image {
    left: 30px;
    width: 30px;
    /* Adjust the size as needed */
}

.next-image {
    right: 60px;
    width: 30px;
    /* Adjust the size as needed */
}

.close-modal img,
.prev-image img,
.next-image img {
    width: 50px;
    /* Adjust the size as needed */
    height: auto;
}

@media (max-width: 768px) {

    .prev-image img,
    .next-image img {
        display: none;
    }

    .close-modal img{
        width: 30px;
        /* Adjust the size as needed */
        height: auto;
    }
}