/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #000000;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Forza tutti gli elementi a rispettare i confini del viewport */
*,
*::before,
*::after {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}

/* Fix specifico per immagini */
img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    width: auto;
}

/* Fix per elementi con dimensioni fisse */
.image-placeholder {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: cover;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 2px 20px rgba(146, 248, 15, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo{
    z-index: 999999;
}

.logo h1 {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2px;
}

.logo span {
    color: #92f80f;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #92f80f;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #92f80f;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: #92f80f;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: #92f80f;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 134%;
    /* Fallback gradient se l'immagine non carica */
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    /* L'immagine viene impostata via HTML inline style */
    background-repeat: no-repeat;
    background-size: 300% 300% !important;
    background-position: 0% 0%; /* Rimosso !important per permettere a GSAP di animare */
    will-change: background-position, transform !important;
    transform: translateZ(0) !important;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    color: #ffffff;
}

.hero-title span {
    color: #92f80f;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #92f80f;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block !important;
    padding: 15px 40px;
    background: linear-gradient(45deg, #92f80f, #7dd40a);
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(146, 248, 15, 0.3);
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(146, 248, 15, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 5px;
    height: 30px;
    margin-bottom: 40px;
    background: #92f80f;
    position: relative;
    animation: bounce 2s infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: -13.5px;
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 16px solid #92f80f;
    background: transparent;
    display: block;
}


@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.section-line {
    width: 80px;
    height: 3px;
    background: #92f80f;
    margin: 0 auto;
}

/* About Section */
.about {
    background: #111111;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
}

.about-text h3 {
    font-size: 2rem;
    color: #92f80f;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.about-text p {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    word-wrap: break-word;
    hyphens: auto;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #92f80f;
    font-family: 'Orbitron', monospace;
}

.stat-label {
    font-size: 0.9rem;
    color: #cccccc;
    margin-top: 0.5rem;
}

.about-image {
    text-align: center;
    max-width: 100%;
}

.about-image img {
    width: 100%;
    height: auto;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background: #222222;
    border: 2px dashed #92f80f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #92f80f;
    font-size: 1.2rem;
    border-radius: 10px;
}

/* Services Section */
.services {
    background: #000000;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #111111;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #222222;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: #92f80f;
    box-shadow: 0 10px 30px rgba(146, 248, 15, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.service-card p {
    color: #cccccc;
    margin-bottom: 1.5rem;
}

.price {
    font-size: 2rem;
    color: #92f80f;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

/* Gallery Section */
.gallery {
    background: #111111;
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 100%;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    max-width: 100% !important;
}

.gallery-item:hover .image-placeholder {
    transform: scale(1.1);
    border-color: #ffffff;
}

/* Contact Section */
.contact {
    background: #000000;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    background: #92f80f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-details h4 {
    color: #92f80f;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: #cccccc;
}

.contact-form {
    background: #111111;
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid #222222;
}

.contact-form h3 {
    color: #92f80f;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: #222222;
    border: 2px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #92f80f;
    box-shadow: 0 0 10px rgba(146, 248, 15, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #92f80f, #7dd40a);
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(146, 248, 15, 0.3);
}

/* Footer */
.footer {
    background: #111111;
    padding: 3rem 0 1rem;
    border-top: 1px solid #222222;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.footer-logo span {
    color: #92f80f;
}

.footer-logo p {
    color: #cccccc;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: #222222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #92f80f;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #222222;
    color: #cccccc;
    font-size: 0.9rem;
}

.store-button-container {
    display: flex;            /* Affianca le immagini in orizzontale */
    justify-content: center;  /* Centra le immagini orizzontalmente nel div */
    align-items: center;      /* Allinea verticalmente al centro */
    gap: 20px;                /* Spazio tra le immagini */
    padding: 10px;            /* Padding opzionale intorno al div */
}

.store-button-container img {
    height: 40px;
    max-height: 40px;         /* Larghezza massima immagini */
    height: auto;             /* Mantiene le proporzioni */
    cursor: pointer;          /* Cambia il cursore al passaggio */
    transition: transform 0.3s ease; /* Piccolo effetto hover */
}

.store-button-container img:hover {
    transform: scale(1.05);   /* Leggero ingrandimento al passaggio */
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Reset per mobile - ESCLUDI SOLO gli elementi animati che causano problemi */
    html, body {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
    }
    
    /* Applica max-width solo agli elementi che non sono hero-background o scroll-indicator */
    *:not(.hero-background):not(.scroll-indicator):not(.scroll-arrow) {
        max-width: 100vw !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    .container {
        padding: 0 15px;
        max-width: 100vw !important;
        width: calc(100vw - 30px) !important;
        min-width: 0 !important;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100vw !important;
        max-width: none !important;
        height: calc(100vh - 80px) !important;
        max-height: calc(100vh - 80px) !important;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        padding-bottom: 2rem;
        transition: all 0.3s ease;
        z-index: 9999;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .nav-menu.active {
        left: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .nav-menu li {
        margin: 0.5rem 0; /* Aumentato per migliore spaziatura */
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        font-size: 1.3rem;
        display: block;
        padding: 10px 0;
    }
    
    .logo h1 {
        font-size: 1.2rem !important;
        letter-spacing: 1px !important;
    }
    
    /* Hero Section migliorata per mobile */
    .hero-content {
        padding: 0 10px; /* Padding ridotto per mobile */
    }
    
    .hero-title {
        font-size: 2.8rem; /* Aumentato per impatto */
        line-height: 1.1;
        margin-bottom: 1.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 2.5rem;
        padding: 0 10px;
    }
    
    .cta-button {
        padding: 18px 45px; /* Più grande per mobile */
        font-size: 1.2rem;
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10;
    }
    
    /* Fix per hero-background su mobile - evita stretching ma permette animazione */
    .hero-background {
        background-size: 150% 150% !important;
        background-position: 0% 0%; /* Rimosso !important per permettere a GSAP di animare */
        will-change: background-position, transform !important;
    }
    
    /* About Section migliorata - FIX SOVRAPPOSIZIONE */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        max-width: 100%;
        overflow: visible !important; /* Permette il contenuto di espandersi */
        position: relative !important;
        z-index: 1 !important;
    }
    
    .about-text {
        position: relative !important;
        z-index: 2 !important;
        overflow: visible !important;
    }
    
    .about-image {
        position: relative !important;
        z-index: 2 !important;
        overflow: visible !important;
    }
    
    .about-image img {
        max-width: 100%;
        height: auto;
    }
    
    .about-text h3 {
        font-size: 1.8rem;
    }
    
    .about-text p {
        font-size: 1rem;
        line-height: 1.7;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .stat-item {
        padding: 1rem 0;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    /* Services - Controllo totale */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    .service-card {
        background: #111111;
        padding: 2rem 1.5rem;
        border-radius: 15px;
        text-align: center;
        transition: all 0.3s ease;
        border: 1px solid #222222;
        max-width: 100vw !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
        max-width: 100% !important;
        word-wrap: break-word !important;
    }
    
    .service-card p {
        max-width: 100% !important;
        word-wrap: break-word !important;
    }
    
    .price {
        font-size: 1.8rem;
        max-width: 100% !important;
    }
    
    /* Gallery - Controllo totale */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        max-width: 100vw !important;
        width: 100% !important;
        overflow: hidden;
    }
    
    .gallery-item {
        aspect-ratio: 1;
        overflow: hidden;
        border-radius: 10px;
        position: relative;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    
    .gallery-item img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    
    /* Contact Section migliorata */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-item {
        margin-bottom: 1.5rem;
        text-align: left; /* Allineato a sinistra per leggibilità */
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .contact-form h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        padding: 16px 18px;
        background: #222222;
        border: 2px solid #333333;
        border-radius: 8px;
        color: #ffffff;
        font-size: 16px;
        transition: all 0.3s ease;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    .submit-btn {
        padding: 16px;
        font-size: 1.1rem;
    }
    
    /* Footer migliorato */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2.2rem; /* Leggermente più grande */
    }
    
    section {
        padding: 70px 0; /* Aumentato da 60px */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
        max-width: 100vw !important;
        width: calc(100vw - 20px) !important;
        min-width: 0 !important;
    }
    
    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 1px;
        max-width: 100% !important;
        word-wrap: break-word !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 5px;
    }
    
    .cta-button {
        padding: 16px 40px;
        font-size: 1.1rem;
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10;
    }
    
    /* Fix per hero-background su schermi molto piccoli */
    .hero-background {
        background-size: 140% 140% !important;
        background-position: 0% 0%; /* Rimosso !important per permettere a GSAP di animare */
        will-change: background-position, transform !important;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-image img {
        max-width: 100%;
        height: auto;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    .gallery-item {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .gallery-item img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        max-width: 100% !important;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100vw !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
        max-width: 100vw !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .contact-form {
        padding: 1.5rem 1rem;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    section {
        padding: 50px 0; /* Ridotto per schermi piccoli */
    }
    
    /* Ulteriori fix per scrolling orizzontale su schermi piccoli */
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    html, body {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    .container {
        max-width: 100vw !important;
        width: calc(100vw - 20px) !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Fix specifico per immagini su schermi piccoli */
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .gallery-item img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
    }
    
    /* Previene overflow del testo */
    p, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
}

/* Aggiungi queste regole per migliorare la responsività generale */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    /* Previene scrolling orizzontale su tablet */
    html, body {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* ECCEZIONE SPECIFICA PER ANIMAZIONE SFONDO */
    .hero-background {
        overflow: visible !important;
        will-change: background-position !important;
        background-size: 500% 200% !important;
        background-position: 0% 0%; /* Rimosso !important per permettere a GSAP di animare */
        animation: none !important;
    }
    
    /* ECCEZIONE SPECIFICA PER FRECCIA SCROLL */
    .scroll-indicator {
        overflow: visible !important;
        z-index: 3 !important;
    }
    
    .scroll-arrow {
        animation: bounce 2s infinite !important;
    }
    
    .scroll-arrow::after {
        content: '';
        position: absolute;
        bottom: -12px;
        left: -5.5px;
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 16px solid #92f80f;
        background: transparent;
        display: block;
    }
    
    .container {
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Fix per iOS Safari */
@media screen and (max-width: 768px) {
    .nav-menu {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Forza il menu mobile a funzionare correttamente */
    .nav-menu.active {
        left: 0 !important;
        transform: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-width: none !important;
        width: 100vw !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Previene zoom su input focus per iOS */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important;
    }
    
    /* Previene scrolling orizzontale su mobile */
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100vw;
    }
    
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Forza larghezza massima per tutti gli elementi */
    .container {
        max-width: 100vw !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Previene overflow delle immagini */
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    /* Fix per elementi che potrebbero causare overflow */
    .hero-background {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .navbar {
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    .nav-container {
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    /* Fix per gallery items */
    .gallery-item {
        max-width: 100% !important;
    }
    
    .gallery-item img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
    
    /* Fix per service cards */
    .service-card {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Fix per contact section */
    .contact-content {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .contact-form {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Previene overflow del testo */
    .about-text p,
    .contact-details p {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    /* Fix per elementi con position absolute/fixed */
    .hero,
    .hero-overlay,
    .hero-background {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* REGOLE FINALI ANTI-OVERFLOW - Massima priorità */
@media (max-width: 1200px) {
    * {
        max-width: 100vw !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    html, body {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .container {
        max-width: 100vw !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Forza tutte le immagini a rispettare i confini */
    .gallery-item img,
    .about-image img,
    .image-placeholder {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        display: block !important;
    }
    
    /* Forza i service-card a rispettare i confini */
    .service-card {
        max-width: 100vw !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .services-grid {
        max-width: 100vw !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Previene overflow di tutti i testi */
    p, h1, h2, h3, h4, h5, h6, span, div {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    /* ECCEZIONE SPECIALE PER MENU MOBILE - Deve avere priorità massima */
    .nav-menu,
    .nav-menu.active {
        max-width: none !important;
        width: 100vw !important;
        overflow: visible !important;
        transform: none !important;
        left: -100% !important;
    }
    
    .nav-menu.active {
        left: 0 !important;
    }
}