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

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 15px 0;
    z-index: 1000;
    display: none;
}

.cookie-banner.show {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-text {
    flex: 1;
    min-width: 280px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cookie-accept {
    background-color: #4CAF50;
    color: white;
}

.cookie-accept:hover {
    background-color: #45a049;
}

.cookie-info {
    background-color: transparent;
    border: 1px solid white;
    color: white;
}

.cookie-info:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Classe per dispositivi con notch o dynamic island */
body.has-notch {
    padding-top: calc(80px + env(safe-area-inset-top, 0));
}

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

section {
    padding: 80px 0;
    scroll-margin-top: 100px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #333;
    margin: 15px auto 0;
}

p {
    margin-bottom: 15px;
}

/* Stile per la pagina Cookie Policy */
.page-content {
    padding: 120px 0 60px;
}

.page-content h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.8rem;
}

.cookie-section {
    margin-bottom: 40px;
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.cookie-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: left;
}

.cookie-section h2:after {
    margin: 15px 0 0;
}

.cookie-section h3 {
    font-size: 1.4rem;
    margin: 25px 0 15px;
    color: #444;
}

.cookie-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.cookie-section li {
    margin-bottom: 10px;
}

a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #000;
}

.btn {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 12px 30px;
    border: 2px solid #333;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: #333;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    position: relative;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
    min-height: 100px;
    padding-top: env(safe-area-inset-top, 0); /* Supporto per Dynamic Island su iPhone 16 */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 80px;
    width: auto;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
        font-size: 0.9rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        position: relative;
        color: #333;
}

nav ul li a[href="#contatti"] {
    color: #0056b3;
    font-weight: 700;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #333;
    transition: width 0.3s ease;
}

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

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 10px;
    z-index: 1001;
    position: relative;
}

.menu-toggle.active {
    transform: rotate(90deg);
    color: #333;
}

@media (max-width: 768px) {
    header {
        position: relative;
        padding: 10px 0;
        height: 100px;
    }
    
    header .container {
        flex-wrap: wrap;
        justify-content: space-between;
        position: relative;
    }
    
    .logo {
        margin-right: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 15px;
        z-index: 1;
    }
    
    .logo img {
        max-height: 80px;
    }
    
    .menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 30px;
        font-size: 20px;
        z-index: 2;
    }
    
    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.2s ease;
        margin-top: 70px;
    }
    
    nav.active {
        max-height: none;
        background-color: rgba(255, 255, 255, 0.7);
        box-shadow: none;
        border: none;
        border-radius: 0;
        overflow: hidden;
        height: auto;
    }
    
    nav ul {
        flex-direction: column;
        padding: 0;
        background-color: transparent;
        box-shadow: none;
        max-height: none;
        overflow: visible;
    }
    
    nav ul li {
        margin: 0;
        margin-left: 0;
        text-align: center;
        height: auto;
    }
    
    nav ul li a {
        color: #333;
        font-weight: 500;
        padding: 5px 15px;
        display: block;
        font-size: 1.05em;
        letter-spacing: 0.5px;
        text-shadow: none;
        border-bottom: none;
        transition: all 0.2s ease;
    }
    
    nav ul li a:hover {
        background-color: rgba(0, 0, 0, 0.02);
        transform: none;
    }
    
    nav ul li a[href="#contatti"] {
        color: #333;
        font-weight: 500;
        text-shadow: none;
        font-size: 1.05em;
        text-decoration: none;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: flex-start;
    padding-top: 40px;
    background-color: #f8f8f8;
    position: relative;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('1a.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero img {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.hero h2 {
    font-size: 3.0rem;
    margin-bottom: 20px;
    color: #000;
    text-shadow: none;
}

.hero h2:after {
    display: none;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #000;
    text-shadow: none;
}

.hero .btn {
    background-color: #333;
    color: #fff;
    border: 2px solid #333;
    font-weight: 700;
    padding: 15px 35px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero .btn:hover {
    background-color: transparent;
    color: #333;
}

/* Services Section */
.services {
    background-color: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    text-align: center;
    padding: 30px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #333;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Projects Section */
.projects {
    background-color: #f8f8f8;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: #fff;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 250px;
    position: relative;
    overflow: hidden;
}

.image-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.image-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.image-carousel img.active {
    opacity: 1;
}

.project-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0,0 L100,100 M100,0 L0,100" stroke="%23ddd" stroke-width="1"/></svg>');
    background-size: 20px;
    z-index: 1;
    opacity: 0.3;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* About Section */
.about {
    background-color: #fff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-values {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.value {
    padding: 20px;
    border-left: 3px solid #333;
    background-color: #f8f8f8;
}

.value h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.value p {
    margin-bottom: 0;
}

/* Contact Section */
.contact {
    background-color: #f8f8f8;
}

.contact h2 {
    text-align: center;
    margin-bottom: 40px;
    font-weight: 600;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    background-color: #f8f8f8;
    border-radius: 5px;
    overflow: hidden;
}

.contact-info {
    display: flex;
    flex-direction: column;
    padding: 30px;
    background-color: #fff;
}

.contact-card {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-card:hover {
    background-color: #e0e0e0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-card i {
    font-size: 1.5rem;
    color: #333;
    margin-right: 15px;
}

.contact-card p {
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .contact-info {
        padding: 20px;
    }
    
    .contact-card {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .contact-card i {
        font-size: 1.2rem;
        margin-right: 10px;
    }
    
    .contact-card p {
        font-size: 0.9rem;
    }
}

.contact-social {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
}

.contact-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
    background-color: #f8f8f8;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-social a:hover {
    background-color: #333;
    color: #fff;
}

.contact-map {
    width: 100%;
    height: 100%;
    min-height: 250px;
    border-radius: 0;
    overflow: hidden;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .contact-map {
        min-height: 200px;
    }
}

/* Footer */
footer {
    background-color: #fff;
    color: #333;
    padding: 60px 0 20px;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
        margin-bottom: 20px;
        font-size: 0.9rem;
    }
    
    .footer-logo img {
        max-height: 45px;
    }
    
    .footer-links h4,
    .footer-social h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .footer-links ul li {
        margin-bottom: 5px;
    }
    
    .footer-social a {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        padding-top: 15px;
        font-size: 0.8rem;
    }
}

.footer-logo img {
    max-height: 60px;
    width: auto;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-links h4:after,
.footer-social h4:after,
.footer-info h4:after,
.footer-contact h4:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #333;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #666;
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    color: #000;
    padding-left: 5px;
}

.footer-info p,
.footer-contact p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-contact p a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact p a:hover {
    color: #0056b3;
}

.footer-info p {
    color: #666;
}

.footer-contact p i {
    margin-right: 8px;
    color: #333;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f5f5f5;
    border-radius: 50%;
    color: #333;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #333;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Careers Page Specific Styles */
.careers-hero {
    height: 60vh;
}

.careers-intro {
    background-color: #fff;
}

.careers-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-card {
    text-align: center;
    padding: 30px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.benefit-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #333;
}

.open-positions {
    background-color: #f8f8f8;
}

.positions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.position-card {
    background-color: #fff;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.position-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.position-location,
.position-type {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.position-location i,
.position-type i {
    margin-right: 10px;
}

.position-desc {
    margin: 15px 0 20px;
}

.application {
    background-color: #fff;
}

.application-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.application-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

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

.application-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.application-form input,
.application-form textarea,
.application-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    background-color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.application-form input:focus,
.application-form textarea:focus,
.application-form select:focus {
    border-color: #333;
    outline: none;
}

.application-form input[type="file"] {
    padding: 10px 0;
    border: none;
}

.checkbox {
    display: flex;
    align-items: center;
}

.checkbox input {
    width: auto;
    margin-right: 10px;
}

.checkbox label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    h2 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero img {
        max-width: 250px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .about-values {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .contact-info {
        padding: 20px;
    }
    
    .contact-card {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .contact-card i {
        font-size: 1.2rem;
        margin-right: 10px;
    }
    
    .contact-card p {
        font-size: 0.9rem;
    }
    
    .contact-map {
        min-height: 200px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    nav ul li a {
        font-size: 0.6rem;
    }
}

/* Banner LinkedIn - solo per la home page */
.linkedin-banner {
    background: #0077B5;
    padding: 8px 12px;
    color: #fff; /* Testo bianco per maggiore visibilità */
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: auto;
    z-index: 9999; /* Aumentato per assicurare che sia sopra tutti gli altri elementi */
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex !important; /* Forza la visualizzazione */
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Mostra il banner solo nella home page con animazione */
body.home .linkedin-banner {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Pulsante di chiusura */
.close-banner {
    position: absolute;
    top: 3px;
    right: 3px;
    background: transparent;
    color: #fff; /* X bianca per maggiore visibilità */
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

/* Link LinkedIn */
.linkedin-link {
    display: flex;
    align-items: center;
    color: #fff; /* Testo bianco per maggiore visibilità */
    text-decoration: none;
    background-color: #0077B5;
    border-radius: 20px;
    padding: 8px 16px;
    white-space: nowrap; /* Impedisce il testo di andare a capo */
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.linkedin-link:hover {
    background-color: #005fa3;
    transform: scale(1.05);
}

.linkedin-link i {
    font-size: 20px;
    margin-right: 8px;
}

.linkedin-link span {
    font-weight: 600;
}

/* Effetto hover sul link LinkedIn */
.linkedin-link:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .linkedin-banner {
        bottom: 20px;
        left: 10px;
        right: auto;
        padding: 6px 10px;
        width: auto;
        max-width: 90%;
    }
    
    .linkedin-link i {
        font-size: 18px;
        margin-right: 6px;
    }
    
    .linkedin-link span {
        font-size: 12px;
    }
    
    .close-banner {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .linkedin-banner {
        bottom: 20px;
        left: 10px;
        right: auto;
        padding: 5px 8px;
        padding-bottom: env(safe-area-inset-bottom, 10px); /* Supporto per iPhone 16 */
        padding-left: env(safe-area-inset-left, 10px); /* Supporto per iPhone 16 */
        width: auto;
        max-width: 85%;
    }
    
    /* Correzione per la mappa di Google su mobile */
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-map {
        min-height: 300px;
        width: 100%;
        display: block;
        margin-top: 20px;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .contact-map iframe {
        width: 100%;
        height: 300px;
        display: block;
    }
    
    /* Ulteriori ottimizzazioni per il footer su schermi molto piccoli */
    @media (max-width: 360px) {
        .footer-content {
            grid-template-columns: 1fr;
        }
    }
}

/* Ottimizzazione specifica per iPhone XR */
@media screen and (device-width: 414px) and (device-height: 896px) {
    .linkedin-banner {
        bottom: 25px;
        left: 15px;
        padding: 8px 12px;
    }
    
    .linkedin-link {
        padding: 4px 8px;
    }
    
    .linkedin-link i {
        font-size: 16px;
        margin-right: 4px;
    }
    
    .linkedin-link span {
        font-size: 12px;
    }
    
    /* Ottimizzazioni specifiche per iPhone XR */
    .contact-map {
        min-height: 250px;
    }
    
    .contact-map iframe {
        height: 250px;
    }
}
    
    /* Ottimizzazioni per iPhone 16 */
    footer {
        padding-bottom: env(safe-area-inset-bottom, 10px);
    }
    
    .footer-bottom {
        padding-bottom: env(safe-area-inset-bottom, 10px);
    }

/* Pulsante email fisso */
.email-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
}

.email-button:hover {
    background-color: #555;
    transform: scale(1.1);
}

@media (max-width: 480px) {
    header {
        height: 120px;
    }
    
    /* Fix per overflow orizzontale */
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    /* Ottimizzazione pulsante email */
    .email-button {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    /* Fix per il rendering del testo */
    * {
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
    }
    
    /* Ottimizzazioni specifiche per iPhone 11 e dispositivi simili */
  @media screen and (max-width: 414px) and (min-width: 375px), (max-width: 430px) and (min-width: 390px), (max-width: 932px) and (min-width: 430px) {
    /* Fix specifici per iPhone 11, iPhone 16, iPhone 16 Pro Max e dispositivi simili */
    .menu-toggle {
        width: 44px;
        height: 44px;
        padding: 10px;
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Migliora la visibilità del menu attivo */
    nav.active {
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    }
    
    /* Migliora la leggibilità del testo */
    nav ul li a {
        text-shadow: none;
        color: #333;
        font-weight: 600;
    }
    
    /* Ottimizzazione banner LinkedIn per iPhone 11, iPhone 16 e iPhone 16 Pro Max */
    .linkedin-banner {
        bottom: 20px;
        left: 10px;
        right: auto;
        padding: 5px 8px;
        z-index: 1001; /* Assicura che sia sopra altri elementi */
        padding-bottom: env(safe-area-inset-bottom, 10px); /* Supporto per iPhone 16 */
        padding-left: env(safe-area-inset-left, 10px); /* Supporto per iPhone 16 */
    }
    
    .linkedin-link {
        padding: 4px 8px;
    }
    
    .linkedin-link i {
        font-size: 16px;
        margin-right: 4px;
    }
    
    .linkedin-link span {
        font-size: 12px;
        font-weight: 700;
    }
    
    /* Ottimizzazione pulsante email per iPhone 11, iPhone 16 e iPhone 16 Pro Max */
    .email-button {
        bottom: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 18px;
        padding-bottom: env(safe-area-inset-bottom, 5px); /* Supporto per iPhone 16 */
        padding-right: env(safe-area-inset-right, 5px); /* Supporto per iPhone 16 */
    }
        header {
            height: 110px;
        }
        
        .logo img {
            max-height: 60px;
        }
        
        nav {
            margin-top: 80px;
        }
        
        .menu-toggle {
            top: 20px;
        }
        
        section {
            padding: 60px 0;
        }
        
        .container {
            padding: 0 15px;
        }
        
        .hero {
            padding-top: 30px;
        }
        
        .service-card, .project-card, .position-card {
            padding: 15px;
            margin-bottom: 15px;
        }
        
        /* Ottimizzazione font e elementi interattivi */
        p, li {
            font-size: 0.95rem;
            line-height: 1.5;
        }
        
        .btn {
            padding: 10px 20px;
            font-size: 0.9rem;
        }
        
        input, textarea, select {
            font-size: 16px; /* Previene lo zoom automatico su iOS */
            padding: 10px;
        }
        
        /* Miglioramento spaziatura elementi */
        .row {
            margin-bottom: 20px;
        }
        
        /* Ottimizzazione menu di navigazione */
        nav ul li {
            margin: 8px 0;
        }
        
        nav ul li a {
            font-size: 0.85rem;
            padding: 10px 0;
            display: block;
        }
        
        /* Miglioramento visualizzazione footer */
        .footer-content {
            gap: 2px;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            text-align: center;
        }
        
        .footer-logo {
            width: 100%;
            text-align: center;
            margin-bottom: 2px;
        }
        
        .footer-logo img {
            max-width: 70px;
        }
        
        .footer-info,
        .footer-links,
        .footer-contact,
        .footer-social {
            width: 45%;
            padding: 0 2px;
            margin-bottom: 2px;
            text-align: center;
        }
        
        .footer p, .footer li, .footer a {
            font-size: 0.65rem;
            margin: 1px 0;
            line-height: 1.1;
        }
        
        .footer h4 {
            font-size: 0.7rem;
            margin-bottom: 2px;
        }
        
        .footer-links h4:after,
        .footer-social h4:after,
        .footer-info h4:after,
        .footer-contact h4:after {
            left: 50%;
            transform: translateX(-50%);
        }
        
        .social-icons a {
            margin: 0 3px;
            font-size: 0.7rem;
            min-height: 30px;
            min-width: 30px;
        }
        
        .footer {
            padding: 5px 0 3px;
        }
        
        .footer-bottom {
            margin-top: 2px;
            padding-top: 2px;
            font-size: 0.6rem;
        }
        
        /* Ottimizzazione banner LinkedIn */
        .linkedin-banner {
            padding: 8px 12px;
            bottom: 15px;
            left: 15px;
            font-size: 13px;
        }
        
        .linkedin-link {
            padding: 6px 10px;
        }
        
        .close-banner {
            font-size: 16px;
            margin-left: 8px;
        }
        
        /* Ottimizzazione immagini e griglie */
        img {
            max-width: 100%;
            height: auto;
        }
        
        .services-grid, .projects-grid {
            gap: 15px;
        }
        
        /* Miglioramento touch targets per iOS */
        a, button, .btn, .menu-toggle {
            min-height: 44px;
            min-width: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        /* Ottimizzazione form */
        .form-group {
            margin-bottom: 15px;
        }
        
        /* Prevenzione overflow orizzontale */
        body {
            overflow-x: hidden;
            width: 100%;
        }
        
        /* Prevenzione overflow orizzontale */
        body {
            overflow-x: hidden;
            width: 100%;
        }
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero img {
        max-width: 150px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .service-card,
    .project-card,
    .position-card {
        padding: 20px;
    }
    
    .footer-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        text-align: center;
        gap: 10px;
    }
    
    .footer-links h4:after,
    .footer-social h4:after,
    .footer-info h4:after,
    .footer-contact h4:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer {
        padding: 15px 0 8px;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-bottom {
        margin-top: 8px;
        padding-top: 5px;
        font-size: 0.65rem;
    }
    
    .email-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
}
@media (max-width: 768px) {
    .menu-desktop {
        display: none;
    }
}

/* Menu responsivo per schermi molto piccoli */
@media (max-width: 480px) {
    /* Footer ancora più compatto per schermi molto piccoli */
    .footer {
        padding: 12px 0 5px;
    }
    
    .footer-content {
        gap: 5px;
    }
    
    .footer-logo img {
        max-width: 80px;
    }
    
    .footer-logo {
        margin-bottom: 5px;
    }
    
    .footer-info,
    .footer-links,
    .footer-contact,
    .footer-social {
        width: 45%;
        padding: 0 2px;
        margin-bottom: 2px;
        text-align: center;
    }
    
    .footer p, .footer li, .footer a {
        font-size: 0.6rem;
        margin: 1px 0;
        line-height: 1.0;
    }
    
    .footer h4 {
        font-size: 0.7rem;
        margin-bottom: 1px;
    }
    
    .footer-bottom {
        margin-top: 2px;
        padding-top: 1px;
        font-size: 0.55rem;
    }
    
    .social-icons a {
        margin: 0 2px;
        font-size: 0.65rem;
        min-height: 25px;
        min-width: 25px;
    }
    
    /* Per schermi estremamente piccoli */
    @media (max-width: 360px) {
        .footer-content {
            flex-direction: row;
            gap: 1px;
            justify-content: center;
            align-items: center;
            text-align: center;
        }
        
        .footer-logo img {
            max-width: 50px;
        }
        
        .footer h4 {
            font-size: 0.65rem;
            margin-bottom: 1px;
        }
        
        .footer p, .footer li, .footer a {
            font-size: 0.55rem;
            line-height: 1.0;
            margin: 0;
        }
        
        .footer-info,
        .footer-links,
        .footer-contact,
        .footer-social {
            padding: 0 3px;
            margin-bottom: 3px;
        }
        
        .footer-bottom {
            margin-top: 3px;
            padding-top: 2px;
            font-size: 0.55rem;
        }
    }
    .menu-desktop {
        display: none;
    }
    
    header {
        height: 100px;
    }
    
    header .container {
        flex-wrap: wrap;
        position: relative;
    }
    
    .menu-toggle {
        position: absolute;
        right: 15px;
        top: 25px;
        font-size: 20px;
        z-index: 2;
    }
    
    .logo {
        margin-bottom: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: 50%;
        width: auto;
        text-align: left;
        top: 15px;
        z-index: 1;
    }
    
    .logo img {
        max-height: 70px;
    }
    
    nav.active {
        max-height: 250px;
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    }
    
    nav {
        margin-top: 90px;
    }
    
    nav ul li a {
        font-size: 0.8rem;
        padding: 8px 0;
        display: block;
        text-align: left;
        color: #333;
        font-weight: 600;
    }
    
    nav ul li a[href="contatti.html"], 
    nav ul li a[href="#contatti"] {
        color: #0056b3;
        font-weight: 700;
    }
}
 
