/* ================= GALLERY & TEXT ================= */
.project-container {
    display: flex;
    width: 100%;
    /* padding-top: 10px; */
    padding-top: 35px;
    /* border: #fff 1px solid; */
}

.project-gallery {
    flex-grow: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
    margin-right: 0px;
    /* height: calc(100vh - 181px); */
    height: calc(100vh - 163px); /* Occupa quasi tutto lo schermo meno header e footer */
    max-height: 90vh; /* Evita di superare lo schermo */
    width: 100%;
    overflow: hidden;
}

#gallery-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.2s ease-in-out; /* Transizione per il fade */
}
    
    #gallery-container img, 
    #gallery-container video {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        /* transition: opacity 0.2s; */
        z-index: 10;
    }

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.nav-button {
    position: absolute;
    background: rgba(0, 0, 0, 0);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 34px;
    width: max(15%, 160px);
    height: 75%;
    display: flex;
    align-items: center;
    border-radius: 0px;
    text-shadow: 4px 4px 10px rgba(0, 0, 0, 1);
    z-index: 20;    
    top: 50%;
    transform: translateY(-50%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 34px;
}

    .nav-button:hover { background: rgba(0, 0, 0, 0); }

.prev { left: -20px; }

.next { 
    right: -20px; 
    justify-content: flex-end;
}

/* ================= INFO ================= */
.project-info {
    flex: 0 1 auto;
    max-width: 400px;
    margin: 20px;
}

/* ================= TITLE ================= */
.project-title {
    display: flex;
    align-items: center;
    background-color: var(--bkg-color-2);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
}

#icon {
    width: 80px; 
    height: 80px; 
    object-fit: cover;
    border-radius: 25%; 
    margin-right: 20px;
    filter: drop-shadow(3px 3px 3px rgba(0, 0, 0, 0.3));
}

    .project-title h3 {
        color: white;
    }

    .project-title p {
        margin: 0px;
        margin-top: 5px;
    }

/* ================= DESCRIPTION ================= */
.project-description {
    background-color: var(--bkg-color-2);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
}

    .project-description h5 {
        font-size: 20px;
        margin: 0;
    }

#store-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px) {
    .project-container {
        flex-direction: column-reverse;
        align-items: center;
        gap: 10px;
    }

    .project-info {
        flex: 1;
        max-width: 800px;
        margin: 20px;
        margin-bottom: 10px;
    }

        .project-title {
            padding: 25px;
        }

        #icon {
            width: 64px; 
            height: 64px; 
            object-fit: cover;
            border-radius: 25%; 
            margin-right: 10px;
        }

        .project-description {
            padding: 25px;
        }

    .project-gallery {
        flex-grow: none;
        height: 125vw; /* lascia un quadrato disponibile */
        max-height: none;
        margin: 0px;
        margin-bottom: 35px;
    }
}

/* Riduci i padding per il portrait */
@media (max-width: 768px) {
    .nav-button { font-size: 24px; }

    .project-container { padding-top: 12px; }

    .project-info { padding-top: 60px; }

        .project-title { padding: 20px; }

        .project-description { padding: 20px; }
}
