body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/*-------------------------------------------------------------------------------------------------------------------------------*/


section {
    border-bottom: solid #ffffff 5px;
}



/*-------------------------------------------------------*/

.menubar {
    height: 50px;
    margin-top: 7px;
    width: calc(100% - 10px);
    margin-left: 5px;
    border-radius: 1rem;
    z-index: 9999;
    position: fixed;
    background: rgba(255, 255, 255, .8);
    /*background: rgba(0, 0, 0, 1);*/
    display: flex;
    box-sizing: border-box;
}

.menubar img {
    margin-top: 5px;
    margin-left: 10px;
    height: 40px;
}

.menubarcontainer {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    text-align: right;


}

.menubar a {
    font-family: "Space Grotesk", sans-serif;
    opacity: 1;
    line-height: 50px;
    text-decoration: none;
    color: black;
    margin-left: 10px;
    margin-right: 20px;
}

.nav-link.active {
    text-decoration: underline;
}

/*-------------------------------------------------------*/


.title {
    background: rgba(34, 34, 59, 1);
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 100vh;
    border-top: 0;
}

.mainTitle {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 400;
    font-size: 60px;
    margin-bottom: 0;
    color: white;
    text-align: center;
}

.socials {
    padding-top: 15px;
    width: 100%;
    max-height: 48px;
    text-align: center;
}

.socials a {
    display: inline-block;
    text-align: center;
    padding-left: 5px;
    padding-right: 5px;
    width: 48px;
    height: 48px;
}

.socials a:hover {
    opacity: 70%;
}

.socials img {
    transform: translate(0, 50%);
    width: 24px;
    height: 24px;
}

.subtitle {
    font-family: "Space Grotesk", sans-serif;
    font-style: light;
    font-weight: 300;
    margin-bottom: 0;
    color: white;
    text-align: center;
}


.explore {
    padding-top: 10px;
    width: 100%;
    text-align: center;
}

.explore button {
    border: none;
    text-decoration: none;
    color: rgb(20, 20, 20);
    background-color: rgb(255, 255, 255);
    font-size: 15px;
    font-family: "Space Grotesk", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    padding: 15px;
    border-radius: 1rem;
    pointer-events: unset;
}

.explore button:hover {
    color: rgb(50, 50, 50);
    background-color: rgb(225, 225, 225);
    cursor: pointer;
}

.explore button:active {
    color: rgb(50, 50, 50);
    background-color: rgb(225, 225, 225);
}


/*GALLERIA*/
.container {
    max-width: 1224px;
    width: 90%;
    margin: auto;
    padding: 40px 0;
}

.titleGallery {
    margin-bottom: 2rem;
}

.photo-gallery {
    display: flex;
    gap: 20px;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.photo img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
}



@media screen and (max-width: 900px) {
    .mainTitle {
        font-size: xx-large;
    }

    .subtitle {
        font-size: large;
    }

    .contact {
        font-size: x-large;
    }
}




@media(max-width: 768px) {
    .photo-gallery {
        flex-direction: column;
    }
}




/* CARICAMENTO ONLINE DATABASE & PREMIUM STYLING */

.container {
    box-sizing: border-box;
    max-width: 1400px;
    /* Slightly wider for modern screens */
    margin: 0 auto;
    padding: 40px 20px;
}

/* MASONRY LAYOUT - 3 COLUMNS FIXED */
.photo-gallery {
    display: block;
    /* CRITICAL: Overrides any previous flex/grid rules */
    column-count: 3;
    /* Request: 3 columns on desktop */
    column-gap: 30px;
    /* Spacing between columns */
    margin-top: 40px;
    width: 100%;
}

/* Individual Photo Card */
.photo-item {
    break-inside: avoid;
    margin-bottom: 30px;
    width: 100%;
    /* Force full width in column */

    /* Card Styling */
    border-radius: 16px;
    background-color: rgba(30, 30, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;

    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: zoom-in;
}

/* Image styling */
.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.7s ease;
}

/* Hover Effects */
.photo-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(100, 200, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 2;
}

.photo-item:hover img {
    transform: scale(1.05);
}

/* No Photos Message */
.no-photos {
    text-align: center;
    color: white;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.5rem;
    margin-top: 50px;
    padding: 60px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* MODAL STYLES */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.98);
    /* Almost solid black for focus */
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 60px;
    font-weight: 200;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.close:hover {
    color: white;
    transform: rotate(90deg);
}


.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    /* Ensure full image is visible */
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}


/* Responsive */
@media (max-width: 1200px) {
    .photo-gallery {
        column-count: 2;
        /* 2 Columns on Tablet/Small Laptop */
    }
}

@media (max-width: 900px) {
    .mainTitle {
        font-size: xx-large;
    }

    .subtitle {
        font-size: large;
    }

    .contact {
        font-size: x-large;
    }
}

@media (max-width: 768px) {
    .photo-gallery {
        column-count: 1;
        /* 1 Column on Mobile */
    }

    .container {
        padding: 40px 15px;
    }

    .close {
        top: 20px;
        right: 20px;
        font-size: 40px;
    }

    .mainTitle {
        font-size: 2.2rem;
    }
}