/* ------------------------------
   VARIABILI CSS
-------------------------------- */
:root {
    --primary-color: #d61116; /* Rosso principale */
    --primary-color-dark: #ba1818; /* Rosso scuro */
    --secondary-color: #000000; /* Nero */
    --text-color: #333333; /* Testo principale */
    --background-color: #f8f7f7; /* Colore di sfondo */
    --font-family-primary: "Montserrat", sans-serif;
    --font-family-secondary: "Stilson", serif;
    --overlay-color: rgba(0, 0, 0, 0.6);
    --overlay-color-light: rgba(0, 0, 0, 0.3);
}

/* ------------------------------
   HERO SEZIONE - CHI SIAMO
-------------------------------- */
.hero-chi-siamo {
    background: url('../images/hero-chi-siamo.webp') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    transition: height 0.3s ease;
}

.hero-overlay {
    background: var(--overlay-color);
    padding: 40px;
    border-radius: 10px;
    max-width: 800px;
    margin: 0 20px;
    animation: fadeIn 1s ease-in-out;
}

.hero-chi-siamo h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 15px;
    font-family: var(--font-family-secondary);
}

.hero-chi-siamo p {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-family: var(--font-family-primary);
    color: #f0f0f0;
}

/* Animazione Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsività per Hero Sezione */
@media (max-width: 768px) {
    .hero-chi-siamo {
        height: auto;
        padding: 20px 0;
    }

    .hero-overlay {
        padding: 20px;
        max-width: 90%;
    }

    .hero-chi-siamo h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .hero-chi-siamo p {
        font-size: 0.9rem;
    }
}

/* ------------------------------
   SEZIONE CHI SIAMO
-------------------------------- */
.chi-siamo {
    padding: 60px 0;
    background-color: #ffffff;
    text-align: center;
    margin-top: 40px;
}

.chi-siamo h2 {
    margin-bottom: 30px;
    font-family: var(--font-family-secondary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.chi-siamo .intro-text {
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #555555;
    font-family: var(--font-family-primary);
}

.chi-siamo-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 40px;
}

.chi-siamo-item {
    flex: 1 1 300px;
    max-width: 350px;
    min-width: 280px;
    text-align: center;
    background-color: #fafafa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chi-siamo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.chi-siamo-item .img-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.chi-siamo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

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

.chi-siamo-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-family: var(--font-family-secondary);
}

.chi-siamo-item p {
    font-size: 1rem;
    color: #555555;
    line-height: 1.6;
    font-family: var(--font-family-primary);
}

/* Responsività per Chi Siamo */
@media (max-width: 992px) {
    .chi-siamo-content {
        gap: 20px;
    }
    
    .chi-siamo-item {
        flex: 1 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .chi-siamo {
        padding: 40px 0;
    }
    
    .chi-siamo h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .chi-siamo-content {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .chi-siamo-item {
        max-width: 100%;
        width: 100%;
        min-width: unset;
        margin-bottom: 0;
    }

    .chi-siamo-item img {
        height: 200px;
    }
}

/* ------------------------------
   SEZIONE SERVIZI
-------------------------------- */
.servizi {
    padding: 60px 0;
    background-color: #f8f7f7;
    text-align: center;
}

.servizi h2 {
    margin-bottom: 30px;
    font-family: var(--font-family-secondary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.servizi .intro-text {
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #555555;
    font-family: var(--font-family-primary);
}

.servizi-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
}

.servizi-item {
    flex: 1 1 300px;
    max-width: 350px;
    min-width: 280px;
    text-align: center;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.servizi-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.servizi-item .img-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.servizi-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

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

.servizi-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.servizi-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-family: var(--font-family-secondary);
}

.servizi-item p {
    font-size: 1rem;
    color: #555555;
    line-height: 1.6;
    font-family: var(--font-family-primary);
    flex: 1;
}

/* Responsività per Servizi */
@media (max-width: 992px) {
    .servizi-content {
        gap: 20px;
    }
    
    .servizi-item {
        flex: 1 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .servizi {
        padding: 40px 0;
    }
    
    .servizi h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .servizi-content {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .servizi-item {
        max-width: 100%;
        width: 100%;
        min-width: unset;
        margin-bottom: 0;
    }

    .servizi-item .img-container {
        height: 200px;
    }
}

/* ------------------------------
   GALLERIA FOTO STORICHE
-------------------------------- */
.foto-storiche {
    padding: 60px 0;
    background-color: #f0f0f0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.foto-storiche::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/texture-bg.webp') repeat;
    opacity: 0.05;
    z-index: 0;
}

.foto-storiche .container {
    position: relative;
    z-index: 1;
}

.foto-storiche h2 {
    margin-bottom: 20px;
    font-family: var(--font-family-secondary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.foto-storiche .intro-text {
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #555555;
    font-family: var(--font-family-primary);
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 15px;
    margin-bottom: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-img-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: brightness(0.95);
}

.gallery-item:hover .gallery-img-container img {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0) 100%);
    color: white;
    padding: 20px 15px;
    text-align: left;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-year {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover .gallery-year {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.gallery-overlay p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

.gallery-item:hover .gallery-overlay p {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive per la galleria */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 220px;
    }
}

@media (max-width: 768px) {
    .foto-storiche {
        padding: 40px 0;
    }
    
    .foto-storiche h2 {
        font-size: 2rem;
    }
    
    .gallery-grid {
        gap: 10px;
    }
    
    .gallery-item.wide,
    .gallery-item.tall {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    
    .gallery-overlay {
        padding: 15px 10px;
    }
    
    .gallery-year {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    .gallery-overlay p {
        font-size: 0.9rem;
    }
}
        .spacer {
            height: 30px;
            width: 100%;
            background-color: transparent;
        }