 @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@200,700&family=Source+Sans+Pro:wght@300,600&display=swap');
 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
 }
 
 html {
     scroll-behavior: smooth;
 }
 
 body {
     font-family: 'Source Sans Pro', sans-serif;
     background: #15242B;
     color: #ffffff;
     line-height: 1.65;
     overflow-x: hidden;
 }
 
 body.is-loading .hero-content {
     opacity: 0;
 }


 /* Sponsors */
 
 .sponsors-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
     gap: 2rem;
     align-items: center;
     margin-top: 2rem;
 }
 
 .sponsors-grid a {
     display: flex;
     align-items: center;
     justify-content: center;
     padding: 1rem;
     background: rgba(255, 255, 255, 0.02);
     border: 1px solid rgba(255, 255, 255, 0.04);
     border-radius: 8px;
     transition: transform 0.25s ease, box-shadow 0.25s ease;
 }
 
 .sponsors-grid img {
     max-width: 100%;
     max-height: 80px;
     height: 80px;
     object-fit: contain;
     filter: grayscale(100%);
     opacity: 0.9;
     transition: filter 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
 }
 
 .sponsors-grid a:hover {
     transform: translateY(-6px);
     box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
 }
 
 .sponsors-grid a:hover img {
     filter: none;
     opacity: 1;
     transform: scale(1.03);
 }


 /* Header */
 
 header {
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     background: rgba(30, 30, 30, 0.95);
     backdrop-filter: blur(10px);
     padding: 1rem 2rem;
     z-index: 1000;
     transition: all 0.3s ease;
 }
 
 header.scrolled {
     box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
     background: rgba(30, 30, 30, 0.98);
 }
 
 nav {
     display: flex;
     justify-content: space-between;
     align-items: center;
     max-width: 1400px;
     margin: 0 auto;
 }
 
 .logo {
     font-family: 'Raleway', sans-serif;
     font-size: 1.2rem;
     font-weight: 700;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     color: #ffffff;
     text-decoration: none;
 }
 
 .nav-links {
     display: flex;
     gap: 2rem;
     list-style: none;
     align-items: flex-end;
 }
 
 .nav-links a,
 .nav-links button {
     color: #ffffff;
     text-decoration: none;
     font-size: 0.85rem;
     font-weight: 600;
     letter-spacing: 0.05em;
     text-transform: uppercase;
     transition: all 0.3s ease;
     position: relative;
     /*  Attributi aggiunti per il pulsante di cambio lingua così che abbia lo stesso stile
                degli altri pulsanti che sono <a> */
     border: none;
     background: none;
     cursor: pointer;
     padding: 0;
 }
 
/* Ensure emoji flags render correctly by providing emoji-capable font fallbacks */

.nav-links button {
    font-family: 'Segoe UI Emoji', 'Noto Color Emoji', 'Apple Color Emoji', sans-serif;
}


/* Flag image styling inside language button */

.nav-links button .flag {
    width: 20px;
    height: auto;
    margin-right: 0.5rem;
    vertical-align: middle;
}


/* Ensure emoji flags render correctly by providing emoji-capable font fallbacks */

 .nav-links a::after,
 .nav-links button::after {
     content: '';
     position: absolute;
     bottom: -5px;
     left: 0;
     width: 0;
     height: 2px;
     background: #9B0014;
     transition: width 0.3s ease;
 }
 
 .nav-links a:hover::after,
 .nav-links button:hover::after {
     width: 100%;
 }

 
 .nav-links #contattaci {
    color: #9B0014;
 }

 .nav-links #contattaci:hover:after {
    background: white;
 }
 
 .menu-toggle {
     display: none;
     cursor: pointer;
     padding: 0.5rem 1rem;
     border-radius: 5px;
     border: 2px solid rgba(255, 255, 255, 0.125);
     background: transparent;
     color: #ffffff;
     font-family: 'Raleway', sans-serif;
     font-size: 0.8rem;
     font-weight: 700;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     transition: all 0.3s ease;
 }
 
 .menu-toggle:hover {
     background: rgba(255, 255, 255, 0.05);
     border-color: #9B0014;
 }
 
 .menu-toggle i {
     margin-right: 0.5rem;
 }
 
 .menu-overlay {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(46, 49, 65, 0.8);
     backdrop-filter: blur(5px);
     z-index: 999;
 }

/* Organigram styling */

.organigram {
    max-width: 980px;
    margin: 2.5rem auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.02));
    border-radius: 12px;
    padding: 1rem 1.25rem 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(155, 0, 20, 0.08);
}

.organigram .section-title {
    margin: 0 0 0.75rem 0;
    text-align: center;
}

.organigram-wrap {
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 8px;
}

.organigram-wrap img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.organigram figcaption {
    margin-top: 0.75rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

@media (max-width: 720px) {
    .organigram {
        padding: 0.75rem;
    }
    .organigram .section-title {
        font-size: 1.05rem;
    }
}
 
 /* Hero Banner */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    background-image: url('../images/sfondo-hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: heroFadeIn 1.5s ease forwards;
    animation-delay: 0.3s;
}

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

.hero-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    animation: iconPulseIn 2s ease infinite;
    animation-delay: 1s;
    overflow: hidden;
}

.hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@keyframes iconPulseIn {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(155, 0, 20, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(155, 0, 20, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(155, 0, 20, 0);
    }
}

.hero h1 {
    font-family: 'Raleway', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0;
    animation: titleSlideIn 1s ease forwards;
    animation-delay: 0.6s;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.8;
    opacity: 0;
    animation: subtitleSlideIn 1s ease forwards;
    animation-delay: 0.9s;
}

@keyframes subtitleSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}


 /* Sections */
 
 .section {
     padding: 6rem 2rem;
     position: relative;
 }
 
 .section-alt {
     background: rgba(30, 30, 30, 0.5);
 }
 
 .section-inner {
     max-width: 1200px;
     margin: 0 auto;
 }
 
 .section-title {
     font-family: 'Raleway', sans-serif;
     font-size: 2rem;
     font-weight: 700;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     margin-bottom: 1rem;
     border-bottom: 2px solid rgba(255, 255, 255, 0.125);
     padding-bottom: 1rem;
 }
 /* Stats Counter */
 
 .stats-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
     gap: 3rem;
     margin-top: 3rem;
 }
 
 .stat-item {
     text-align: center;
 }
 
 .counter {
     font-size: 4rem;
     font-weight: 700;
     color: #9B0014;
     display: block;
     margin-bottom: 0.5rem;
 }
 
 .stat-label {
     font-family: 'Raleway', sans-serif;
     font-size: 0.9rem;
     font-weight: 700;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     color: rgba(255, 255, 255, 0.8);
 }


 /* Spotlight Section */
 
 .spotlight {
     display: flex;
     align-items: center;
     gap: 3rem;
     margin-bottom: 4rem;
 }
 
 .spotlight.reverse {
     flex-direction: row-reverse;
 }
 
 .spotlight-image {
     flex: 1;
     border-radius: 10px;
     overflow: hidden;
     box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
 }
 
 .spotlight-image img {
     width: 100%;
     height: auto;
     display: block;
     transition: transform 0.3s ease;
     object-fit: cover;
 }
 
 .spotlight-image:hover img {
     transform: scale(1.05);
 }
 
 .spotlight-content {
     flex: 1;
 }
 
 .spotlight-content h2 {
     font-family: 'Raleway', sans-serif;
     font-size: 1.5rem;
     font-weight: 700;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     margin-bottom: 1rem;
 }
 
 .spotlight-content ul {
     margin: 1rem 0;
     padding-left: 1.5rem;
 }
 
 .spotlight-content li {
     margin: 0.5rem 0;
     line-height: 1.6;
 }


 /* Rover Cards */
 
 .rovers-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
     gap: 2rem;
     margin-top: 3rem;
 }
 
 .rover-card {
     background: rgba(30, 30, 30, 0.6);
     border-radius: 10px;
     overflow: hidden;
     border: 2px solid rgba(255, 255, 255, 0.08);
     transition: transform 0.3s ease, box-shadow 0.3s ease;
 }
 
 .rover-card:hover {
     transform: translateY(-10px);
     border-color: #9B0014;
     box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
 }
 
 .rover-card img {
     width: 100%;
     height: 360px;
     object-fit: cover;
     display: block;
     transition: transform 0.45s cubic-bezier(.2, .8, .2, 1), filter 0.3s ease;
     filter: saturate(1.05) contrast(1.02);
 }
 
 .rover-card:hover img {
     transform: scale(1.06);
 }
 
 .rover-card-content {
     padding: 2rem;
 }
 
 .rover-card h3 {
     font-family: 'Raleway', sans-serif;
     font-size: 1.2rem;
     font-weight: 700;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     margin-bottom: 1rem;
 }


 /* Contact Form */
 
 .contact-section {
     background: linear-gradient(135deg, #15242B 0%, #1e1e1e 100%);
     padding: 6rem 2rem;
 }
 
 .contact-grid {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 4rem;
     max-width: 1200px;
     margin: 0 auto;
 }
 
 .form-group {
     margin-bottom: 1.5rem;
 }
 
 .form-group label {
     display: block;
     font-family: 'Raleway', sans-serif;
     font-size: 0.8rem;
     font-weight: 700;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     margin-bottom: 0.5rem;
 }
 
 .form-group input,
 .form-group textarea {
     width: 100%;
     padding: 0.75rem 1rem;
     background: rgba(255, 255, 255, 0.05);
     border: 2px solid rgba(255, 255, 255, 0.125);
     border-radius: 5px;
     color: #ffffff;
     font-family: inherit;
     font-size: 1rem;
     transition: border-color 0.3s ease;
 }
 
 .form-group input:focus,
 .form-group textarea:focus {
     outline: none;
     border-color: #9B0014;
 }
 
 .form-group textarea {
     resize: vertical;
     min-height: 120px;
 }
 
 .submit-btn {
     background: #9B0014;
     color: #ffffff;
     border: none;
     padding: 1rem 2.5rem;
     border-radius: 5px;
     font-family: 'Raleway', sans-serif;
     font-weight: 700;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     cursor: pointer;
     transition: all 0.3s ease;
     font-size: 0.9rem;
 }
 
 .submit-btn:hover {
     background: #b50018;
     transform: translateY(-2px);
     box-shadow: 0 5px 15px rgba(155, 0, 20, 0.4);
 }
 
 .contact-info {
     display: flex;
     flex-direction: column;
     gap: 2rem;
 }
 
 .contact-item {
     display: flex;
     align-items: flex-start;
     gap: 1rem;
 }
 
 .contact-icon {
     width: 40px;
     height: 40px;
     border: 2px solid rgba(255, 255, 255, 0.125);
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     flex-shrink: 0;
     color: #9B0014;
 }
 
 .contact-item a {
     color: #9B0014;
     text-decoration: none;
     transition: color 0.3s ease;
 }
 
 .contact-item a:hover {
     color: #b50018;
 }


 /* Footer */
 
 footer {
     background: rgba(30, 30, 30, 0.95);
     padding: 2rem;
     text-align: center;
     font-size: 0.9rem;
     color: rgba(255, 255, 255, 0.5);
 }


 /* Responsive */
 
 @media (max-width: 980px) {
     .nav-links {
         display: none;
     }
     .menu-toggle {
         display: inline-block;
     }
     .nav-links.active {
         display: flex;
         flex-direction: column;
         position: fixed;
         top: 5rem;
         left: 50%;
         transform: translateX(-50%);
         background: #9B0014;
         padding: 2.5rem 2rem;
         border-radius: 10px;
         z-index: 1000;
         box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
         gap: 0.5rem;
         min-width: 280px;
         max-height: calc(100vh - 7rem);
         overflow-y: auto;
         animation: menuSlideIn 0.3s ease;
     }
     @keyframes menuSlideIn {
         from {
             opacity: 0;
             transform: translateX(-50%) translateY(-20px);
         }
         to {
             opacity: 1;
             transform: translateX(-50%) translateY(0);
         }
     }
     .nav-links.active a,
     .nav-links.active button {
         padding: 1rem 1.5rem;
         width: 100%;
         border-radius: 5px;
         text-align: center;
         transition: all 0.2s ease;
     }
     .nav-links.active a::after,
     .nav-links.active button::after {
         display: none;
     }
     .nav-links.active a:hover,
     .nav-links.active button:hover {
         background: #7a0010;
         transform: translateX(5px);
     }
     .nav-links  #contattaci {
         color: #15242B;
     }
     .nav-links.active #contattaci:hover {
         background: white;
         transform: translateX(5px);
     }
     .menu-overlay.active {
         display: block;
         animation: fadeIn 0.3s ease;
     }
     @keyframes fadeIn {
         from {
             opacity: 0;
         }
         to {
             opacity: 1;
         }
     }
     .spotlight {
         flex-direction: column !important;
     }
     .contact-grid {
         grid-template-columns: 1fr;
         gap: 3rem;
     }
 }
 
 @media (max-width: 768px) {
     .hero h1 {
         font-size: 2rem;
     }
     .hero p {
         font-size: 1rem;
     }
     .hero-icon {
         width: 100px;
         height: 100px;
         font-size: 2.5rem;
     }
     .section {
         padding: 4rem 1.5rem;
     }
     .section-title {
         font-size: 1.5rem;
     }
     .rovers-grid {
         grid-template-columns: 1fr;
     }
     .stats-grid {
         gap: 2rem;
         grid-template-columns: 1fr;
     }
     .counter {
         font-size: 3rem;
     }
     .spotlight-content h2 {
         font-size: 1.3rem;
     }
     .scroll-indicator {
        bottom: 2rem;
    }
    .scroll-arrow {
        width: 25px;
        height: 40px;
    }
    .scroll-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 6rem 1rem 3rem;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .section {
        padding: 3rem 1rem;
    }
    .nav-links.active {
        min-width: 90%;
        padding: 2rem 1rem;
    }
    .counter {
        font-size: 2.5rem;
    }
}


/* Scroll Indicator */

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    animation: scrollIndicatorFade 1.5s ease forwards;
    animation-delay: 2s;
    opacity: 0;
}

@keyframes scrollIndicatorFade {
    to {
        opacity: 1;
    }
}

.scroll-text {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.scroll-arrow {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    position: relative;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #9B0014;
    border-radius: 50%;
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

@keyframes scrollDot {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.scroll-indicator:hover .scroll-arrow {
    border-color: #9B0014;
}

.scroll-indicator:hover .scroll-text {
    color: #9B0014;
}