/* ===== VARIABLES ===== */
:root {
    --primary-color: #d4af37;
    --secondary-color: #1a1a1a;
    --text-color: #000;
    --text-light: #000;
    --white: #ffffff;
    --light-bg: #f8f8f8;
    --border-color: #e0e0e0;
    --shadow: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-hover: 0 10px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', sans-serif;
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    background: #000;
    overscroll-behavior-y: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p { margin-bottom: 1rem; }

a { text-decoration: none; color: inherit; transition: var(--transition); }

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

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

/* Swiper overrides */
.swiper {
    width: 100%;
    position: relative;
    overflow: hidden; /* evita overflow a destra */
}

.swiper-slide {
    height: auto;
    flex-shrink: 0; /* mantiene la larghezza della slide */
}

/* Wrapper di default (mobile: Swiper attivo) */
.servizi-swiper .swiper-wrapper,
.portfolio-swiper .swiper-wrapper {
    display: flex;
    gap: 0; /* niente gap: ci pensa Swiper con spaceBetween */
}
.servizi-grid {
    display: flex;
    gap: 0;
}
.portfolio-grid {
    display: flex;
    gap: 0;
}
/* Slide a tutta larghezza in modalità swiper */
.servizi-swiper .swiper-slide,
.portfolio-swiper .swiper-slide {
    width: 100%;
    box-sizing: border-box;
}

/* Pagination */
.swiper-pagination {
    display: none;
}

/* Desktop: torna alla griglia quando Swiper è disattivato */
@media (min-width: 769px) {
    .servizi-swiper .swiper-wrapper {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .portfolio-swiper .swiper-wrapper {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

/* Mobile: attiva i bullet */
@media (max-width: 768px) {
    .swiper-pagination {
        display: block;
        margin-top: 20px;
        position: static;
    }
    .swiper-pagination-bullet {
        background: rgba(0,0,0,0.25);
        opacity: 1;
    }
    .swiper-pagination-bullet-active {
        background: var(--primary-color);
    }
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
}

.logo h1 { font-size: 1.5rem; color: var(--secondary-color); margin: 0; }
.logo span { display: block; font-size: 0.9rem; color: var(--primary-color); font-weight: 400; }

.nav-menu ul { display: flex; list-style: none; gap: 2rem; }

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.menu-toggle { display: none; flex-direction: column; cursor: pointer; padding: 5px; }
.menu-toggle span { width: 25px; height: 3px; background: var(--secondary-color); margin: 3px 0; transition: var(--transition); }

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    isolation: isolate;
    background: #000;
}

.hero-slider { position: relative; height: 100%; }

.slide { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; }
.slide.active { opacity: 1; }

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

.slide-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 2;
}

.slide-title { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 1rem; animation: slideUp 1s ease-out; }
.slide-subtitle { font-size: clamp(1rem, 2vw, 1.5rem); font-weight: 300; animation: slideUp 1s ease-out 0.2s backwards; }

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

.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
    z-index: 1;
}

.hero-navigation {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 100%;
    display: flex; justify-content: space-between;
    padding: 0 2rem; z-index: 3;
}

.slide-nav {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
}

.slide-nav:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.1); }

.slide-indicators {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    display: flex; gap: 1rem; z-index: 3;
}

.indicator { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); cursor: pointer; transition: var(--transition); }
.indicator.active { background: var(--white); transform: scale(1.3); }

.scroll-indicator {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    text-align: center; color: var(--white); animation: bounce 2s infinite;
}

.mouse { width: 30px; height: 50px; border: 2px solid var(--white); border-radius: 25px; margin: 0 auto 10px; position: relative; }
.wheel { width: 4px; height: 10px; background: var(--white); border-radius: 2px; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); animation: scroll 1.5s infinite; }

@keyframes bounce {
    0%,20%,50%,80%,100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

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

/* ===== VIDEO HERO SECTION ===== */
.hero-video { display: flex; align-items: center; justify-content: center; }

.video-bg {
    position: fixed;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
}

.video-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.65));
    z-index: -1;
    pointer-events: none;
}

.hero-content-video {
    position: relative;
    text-align: center;
    color: var(--white);
    z-index: 1;
    padding: 20px;
    max-width: 900px;
    
    border-radius: 14px;
    
}

.hero-title-video { font-size: clamp(2rem, 6vw, 4rem); margin-bottom: 1rem; animation: slideUp 1s ease-out; text-shadow: 2px 2px 8px rgba(0,0,0,0.5); }
.hero-subtitle-video { font-size: clamp(1rem, 2.5vw, 1.5rem); font-weight: 300; margin-bottom: 2rem; animation: slideUp 1s ease-out 0.2s backwards; text-shadow: 1px 1px 4px rgba(0,0,0,0.5); }

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; animation: slideUp 1s ease-out 0.4s backwards; }

.btn-secondary { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-secondary:hover { background: var(--white); color: var(--secondary-color); }

.video-controls {
    position: absolute;
    bottom: 6rem; right: 2rem;
    display: flex; gap: 0.75rem;
    z-index: 3;
}

.video-control {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}

.video-control:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.1); }

/* Fullscreen: solo video */
.video-fullscreen .header,
.video-fullscreen .hero-content-video,
.video-fullscreen .scroll-indicator {
    display: none !important;
}
.video-fullscreen .video-overlay { display: none !important; }
.video-fullscreen .video-controls { bottom: 1.5rem; right: 1.5rem; }
.video-fullscreen .video-control { background: rgba(0,0,0,0.45); border-color: rgba(255,255,255,0.25); }

/* Hide video download button in native controls */
video::-webkit-media-controls-download-button,
video::-webkit-media-controls-enclosure-download-button,
video::-internal-media-controls-download-button {
    display: none !important;
}
video::-webkit-media-controls-overflow-button {
    display: none !important;
}

/* Browser fullscreen (desktop) */
.hero-video.browser-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
}

.hero-video.browser-fullscreen .video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-video.browser-fullscreen .header,
.hero-video.browser-fullscreen .hero-content-video,
.hero-video.browser-fullscreen .scroll-indicator {
    display: none !important;
}

.hero-video.browser-fullscreen .video-overlay {
    display: none !important;
}

.hero-video.browser-fullscreen .video-controls {
    bottom: 1.5rem;
    right: 1.5rem;
}

.hero-video.browser-fullscreen .video-control {
    background: rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ===== SECTIONS ===== */
section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
    max-width: 90vw;
    overflow-x: hidden;
    margin-right: 5vw;
    margin-left: 5vw;
}

@media (max-width: 1920px) {
    section {
        max-width: 100vw;
        margin-right: 0vw;
        margin-left: 0vw;
    }
}


.section-header { text-align: center; margin-bottom: 40px; }

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 3px;
    background: var(--primary-color);
}

.section-subtitle { font-size: 1.1rem; color: var(--text-light); margin-top: 1rem; }

/* Surface cards for readability */
.section-surface {
    
    border-radius: 18px;
    background: rgba(255,255,255,0.45);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    backdrop-filter: blur(3px);
    padding: 40px 30px;
}

.map-surface { margin-top: 30px; }

/* ===== SERVIZI SECTION ===== */
.servizi { padding: 60px 0; }

.servizi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.servizio-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.servizio-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #f0d878, var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.servizio-card:hover::before { opacity: 1; }

.servizio-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
}

.servizio-icon {
    width: 60px; height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--primary-color), #f0d878);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--white);
    transition: all 0.4s ease;
}

.servizio-card:hover .servizio-icon {
    transform: rotateY(360deg) scale(1.1);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.servizio-card h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--secondary-color); }
.servizio-card p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 15px; line-height: 1.5; }

.servizio-card ul {
    list-style: none; text-align: left;
    max-height: 0; overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 0;
}

.servizio-card:hover ul { max-height: 200px; opacity: 1; }

.servizio-card ul li {
    padding: 5px 0 5px 20px;
    position: relative;
    color: var(--text-light);
    font-size: 0.8rem;
}

.servizio-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-filters {
    display: flex; justify-content: center; gap: 20px;
    margin-bottom: 40px; flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

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

.portfolio-item img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: cover;
}

.portfolio-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.9));
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.5s ease;
}

.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-item:hover img { transform: scale(1.0); }

.portfolio-overlay h4 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(20px);
    transition: transform 0.5s ease 0.1s;
}

.portfolio-link {
    margin-top: 20px;
    width: 50px; height: 50px;
    border: 2px solid var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    transform: translateY(20px);
    transition: all 0.5s ease 0.2s;
}

.portfolio-item:hover .portfolio-overlay h4,
.portfolio-item:hover .portfolio-overlay p,
.portfolio-item:hover .portfolio-link {
    transform: translateY(0);
}

.portfolio-link:hover { background: var(--white); color: var(--secondary-color); }

.portfolio-cta { text-align: center; margin-top: 50px; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary { background: var(--primary-color); color: var(--white); }
.btn-primary:hover { background: var(--secondary-color); transform: translateY(-2px); box-shadow: var(--shadow); }

/* ===== ABOUT SECTION ===== */
.about { background: transparent; }

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

.about-text .section-title { text-align: left; }
.about-text .section-title::after { left: 0; transform: translateX(0); }

.about-text h3 { color: var(--primary-color); font-size: 1.3rem; font-weight: 400; }
.lead { font-size: 1.2rem; font-weight: 500; margin-bottom: 20px; }

.about-stats { display: flex; gap: 40px; margin-top: 40px; }
.stat { text-align: center; }
.stat h4 { font-size: 1.9rem; color: var(--primary-color); margin-bottom: 5px; }
.stat p { color: var(--text-light); }

.about-image { position: relative; }
.about-image img { border-radius: 10px; box-shadow: var(--shadow-hover); }
.about-image-decoration {
    position: absolute;
    top: -20px; right: -20px;
    width: 100%; height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    z-index: -1;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
    padding: 80px 0;
    background: transparent;
}

.testimonials .section-surface { background: var(--white); }

.testimonials .section-title, .testimonials .section-subtitle { color: var(--secondary-color); }

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.testimonial-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.testimonial-content { text-align: center; color: var(--secondary-color); }
.stars { color: var(--primary-color); margin-bottom: 20px; }
.testimonial-content p { font-style: italic; line-height: 1.8; margin-bottom: 20px; }
.testimonial-author h5 { font-size: 1.2rem; margin-bottom: 5px; }
.testimonial-author span { color: var(--primary-color); font-size: 0.9rem; }

/* ===== CONTACT SECTION ===== */
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-bottom: 60px; }

.info-item { display: flex; gap: 20px; margin-bottom: 30px; }
.info-item i { font-size: 1.5rem; color: var(--primary-color); width: 30px; }
.info-item h4 { margin-bottom: 5px; }
.info-item p, .info-item a { color: var(--text-light); }
.info-item a:hover { color: var(--primary-color); }

.social-links { display: flex; gap: 15px; margin-top: 30px; }
.social-links a {
    width: 40px; height: 40px;
    background: var(--primary-color);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}
.social-links a:hover { background: var(--secondary-color); transform: translateY(-3px); }

/* ===== CONTACT FORM ===== */
.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-status {
  margin-top: 12px;
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f5f5f5;
  color: #333;
}
.form-status.success {
  background: #e8f7ee;
  color: #1b7a3d;
  border: 1px solid #b9e6c7;
}
.form-status.error {
  background: #fdecec;
  color: #a52020;
  border: 1px solid #f5b5b5;
}

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

.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group label {
    position: absolute;
    left: 15px; top: 15px;
    color: var(--text-light);
    transition: var(--transition);
    pointer-events: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group input:valid,
.form-group textarea:valid {
    border-color: var(--primary-color);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:valid + label,
.form-group textarea:valid + label {
    top: -10px; left: 10px;
    font-size: 0.8rem;
    background: var(--white);
    padding: 0 5px;
    color: var(--primary-color);
}

.form-group select { color: var(--text-light); }

.map-container { height: 450px; }
.map-container iframe { width: 100%; height: 100%; border: none; border-radius: 10px; }

/* ===== FOOTER ===== */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
    position: relative;
    z-index: 2;
}

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

.footer-section h3, .footer-section h4 { margin-bottom: 20px; }
.footer-section h3 span { display: block; font-size: 0.9rem; color: var(--primary-color); font-weight: 400; }
.footer-section ul { list-style: none; }
.footer-section ul li { padding: 8px 0; }
.footer-section a { color: rgba(255, 255, 255, 0.8); }
.footer-section a:hover { color: var(--primary-color); }

.newsletter-form { display: flex; margin-top: 20px; }
.newsletter-form input { flex: 1; padding: 12px; border: none; border-radius: 5px 0 0 5px; }
.newsletter-form button {
    padding: 12px 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 0 5px 5px 0;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}
.newsletter-form button:hover { background: #b8941f; }

.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bottom p { color: rgba(255, 255, 255, 0.6); margin: 0; }
.footer-bottom a { color: var(--primary-color); }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 50px; height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--secondary-color); transform: translateY(-5px); }

/* ===== WHATSAPP FIXED BUTTON ===== */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px; height: 50px;
    background: #25D366;
    color: var(--white);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; cursor: pointer;
    z-index: 999;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    text-decoration: none;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-btn { bottom: 20px; left: 20px; width: 45px; height: 45px; font-size: 1.3rem; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .about-content { grid-template-columns: 1fr; }
    .about-image-decoration { display: none; }
    .contact-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: 70px; right: -100%;
        width: 100%; height: calc(100vh - 70px);
        background: var(--white);
        transition: var(--transition);
    }
    .nav-menu.active { right: 0; }
    .nav-menu ul { flex-direction: column; padding: 2rem; }

    .hero-navigation { padding: 0 1rem; }

    .servizi-grid { grid-template-columns: 1fr; }

    .portfolio-grid { grid-template-columns: 1fr; }

    .form-row { grid-template-columns: 1fr; }

    .about-stats { justify-content: space-around; }

    .testimonials-slider { grid-template-columns: 1fr; }

    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .newsletter-form { max-width: 400px; margin: 20px auto 0; }

    .video-controls { bottom: 5rem; right: 1rem; }
    .video-control { width: 45px; height: 45px; }

    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 280px; }
}

@media (max-width: 480px) {
    .section-title, .slide-title { font-size: 2rem; }
    .portfolio-filters { gap: 10px; }
    .filter-btn { padding: 8px 20px; font-size: 0.9rem; }
}

/* ===== ANIMATIONS ===== */
[data-aos] { opacity: 0; transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
[data-aos="fade-up"] { transform: translateY(30px); }
[data-aos="fade-right"] { transform: translateX(-30px); }
[data-aos="fade-left"] { transform: translateX(30px); }
[data-aos].aos-animate { opacity: 1; transform: translate(0); }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ===== FIX MOBILE OVERFLOW BUG ===== */

/* 1. Previeni overflow orizzontale globale */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    position: relative;
}

/* 2. Fix per le sezioni */


/* 3. Fix per il container */
.container {
    max-width: 100%;
    overflow-x: hidden;
}

/* 4. Fix per il menu mobile */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        max-width: 100vw; /* Aggiungi questo */
        height: calc(100vh - 70px);
        background: var(--white);
        transition: var(--transition);
        overflow-x: hidden; /* Aggiungi questo */
    }

    
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        padding: 2rem;
        width: 100%; /* Aggiungi questo */
        box-sizing: border-box; /* Aggiungi questo */
    }
}

/* 5. Fix per swiper su mobile */
@media (max-width: 768px) {
    .swiper {
        max-width: 100vw;
        overflow: hidden;
        touch-action: pan-y;
    }
    
    .swiper-wrapper {
        max-width: 100%;
        touch-action: pan-x;
    }
    
    .swiper-slide {
        max-width: 100%;
        box-sizing: border-box;
        touch-action: pan-x;
    }
}

/* 6. Fix per le griglie */
@media (max-width: 768px) {
    .servizi-grid,
    .portfolio-grid,
    .testimonials-slider {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* 7. Fix per il footer */
@media (max-width: 768px) {
    .footer {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .footer-content {
        max-width: 100%;
    }
}

/* 8. Fix per elementi che potrebbero eccedere */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
    }
    
    .hero-title-video,
    .section-title,
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix per la hero section */
    .hero-content-video {
        max-width: 100%;
        padding: 20px;
        box-sizing: border-box;
    }
    
    .hero-buttons {
        max-width: 100%;
    }
    
    /* Fix per section-surface */
    .section-surface {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }
    
    /* Fix specifico per form e contact */
    .contact-form,
    .contact-content {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-row {
        max-width: 100%;
    }
    
    /* Fix per social links */
    .social-links {
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 9. Fix per elementi posizionati */
@media (max-width: 768px) {
    .video-controls {
        right: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .back-to-top,
    .whatsapp-btn {
        /* Mantieni i bottoni visibili ma non far eccedere */
        max-width: 50px;
    }
}

/* 10. Debugging helper (rimuovi dopo aver verificato) */
/* 
* {
    outline: 1px solid red;
}
*/

.hp-field {
  position: absolute;
  left: -9999px;
}