@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --primary: #2e477e;
    --primary-light: #3d5ca3;
    --primary-dark: #1c2c4e;
    --secondary: #ffffff;
    --accent: #4a7bfe;
    --accent-light: #6a92ff;
    --text-dark: #333;
    --text-light: #ecf0f1;
    --bg-light: #f8f9fb;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --border-radius-sm: 10px;
    --border-radius-md: 15px;
    --border-radius-lg: 25px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: var(--bg-light);
}
/* General link style */
a {
    color: white;
    font-weight: bold;
    text-decoration: underline;
}
.container {
    max-width: 1300px;
    width: 92%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: rgba(46, 71, 126, 0.95);
    color: var(--text-light);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

header.scrolled {
    background-color: rgba(46, 71, 126, 0.95);
    padding: 12px 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    width: auto; /* Mantiene le proporzioni originali */
    height: 75px; /* Regola l'altezza dell'header */
    max-width: 100%; /* Evita che l'immagine sia più grande del contenitore */
    object-fit: contain; /* Assicura che l'immagine si adatti senza essere ritagliata */
    display: block; /* Evita spazi indesiderati */
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-light);
}

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: var(--transition);
    padding: 8px 0;
    position: relative;
    display: block;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-light);
    transition: var(--transition);
    opacity: 0.8;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--accent-light);
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-light);
    background: none;
    border: none;
}

/* Hero Section */
.hero {
    background-image: url(fotosfondo.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(46, 71, 126, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.17, 0.67, 0.3, 0.96);
}

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.6rem;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    max-width: 800px;
    font-weight: 400;
}

.btn {
    display: inline-block;
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: #fff;
    padding: 16px 35px;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 10px 20px rgba(46, 71, 126, 0.3);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(to right, var(--accent), var(--primary-light));
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(74, 123, 254, 0.4);
}

/* Chi Siamo Section */
.chi-sono {
    background: linear-gradient(135deg, #f5f7fa 0%, #e2e9f3 100%);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.chi-sono::before,
.chi-sono::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(46, 71, 126, 0.03) 0%, rgba(74, 123, 254, 0.05) 100%);
    z-index: 0;
}

.chi-sono::before {
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
}

.chi-sono::after {
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
}

.chi-sono-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.chi-sono-image {
    flex: 1;
    padding-right: 40px;
    transform: translateY(0);
    transition: transform 0.5s ease;
    max-width: 450px;
}

.chi-sono-image:hover {
    transform: translateY(-10px);
}

.chi-sono-image img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.chi-sono-image img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

/* Logo with dynamic effect */
.logo-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 35px rgba(46, 71, 126, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #f0f3f9 100%);
    padding: 10px;
    border: 1px solid rgba(74, 123, 254, 0.1);
    transition: all 0.6s cubic-bezier(0.17, 0.67, 0.3, 0.96);
}

.logo-frame:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 0 20px 40px rgba(46, 71, 126, 0.35);
    border-color: rgba(74, 123, 254, 0.3);
}

.logo-effect {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shine 6s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    20%, 100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.chi-sono-content {
    flex: 2;
}

.chi-sono-content a {
    color: var(--accent);
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.chi-sono-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.chi-sono-content a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.chi-sono h2 {
    font-size: 3.2rem;
    background: linear-gradient(to right, var(--primary-dark), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    position: relative;
    font-weight: 700;
    line-height: 1.2;
}

.chi-sono h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    margin-top: 15px;
    border-radius: 2px;
}

.chi-sono p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #34495e;
    margin-bottom: 20px;
}

.highlight {
    color: var(--primary);
    font-weight: bold;
}

.info-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius-md);
    padding: 35px;
    margin-top: 40px;
    box-shadow: var(--shadow-md);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(46, 71, 126, 0.08);
    backdrop-filter: blur(5px);
}

.info-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.info-box h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.info-box h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), transparent);
    border-radius: 3px;
}

.info-box ul {
    list-style-type: none;
    padding: 0;
}

.info-box li {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    padding: 5px 0;
}

.info-box li:hover {
    transform: translateX(8px);
}

.info-box i {
    margin-right: 20px;
    color: var(--primary);
    font-size: 1.3rem;
    background: linear-gradient(135deg, rgba(46, 71, 126, 0.1) 0%, rgba(74, 123, 254, 0.1) 100%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.info-box li:hover i {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 6px 15px rgba(46, 71, 126, 0.25);
}

/* Services Section */
.services {
    padding: 120px 0;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, #e2e9f3, transparent);
    z-index: 1;
    pointer-events: none; /* Aggiunto per permettere interazione */
}

.services::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(46, 71, 126, 0.03) 0%, rgba(74, 123, 254, 0.05) 100%);
    right: -150px;
    bottom: -150px;
    z-index: 0;
}

.services-inner {
    position: relative;
    z-index: 2;
}

.services h2 {
    text-align: center;
    margin-bottom: 70px;
    font-size: 3.2rem;
    background: linear-gradient(to right, var(--primary-dark), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    font-weight: 700;
}

.services h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    margin: 15px auto 0;
    border-radius: 2px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    align-items: stretch;
}

.service-item {
    background: rgba(255, 255, 255, 1);
    padding: 50px 35px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border: 1px solid rgba(46, 71, 126, 0.08);
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: var(--text-dark); /* Aggiunto colore testo esplicito */
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, rgba(74, 123, 254, 0.05), transparent);
    transition: height 0.5s ease;
    z-index: -1;
}

.service-item:hover::before {
    height: 100%;
}

.service-item:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-lg);
}

.service-item i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 30px;
    transition: transform 0.5s ease, color 0.5s ease;
    background: linear-gradient(135deg, rgba(46, 71, 126, 0.1) 0%, rgba(74, 123, 254, 0.1) 100%);
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 35px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.service-item:hover i {
    transform: scale(1.1) rotate(5deg);
    color: var(--accent);
    background: linear-gradient(135deg, rgba(46, 71, 126, 0.15) 0%, rgba(74, 123, 254, 0.15) 100%);
    box-shadow: 0 12px 25px rgba(74, 123, 254, 0.15);
}

.service-item h3 {
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.service-item h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 3px;
}

.service-item p {
    color: #333; /* Cambiato da #555 a #333 per un colore più scuro */
    font-size: 1.1rem;
    line-height: 1.8;
    font-weight: 400; /* Aggiunto peso font */
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 50px;
    border: none;
    width: 90%;
    max-width: 550px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.8) translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.17, 0.67, 0.3, 0.96);
    position: relative;
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close {
    position: absolute;
    right: 25px;
    top: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.05);
}

.close:hover,
.close:focus {
    color: var(--primary);
    background-color: rgba(46, 71, 126, 0.1);
    text-decoration: none;
}

.modal h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.modal h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 3px;
}

.modal p {
    margin-bottom: 35px;
    font-size: 1.15rem;
    color: #555;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    padding: 20px 30px;
    border-radius: var(--border-radius-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 170px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.contact-btn i {
    font-size: 32px;
    margin-bottom: 12px;
}

.contact-btn span {
    font-weight: 600;
    font-size: 1.1rem;
}

.whatsapp-btn {
    background: linear-gradient(to right, #25D366, #128C7E);
}

.whatsapp-btn:hover {
    background: linear-gradient(to right, #22c55e, #0f7a6c);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
}

.email-btn {
    background: linear-gradient(to right, var(--primary), var(--primary-light));
}

.email-btn:hover {
    background: linear-gradient(to right, var(--primary-light), var(--accent));
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(46, 71, 126, 0.3);
}

/* Animation classes */
@keyframes fadeInUp {
    from {
        opacity: 1;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animated {
    opacity: 0;
}

.fadeInUp {
    animation: fadeInUp 0.8s cubic-bezier(0.17, 0.67, 0.3, 0.96) forwards;
}

.fadeIn {
    animation: fadeIn 1.2s ease forwards;
}

/* Delay classes */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.3s;
}

.delay-3 {
    animation-delay: 0.5s;
}

.delay-4 {
    animation-delay: 0.7s;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 3.8rem;
    }
    
    .chi-sono h2, 
    .services h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.2rem;
    }
    
    .hero p {
        font-size: 1.4rem;
    }
    
    .chi-sono-container {
        flex-direction: column;
    }
    
    .chi-sono-image {
        padding-right: 0;
        margin-bottom: 50px;
        max-width: 350px;
        margin: 0 auto 50px;
    }
    
    .service-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .chi-sono h2, 
    .services h2 {
        font-size: 2.5rem;
    }
    
    .chi-sono {
        padding: 100px 0;
    }
    
    .services {
        padding: 100px 0;
    }
}

@media (max-width: 768px) {
    .nav-container {
        position: relative;
    }
    .logo {
        margin-right: auto; /* Spinge il logo verso sinistra solo su mobile */
    }
    nav ul {
        flex-direction: column;
        background-color: rgba(46, 71, 126, 0.95);
        position: absolute;
        top: 100%;
        right: 0;
        width: 250px;
        padding: 20px;
        gap: 1rem;
        border-radius: var(--border-radius-sm);
        box-shadow: var(--shadow-md);
        backdrop-filter: blur(10px);
        transform: translateY(20px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 1000;
    }
    
    nav#mainNav.active ul {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        padding: 12px 0;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    nav ul li:last-child a {
        border-bottom: none;
    }
    
    .mobile-menu-btn {
        display: block;
        margin-left: 15px; /* Aggiunge spazio a sinistra del pulsante */
        padding: 8px; /* Aumenta l'area cliccabile */
    }
    
    .hero {
        height: 70vh;
        min-height: 400px;
        padding-top: 70px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }
    
    .chi-sono h2, 
    .services h2 {
        font-size: 2.3rem;
    }
    
    .service-item {
        padding: 35px 25px;
    }
    
    .service-item i {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }
    
    .chi-sono {
        padding: 80px 0;
    }
    
    .services {
        padding: 80px 0;
    }
    
    .info-box {
        padding: 30px 25px;
    }
    
    .modal-content {
        padding: 40px 30px;
        margin: 15% auto;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2.3rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .btn {
        font-size: 1.0rem;
        padding: 14px 28px;
    }
    
    .chi-sono h2, 
    .services h2 {
        font-size: 2rem;
    }
    
    .chi-sono p,
    .service-item p {
        font-size: 1rem;
    }
    
    .info-box li {
        margin-bottom: 15px;
    }
    
    .info-box i {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin-right: 15px;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .contact-btn {
        width: 100%;
        padding: 15px 25px;
    }
    
    .modal h2 {
        font-size: 1.8rem;
    }
    
    .modal p {
        font-size: 1rem;
    }
    
    .service-item h3 {
        font-size: 1.4rem;
    }
    
    .info-box h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .chi-sono h2, 
    .services h2 {
        font-size: 1.8rem;
    }
    
    .service-item i {
        width: 85px;
        height: 85px;
        font-size: 2.5rem;
    }
}

/* Parallax effect */
@media (min-width: 769px) {
    .hero {
        background-attachment: fixed;
    }
}
footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-info {
    font-size: 0.95rem;
    line-height: 1.8;
}
.no-phone-link {
    text-decoration: none !important;
    color: inherit !important;
    pointer-events: none;
    cursor: text;
}