:root {
    --primary: #0b3954;
    --accent: #E63946;
    --accent-light: #A4161A;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f7fafc;
    --border-light: #e5e5e5;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

/* === BODY & BASE === */
body {
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 60%);
    color: var(--text-dark);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* === HEADER & NAV === */
header {
    background: #ffffff;
    padding: clamp(3px, 2.5vw, 10px);
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0;
}

nav ul li.logo img {
    height: clamp(2rem,4vw,80px);
    width: auto;
}

nav ul li {
    margin-left: px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: clamp(0.8rem, 1.2vw, 1.2rem);
    letter-spacing: clamp(0.1px, 0.3vw, 0.5px);
    transition: color 0.3s ease;
}

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

/* Mobile logo centrato (nascosto su desktop) */
.logo-center {
    display: none;
}

/* Hamburger button (nascosto su desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animazione X quando aperto */
.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        position: relative;
    }

    /* Mostra hamburger e logo centrale */
    .hamburger {
        display: flex;
    }

    .logo-center {
        display: block;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo-center img {
        height: clamp(2.7rem, 4vw, 80px);
        width: auto;
    }

    /* Menu a tendina */
    nav ul {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        box-shadow: var(--shadow);
        border-top: 1px solid var(--border-light);
        padding: 8px 0;
        z-index: 100;
    }

    nav ul.open {
        display: flex;
    }

    /* Nasconde il logo nella lista su mobile */
    nav ul li.logo {
        display: none;
    }

    nav ul li {
        width: 100%;
        margin: 0;
    }

    nav ul li a {
        display: block;
        padding: 12px 24px;
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        border-bottom: 1px solid var(--border-light);
    }

    nav ul li:last-child a {
        border-bottom: none;
    }
}

/* === CAROUSEL === */
.carousel {
    position: relative;
    width: 100%;
    height: clamp(1.8rem, 63vw, 65vh); 
    overflow: hidden;
}

.carousel-track-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s ease-in-out;
    list-style: none;
    padding: 0;
    margin: 0;
}

.carousel-slide {
    min-width: 100%;
    height: clamp(1.8rem, 63vw, 65vh);   
}

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

/* Overlay carousel */
.carousel-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    background: rgba(255, 255, 255, 0.80);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 55%;
    padding: 40px;
    min-height: 100px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    animation: popIn 0.9s ease-out forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.6);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.carousel-overlay h2 {
    color: var(--accent);
    font-family: 'Poppins', 'Segoe UI', sans-serif;

    font-size: clamp(1.8rem, 1.8vw, 3.5rem);
    letter-spacing: clamp(1px, 0.3vw, 2px);

    font-weight: 700;
    margin: 0 0 clamp(8px, 1.5vw, 16px) 0;

    text-transform: uppercase;
}

.carousel-overlay h3 {
    color: var(--text-dark);
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

@media (max-width: 800px) {
    .main-section {
        height: 60vh;
        position: relative;
    }

    /* Nasconde il carosello su mobile */
    .carousel-track-container {
        display: none;
    }

        .carousel-overlay {
        width: 80%;
        height: 65%;
        padding: clamp(30px, 6vw, 40px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Immagine fissa mobile */
    .carousel::after {
        content: "";
        position: absolute;
        inset: 0;
        background: url('../cartella immagini/foto_mobile.jpg') center center / cover no-repeat;
        z-index: 0;
    }

    .carousel {
        position: relative;
        height: 100%;
    }

    .carousel-overlay {
        position: relative;
        z-index: 2;
        padding: clamp(16px, 4vw, 24px);
    }

    .carousel-overlay h2 {
        font-size: clamp(0.9rem, 5.5vw, 1.6rem);
        margin-bottom: 10px;
    }

    .carousel-overlay h3 {
        font-size: clamp(0.72rem, 3.5vw, 1.2rem);
        line-height: 1.5;
    }
}



/* === ABOUT SECTION === */
.about-section {
    width: 100%;
    padding: 
        clamp(10px,2vw,48px)
        clamp(16px, 3vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    color: var(--text-dark);
}

.about-section .content {
    max-width: 1100px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.about-section h1 {
    font-size: clamp(1.8rem, 2.5vw, 3rem);
    font-weight: 700;
    margin: 0 0 36px 0;
    text-align: left;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.about-section section p {
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
    color: var(--text-light);
    line-height: 1.9;
    margin: 0 0 20px 0;
}

.about-section h2 {
    font-size: clamp(1rem,1.5vw,2rem);
    font-weight: 600;
    margin: 10px 0 8px 0;
    color: var(--primary);
    position: relative;
    padding-bottom: 10px;
}

.about-section h2::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
    border-radius: 3px;
    margin-top: 10px;
}

.about-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
}

.about-section li {
    padding: 18px 0;
    color: var(--text-dark);
    font-size: clamp(1.05rem, 1vw, 1rem);
    line-height: 1.7;
}

.about-section strong {
    font-weight: 600;
    color: var(--primary);
}

hr.separator {
    width: 80%;
    max-width: 1100px;
    height: 2px;
    border: none;
    background: linear-gradient(90deg, transparent, var(--border-light) 40%, var(--border-light) 60%, transparent);
    margin: 0 auto 40px;
    border-radius: 2px;
}

/* === HERO SECTION === */
.hero-section {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #0d4a6f 100%);
    color: #ffffff;
    padding: 
        clamp(40px, 4vw, 100px) 
        clamp(16px, 3vw, 20px);   
    text-align: center;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(230, 57, 70, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: central;
    z-index: 1;
    opacity: 0;
    transform: translateY(60px);
    animation: slideUp 1.2s ease-out forwards;
}

.hero-section h2 {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    font-weight: 700;
    line-height: 1.6;
    margin: 0 auto 25px auto;
    padding: 15px;
    color: #ffffff;

    letter-spacing: 1px;

    text-align: center;
    max-width: 1300px; /* più spazio orizzontale */
}

.hero-btn {
    display: inline-block;
    margin-top: clamp(30px, 4vw, 40px);
    padding: 
        clamp(12px, 1vw, 15px) 
        clamp(24px, 1vw, 50px);
    font-size: 1.5rem;
    font-weight: 600;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.4);
    border: 2px solid transparent;
}

.hero-btn:hover {
    background-color: #ffffff;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.35);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {

    .hero-section h2 {
        font-size: clamp(1rem, 5.5vw, 1.6rem);
        line-height: 1.7;
        letter-spacing: 1px;
        max-width: 80%;
        margin: 0 auto 20px auto;
        text-align: center;
    }

    .hero-content {
        font-size: clamp(0.9rem, 5.5vw, 1.3rem);
    }
    
    .hero-content h2{
        font-size: clamp(0.9rem, 5.5vw, 1.6rem);
    }

    .hero-btn {
        margin-top: 12px;
        padding: 8px 20px;
        font-size: 1.3rem;
    }
}

/* === RESPONSABILI (TEAM) === */
.responsabili {
    width: 100%;
    padding: 100px 20px;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-light) 100%);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    border-top: 3px solid var(--accent);
}

.responsabili h2 {
    text-align: center;
    font-size: clamp(1.8rem, 2vw, 3rem);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 60px 0;
    color: var(--primary);
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 25px;
}

.responsabili h2::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin: 15px auto 0;
}

.responsabili-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 90px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.profilo {
    flex: 1 1 260px;
    min-width: 260px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.profilo:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(11, 57, 84, 0.12);
}

.profilo img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.15);
    border: 4px solid var(--bg-light);
}

.profilo p {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.3rem;
    line-height: 1.7;
}

.profilo b {
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
    font-size: 1.6rem;
}

/* === INFO SECTION === */
.info-section {
    width: 100%;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    gap: 100px;
    flex-wrap: wrap;
    background: linear-gradient(180deg, var(--bg-light) 0%, #ffffff 100%);
    border-top: 3px solid var(--accent);
}

.info-box {
    max-width: 300px;
    text-align: center;
    padding: 32px 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-top: 4px solid var(--accent);
}

.info-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(230, 57, 70, 0.12);
}

.info-box img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.info-box h3 {
    font-size: clamp(1.6rem, 0.5vw, 1rem);
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

.info-box a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.info-box a:hover {
    color: var(--accent);
    font-weight: 600;
}

/* === CONTACTS SECTION === */
.contacts {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    color: var(--text-dark);
}

.contacts h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 40px 0;
    text-align: center;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.contact-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-info a {
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent);
}

.map-link {
  color: inherit;
  text-decoration: none;
}

.map-link:hover p {
  color: #E63946;
  cursor: pointer;
}

/* === CONTACT FORM === */
.contact-form {
    background: #fafafa;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

input,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 1.2rem;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 57, 84, 0.1);
    outline: none;
}

.btnContact {
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btnContact:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
}



.descrizione {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
}

/* === KEY POINTS === */
.key-points {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    font-family: "Inter", "Helvetica Neue", sans-serif;
}

.key-points li {
    position: relative;
    padding: 16px 16px 16px 48px;
    margin: 12px 0;
    background: #fafafa;
    border-radius: 10px;
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.key-points li::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.key-points li:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

/* === FOOTER === */
.footer {
    width: 100%;
    min-height: 40vh;
    background-color: #1a1a1a;
    color: #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 60px 40px;
    font-family: "Inter", sans-serif;
}

.footer-column {
    flex: 1;
    text-align: center;
    line-height: 1.8;
}

.footer-column h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.footer-column p,
.footer-column li {
    font-size: clamp(0.9rem, 1vw, 1.2rem);
    margin: 10px 0;
    opacity: 0.85;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent);
    opacity: 1;
}

@media (max-width: 768px) {
    .footer {
        flex-direction: column;
        align-items: center;
        padding: 40px 24px;
        gap: 36px;
    }

    .footer-column {
        width: 100%;
    }
}

.copyright{
    text-align: center;
    padding: 8px 0;
    color: #ffffff;
}
