@charset "utf-8";

/* Mobile */
@media only screen and (min-width: 0px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }

    header h1 {
        text-align: center;
        margin-bottom: 40px;
        font-size: 2.4em;
        color: #273a62;
        position: relative;
        display: inline-block;
        padding-bottom: 10px;
        animation: fadeInDown 1s ease-out;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    }

    header h1::after {
        content: '';
        position: absolute;
        width: 50%;
        height: 1px;
        background: #f1c40f;
        bottom: 0;
        left: 25%;
        border-radius: 2px;
    }

    .section-prodotto {
        display: flex;
        flex-direction: column;
        gap: 40px;
        align-items: center;
        margin-bottom: 60px;
        animation: fadeIn 1.2s ease-in;
    }

    .section-prodotto h3 {
        color: #273a62;
    }

    .section-prodotto p,
    .section-prodotto ul {
        color: #444;
    }

    .descrizione-prodotto p {
        margin-bottom: 20px;
        line-height: 1.6;
        text-align: justify;
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .descrizione-prodotto h3 {
        margin-top: 20px;
        margin-bottom: 10px;
        font-size: 1.4em;
    }

    .descrizione-prodotto ul {
        list-style: none;
        padding-left: 0;
        margin-bottom: 20px;
    }

    .descrizione-prodotto li {
        margin-bottom: 10px;
        display: flex;
        align-items: flex-start;
        gap: 15px;
        transition: transform 0.3s ease;
    }

    .descrizione-prodotto li:hover {
        transform: translateX(5px);
    }

    .section-prodotto .material-symbols-outlined {
        font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
        margin-right: 10px;
        color: #273a62;
        flex-shrink: 0;
        transition: color 0.3s ease;
    }

    .descrizione-prodotto li:hover .material-symbols-outlined {
        color: #e67e22;
    }

    .caratteristica {
        display: flex;
        flex-direction: column;
    }

    .titolo-caratteristica {
        font-weight: bold;
        font-size: 1.1em;
        margin-bottom: 5px;
    }

    .descrizione-caratteristica {
        font-size: 0.95em;
    }

    .immagine-prodotto img {
        width: 100%;
        max-width: 500px;
    }

    /* Animazioni */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(30px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Animazione entrata */
    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }


    /* Immagine panoramica */
    .section-panoramica {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out; 
    }

    .section-panoramica.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .immagine-panoramica img {
        width: 100%;
    }


    /* Galleria */

    .galleria {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 20px;
    }
    
    .immagine-galleria {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 4px;
        opacity: 0;
        transform: scale(0.95);
        transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.6s ease;;
    }
    
    .immagine-galleria.visible {
        opacity: 1;
        transform: scale(1);
    }
    .immagine-galleria.visible:hover{
        transform: scale(1.02);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    /* opzionale: leggero ritardo per effetto sequenziale */
    .immagine-galleria:nth-child(2) {
        transition-delay: 0.1s;
    }
    .immagine-galleria:nth-child(3) {
        transition-delay: 0.2s;
    }
    .immagine-galleria:nth-child(4) {
        transition-delay: 0.3s;
    }

}

/* Desktop */
@media only screen and (min-width: 769px) {
    .section-prodotto {
        flex-direction: row;
        justify-content: space-between;
    }

    .descrizione-prodotto,
    .immagine-prodotto {
        flex: 1 1 50%;
    }

    .descrizione-prodotto {
        padding-right: 40px;
    }

    .immagine-prodotto {
        animation: slideIn 1s ease;
    }

    .descrizione-prodotto h2 {
        font-size: 2.2em;
    }

    .galleria {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }

}