/* assets/css/style.css */

/* --- IMPOSTAZIONI GLOBALI --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

/* --- CONTENITORE PRINCIPALE DI TUTTO IL SITO --- */
.main-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- CLASSE HELPER SECONDARIA (per padding interno) --- */
.container {
    width: 100%;
    padding: 0 2rem;
    position: relative;
}



/* --- STILE HERO SECTION --- */
#hero {
    width: 100%;
    height: 650px;
    position: relative;
    background-image: url('../images/landing/Hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
}

@media (min-width: 768px) {
    #hero {
        padding-left: 20%;
    }
}

@media (min-width: 992px) {
    #hero {
        margin-top: -60px; 
        padding-top: 60px;
        padding-left: 30%;
    }
}

.hero-title {
    font-size: clamp(1.4rem, 5vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    max-width: 90%;
    line-height: 1.2;
    text-align: left;
    margin: 0;
    padding: 0;
    animation: fade-in-bounce 1s ease-out 0.5s forwards;
    opacity: 0;
}

@media (min-width: 768px) {
    .hero-title {
        max-width: 70%;
    }
}

@keyframes fade-in-bounce {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    60% {
        opacity: 1;
        transform: translateX(5px); 
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- STILE MOTTO SECTION --- */
#motto {
    min-height: 250px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1,42rem;
}

#motto .motto-text {
    color: #000000;
    font-size: clamp(1.2rem, 4vw, 1.9rem);
    font-weight: 500;
    line-height: 1.7;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    #motto .motto-text {
        font-weight: 300;
    }
}

#motto .container {
    padding: 0 1rem;
}

/* --- STILE LA VISION SECTION --- */
#la-vision {
    background-color: #ffffff;
    padding: 3rem 0;
    position: relative;
}

@media (min-width: 768px) {
    #la-vision {
        padding: 5rem 0;
    }
}

@media (min-width: 992px) {
    #la-vision {
        padding: 80px 0;
    }
}

#la-vision .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 0 1rem 0 0; 
}

@media (min-width: 992px) {
    #la-vision .container {
        flex-direction: row;
        gap: 4rem;
        padding: 0 2rem 0 0; 
    }
}

.vision-image-wrapper {
    flex: 1;
    max-width: 100%;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1), opacity 1s ease;
}

@media (min-width: 992px) {
    .vision-image-wrapper {
        max-width: 500px;
        transform: translateX(-100%);
        margin-left: 0; 
    }
}

.vision-image {
    width: 100%;
    height: auto;
    display: block;
}

.vision-content {
    flex: 1;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1), opacity 1s ease;
    transition-delay: 0.3s;
    padding: 0 1.5rem;
    text-align: center;
}

@media (min-width: 992px) {
    .vision-content {
        padding: 0;
        padding-left: 2rem;
        text-align: left;
    }
}

#la-vision.animate .vision-image-wrapper,
#la-vision.animate .vision-content {
    opacity: 1;
    transform: none;
}

#la-vision .vision-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
    line-height: 1.2;
}

#la-vision .vision-text {
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.6;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    max-width: 100%;
}

@media (min-width: 992px) {
    #la-vision .vision-text {
        max-width: 500px;
    }
}

#la-vision .vision-text p {
    margin-bottom: 1.2rem;
}

#la-vision .vision-text p:last-child {
    margin-bottom: 0;
}

#la-vision .btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #4D5766;
    color: #ffffff;
    border: 2px solid #4D5766;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

/* Linee di Layout - Solo desktop */
#la-vision .line-layout {
    display: none;
}

@media (min-width: 992px) {
    #la-vision .line-layout {
        display: block;
        position: absolute;
        background-color: #000000;
        opacity: 0;
        transition: opacity 0.8s ease 0.6s;
    }

    #la-vision.animate .line-layout {
        opacity: 0.6;
    }

    #la-vision .line-layout-h {
        height: 1px;
        right: 0;
        top: 2.2rem;
        width: 0;
        transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
        position: absolute;
    }

    #la-vision.animate .line-layout-h {
        opacity: 1;
        width: 54%;
    }

    #la-vision .line-layout-v {
        width: 1px;
        height: auto;
        right: -2rem;
        top: 0;
        bottom: 0;
    }
}

/* --- STILE FOTOGALLERY SECTION --- */
#fotogallery {
    height: auto;
    min-height: 300px;
    background-color: #ffffff;
    padding: 1rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    #fotogallery {
        height: 508px;
        padding: 0;
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 10px;
    width: 100%;
    height: 100%;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-large {
    transform: translateY(50px);
}

@media (min-width: 768px) {
    .gallery-item-large {
        grid-row: 1 / 3;
        transform: translateX(-100%);
    }
}

.gallery-item-small-1,
.gallery-item-small-2 {
    transform: translateY(50px);
}

@media (min-width: 768px) {
    .gallery-item-small-1 {
        transform: translateX(100%);
    }

    .gallery-item-small-2 {
        transform: translateX(100%);
        transition-delay: 0.2s;
    }
}

#fotogallery.animate .gallery-item {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- STILE COSA FACCIAMO SECTION --- */
#cosa-facciamo {
    padding: 3rem 0;
    background-color: #ffffff;
}

@media (min-width: 992px) {
    #cosa-facciamo {
        padding: 80px 0;
    }
}

#cosa-facciamo .container {
    padding: 0 1rem;
}

@media (min-width: 992px) {
    #cosa-facciamo .container {
        padding: 0 4rem;
    }
}

.what-we-do-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
    height: auto;
}

@media (min-width: 992px) {
    .what-we-do-layout {
        flex-direction: row;
        gap: 5rem;
        height: 600px;
    }
}

.what-we-do-left {
    flex: 1;
    width: 100%;
}

@media (min-width: 992px) {
    .what-we-do-left {
        width: 50%;
    }
}

#cosa-facciamo .section-title {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: #333;
    text-align: center; 
}

@media (min-width: 992px) {
   #cosa-facciamo .section-title {
        text-align: left;
    }
}

#cosa-facciamo .section-title .highlight {
    color: #4D5766;
}

.what-we-do-images {
    margin-top: 2rem;
    position: relative;
    height: 250px;
}

@media (min-width: 768px) {
    .what-we-do-images {
        height: 350px;
    }
}

@media (min-width: 992px) {
    .what-we-do-images {
        height: 400px;
    }
}

.what-we-do-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.what-we-do-image.is-active {
    opacity: 1;
    transform: translateY(0);
}

.what-we-do-right {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    align-items: flex-start;
    padding-right: 0;
}

@media (min-width: 992px) {
    .what-we-do-right {
        width: 50%;
        overflow-y: auto;
        align-items: flex-end;
    }
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 100%;
    padding-top: 1rem;
    width: 100%;
}

@media (min-width: 992px) {
    .accordion {
        max-width: 450px;
        padding-top: 120px;
    }
}

.accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #DBDBDB;
    cursor: pointer;
}

.accordion-item.is-open {
    background-color: #DBDBDB;
    border-color: #DBDBDB;
    border-bottom: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.accordion-trigger {
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (min-width: 768px) {
    .accordion-trigger {
        padding: 0.3rem 1.5rem;
    }
}

.accordion-trigger h3 {
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 400;
    color: #333;
}

.accordion-trigger .highlight {
    color: #4D5766;
}

.accordion-icon {
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    flex-shrink: 0;
}

.accordion-item.is-open .accordion-icon {
    transform: rotate(45deg);
}

.accordion-icon::before, .accordion-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background-color: #888;
    transform: translate(-50%, -50%);
}

.accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-panel-wrapper {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: max-height 0.8s ease-in-out, opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.accordion-panel-wrapper.is-active {
    max-height: 1000px; 
    opacity: 1;
    transform: translateY(0);
}

.accordion-panel {
    background-color: #ffffff;
    border: 1px solid #ffffff;
    padding: 1rem;
}

@media (min-width: 768px) {
    .accordion-panel {
        padding: 1.5rem;
    }
}

.accordion-content {
    color: #666;
    line-height: 1.7;
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.what-we-do-right .btn-cta {
    margin-top: 2rem;
    align-self: center;
}

@media (min-width: 992px) {
    .what-we-do-right .btn-cta {
        align-self: flex-end;
    }
}

/* --- STILE SERVIZI SECTION --- */
#servizi {
    padding: 3rem 0;
    background-color: #ffffff;
    border-top: 1px solid #f0f0f0;
}

@media (min-width: 992px) {
    #servizi {
        padding: 80px 0;
    }
}

.services-header {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0 1rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 2rem;
}

@media (min-width: 992px) {
    .services-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0 60px;
        margin-bottom: 80px;
        padding-bottom: 40px;
    }
}

.services-header-title {
    flex-basis: 100%;
}

@media (min-width: 992px) {
    .services-header-title {
        flex-basis: 40%;
    }
}

.services-header-title h2 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    text-align: center; 
}

@media (min-width: 992px) {
    .services-header-title h2 {
        text-align: left;
    }
}

.services-header-title .highlight {
    color: #4D5766;
    font-weight: 700;
}

.services-header-text {
    flex-basis: 100%;
    color: #666;
    max-width: 100%;
    text-align: center; 
}

@media (min-width: 992px) {
    .services-header-text {
        flex-basis: 50%;
        max-width: 450px;
        text-align: left; /
    }
}

.services-list {
    padding: 0 1rem;
}

@media (min-width: 992px) {
    .services-list {
        padding: 0 60px;
    }
}

.service-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 0;
    border-bottom: 1px solid #e0e0e0;
}

@media (min-width: 768px) {
    .service-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 3rem 0;
    }
}

@media (min-width: 992px) {
    .service-item {
        padding: 60px 0;
    }
}

.service-item:last-child {
    border-bottom: none;
}

.service-item-text {
    flex-basis: 100%;
    order: 2;
}

@media (min-width: 768px) {
    .service-item-text {
        flex-basis: 45%;
        order: 1;
    }
}

.service-item-text h3 {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.arrow-icon {
    width: 24px;
    height: 24px;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .arrow-icon {
        width: 32px;
        height: 32px;
        margin-left: 1rem;
    }
}

.service-item:hover .arrow-icon {
    transform: translateX(5px);
}

.service-item-text p {
    color: #666;
    max-width: 100%;
}

@media (min-width: 768px) {
    .service-item-text p {
        max-width: 350px;
    }
}

.service-item-image {
    flex-basis: 100%;
    height: 120px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    order: 1;
}

@media (min-width: 768px) {
    .service-item-image {
        flex-basis: 55%;
        height: 150px;
        border-radius: 20px;
        order: 2;
    }
}

.service-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- STILE TRAGUARDI SECTION --- */
#traguardi {
    padding: 3rem 0;
    background-color: #f9f9f9;
    border-top: 1px solid #f0f0f0;
}

@media (min-width: 992px) {
    #traguardi {
        padding: 80px 0;
    }
}

.achievements-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 0 1rem;
}

@media (min-width: 992px) {
    .achievements-container {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
        padding: 0 2rem;
    }
}

.achievements-title-wrapper {
    flex-basis: 100%;
    position: relative;
    padding-right: 0;
    text-align: center;
}

@media (min-width: 992px) {
    .achievements-title-wrapper {
        flex-basis: 45%;
        padding-right: 4rem;
        text-align: right;
    }
}

.achievements-title-wrapper .section-title {
    /* MODIFICA: Uniformato a "Cosa facciamo" */
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2; /* Line-height aggiornato per coerenza */
}

/* Linee - Solo desktop */
.achievements-title-wrapper::after,
.achievements-title-wrapper::before {
    display: none;
}

@media (min-width: 992px) {
    .achievements-title-wrapper::after {
        content: '';
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 60px;
        height: 2px;
        background-color: #000000;
    }

    .achievements-title-wrapper::before {
        content: '';
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 24em;
        width: 2px;
        background-color: #000000;
    }
}

.achievements-stats-wrapper {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    .achievements-stats-wrapper {
        flex-basis: 55%;
        gap: 1.5rem;
    }
}

.stat-item {
    padding-bottom: 2rem;
    position: relative;
    text-align: center;
}

@media (min-width: 992px) {
    .stat-item {
        padding-bottom: 1.5rem;
        text-align: left;
    }
}

.stat-item:last-child {
    padding-bottom: 0;
}

.stat-value {
    font-size: clamp(2.3rem, 6vw, 4rem);
    font-weight: 700;
    color: #4D5766;
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.stat-description {
    font-size: clamp(1.05rem, 2vw, 1.15rem);
    color: #666;
    max-width: 100%;
}

@media (min-width: 768px) {
    .stat-description {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (min-width: 992px) {
    .stat-description {
        margin: 0;
    }
}

/* --- STILE GOOGLE REVIEWS SECTION --- */
#google-reviews {
    padding: 3rem 0;
    background-color: #ffffff;
}

@media (min-width: 992px) {
    #google-reviews {
        padding: 80px 0;
    }
}

#google-reviews .container {
    padding: 0 2rem;
}

@media (min-width: 992px) {
    #google-reviews .container {
        padding: 0 80px;
    }
}

#google-reviews .section-title {
    text-align: center;
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 300;
    margin-bottom: 3rem;
}

@media (min-width: 992px) {
    #google-reviews .section-title {
        margin-bottom: 4rem;
    }
}

#google-reviews .section-title .highlight {
    color: #4D5766;
    font-weight: 700;
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.review-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    min-height: 300px;
    height: auto;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
}

@media (min-width: 768px) {
    .review-card {
        padding: 2rem;
        min-height: 400px;
    }
}

@media (min-width: 992px) {
    .review-card {
        height: 450px;
    }
}

.review-card.expanded {
    height: auto;
    overflow: visible;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.review-stars {
    font-size: 1rem;
    color: #ffc107;
}

@media (min-width: 768px) {
    .review-stars {
        font-size: 1.1rem;
    }
}

.review-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #888;
}

@media (min-width: 768px) {
    .review-source {
        font-size: 0.9rem;
    }
}

.review-source svg {
    fill: #4D5766;
    width: 18px;
    height: 18px;
}

@media (min-width: 768px) {
    .review-source svg {
        width: 20px;
        height: 20px;
    }
}

.review-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .review-text {
        font-size: 1rem;
    }
}

.read-more-btn {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: #4D5766;
    font-weight: 400;
    cursor: pointer;
    margin-top: 0.5rem;
    padding: 0;
}

@media (min-width: 768px) {
    .read-more-btn {
        font-size: 0.9rem;
    }
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
}

@media (min-width: 768px) {
    .review-author {
        gap: 1rem;
    }
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .author-avatar {
        width: 48px;
        height: 48px;
    }
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .author-name {
        font-size: 1rem;
    }
}

.author-title {
    font-size: 0.8rem;
    color: #888;
}

@media (min-width: 768px) {
    .author-title {
        font-size: 0.85rem;
    }
}

.find-more-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
    font-size: 0.95rem;
    color: #156EE6;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .find-more-link {
        text-align: right;
        font-size: 1rem;
    }
}

.find-more-link:hover {
    transform: translateX(5px);
}

/* Aggiungi questo alla fine del tuo file CSS */
body.menu-aperto .main-wrapper {
    overflow-x: visible;
}

/* Opzionale ma consigliato: impedisce lo scroll della pagina sotto il menu aperto */
body.menu-aperto {
    overflow: hidden;
}