/* ====== GRIGLIA PORTFOLIO ====== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ====== SINGOLO PROGETTO ====== */
.portfolio-item {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
}

/* ====== LOGO PROGETTO ====== */
.portfolio-logo {
    text-align: center;
    margin-bottom: 1rem;
}

.portfolio-logo-img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.portfolio-logo-img:hover {
    transform: scale(1.05);
}

/* ====== TITOLO ====== */
.portfolio-title {
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    color: #222;
    display: block;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* ====== DESCRIZIONE ====== */
.portfolio-excerpt p,
.portfolio-description {
    font-size: 16px;
    color: #444;
    line-height: 1.4;
    margin-bottom: 1rem;
    text-align: center;
}

/* ====== GALLERIA IMMAGINI ====== */
.portfolio-gallery {
    position: relative;
    width: 100%;
    /* height: 200px; */
    margin-top: 1rem;
}

.swiper-wrapper {
    display: flex;
}

.swiper-slide {
    flex: 0 0 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Swiper controls */
.swiper-button-next,
.swiper-button-prev {
    color: #333;
}

.swiper-pagination {
    bottom: 10px;
}

/* ====== RESPONSIVE: TABLET ====== */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .portfolio-thumbnail {
        height: 160px;
    }

    .portfolio-title {
        font-size: 18px;
    }

    .portfolio-description,
    .portfolio-excerpt p {
        font-size: 15px;
    }

    .portfolio-logo-img {
        max-width: 70px;
        max-height: 70px;
    }
}

/* ====== RESPONSIVE: MOBILE STRETTO ====== */
@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-thumbnail {
        height: 140px;
    }

    .portfolio-title {
        font-size: 16px;
    }

    .portfolio-description,
    .portfolio-excerpt p {
        font-size: 14px;
    }

    .portfolio-logo-img {
        max-width: 60px;
        max-height: 60px;
    }
}
