/* ================================
   CSS RESET & BASE STYLES
================================ */

:root {
    /* Tema scuro (default) */
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --tertiary-bg: #2a2a2a;
    --navbar-bg: rgba(26, 26, 26, 0.95);
    --navbar-bg-scrolled: rgba(26, 26, 26, 0.98);
    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-muted: #a0a0a0;
    --accent-color: #d4af37;
    --border-color: #333333;
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.08);
    --input-bg: #2a2a2a;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Tema chiaro */
[data-theme="light"] {
    --primary-bg: #ffffff;
    --secondary-bg: #ffffff;
    --tertiary-bg: #f8f9fa;
    --quaternary-bg: #f8f9fa;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);
    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #666666;
    --accent-color: #d4af37;
    --border-color: #e0e0e0;
    --overlay-bg: rgba(255, 255, 255, 0.8);
    --card-bg: rgba(0, 0, 0, 0.02);
    --card-border: rgba(0, 0, 0, 0.08);
    --input-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.15);
}

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

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: var(--primary-bg);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 6px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background-color: var(--primary-bg);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}


[data-theme="light"] .hero-overlay {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.75) 100%);
}

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

/* ================================
   ANTI-CLS OPTIMIZATIONS FOR AI
================================ */

/* Hero Image - Critical LCP - Add background placeholder */
.hero-background {
    background-color: #1a1a1a; /* Placeholder while loading */
}

/* About Image Container - Aspect Ratio Protection */
.about-image picture {
    display: block;
    position: relative;
    aspect-ratio: 3/4; /* 300x400 ratio */
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.about-image picture img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Client Logos - Additional Layout Protection */
.client-logo {
    width: 140px; /* Fixed width prevents reflow */
    min-height: 100px; /* Fixed height includes caption */
}

/* Skeleton Loading Animation - Solo per immagini fotografiche */
.image-loading:not(.client-logo img):not(.nav-logo img):not(.hero-logo):not([src*="logo"]):not([src*="png"]) {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite ease-in-out;
    border-radius: 4px;
}

[data-theme="light"] .image-loading:not(.client-logo img):not(.nav-logo img):not(.hero-logo):not([src*="logo"]):not([src*="png"]) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

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

/* Esclusione esplicita skeleton per loghi e immagini trasparenti */
.client-logo img.image-loading,
.nav-logo img.image-loading,
.hero-logo.image-loading,
img[src*="logo"].image-loading,
img[src*="png"].image-loading {
    background: none !important;
    animation: none !important;
}

/* Navigation Logo - Prevent Layout Shift */
.nav-logo img {
    width: auto;
    height: 40px; /* Fixed height for navbar */
    max-width: 200px;
    object-fit: contain;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}


/* ================================
   UTILITY CLASSES
================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    margin: 1rem auto;
    border-radius: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ================================
   NAVIGATION
================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--navbar-bg-scrolled);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
    height: 60px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.nav-logo img {
    width: 250px;
    height: auto;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}

[data-theme="light"] .nav-logo img {
    filter: brightness(0.2) contrast(1.5);
}

[data-theme="light"] .hero-logo {
    filter: brightness(0.2) contrast(1.5);
}

/* Logo ridotto quando navbar scrolled */
.navbar.scrolled .nav-logo img {
    width: 180px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--accent-color);
    outline: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    transition: all 0.3s ease;
}

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

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

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
    border-color: var(--accent-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    color: var(--text-primary);
}

/* ================================
   HERO SECTION
================================ */

.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-title img.hero-logo {
    width: 70vw;
    max-width: 900px;
    min-width: 350px;
    height: auto;
    display: block;
    margin: 0 auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 700;
    color: #e5e5e5;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .hero-subtitle {
    color: var(--text-primary);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #ffffff;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s infinite;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
    outline: none;
    background: linear-gradient(135deg, #f4c842 0%, #d4af37 100%);
}

.cta-button:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s ease;
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(5px);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
    }
    50% {
        box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    }
}

.cta-button:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #e5e5e5;
    animation: bounce 2s infinite;
}

/* Camera Flash Effects */
.camera-flash {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    animation: flash 0.2s ease-out;
}

.camera-flash::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(255,255,255,1) 0%, rgba(255,255,255,0.95) 20%, rgba(255,255,255,0.7) 40%, transparent 80%);
    border-radius: 50%;
    width: 100%;
    height: 100%;
}

.camera-flash::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.9) 49%, rgba(255,255,255,1) 50%, rgba(255,255,255,0.9) 51%, transparent 60%),
                linear-gradient(-45deg, transparent 40%, rgba(255,255,255,0.9) 49%, rgba(255,255,255,1) 50%, rgba(255,255,255,0.9) 51%, transparent 60%);
    width: 120%;
    height: 120%;
}

@keyframes flash {
    0% {
        opacity: 0;
        transform: scale(0.2) rotate(0deg);
    }
    30% {
        opacity: 1;
        transform: scale(1.3) rotate(5deg);
    }
    70% {
        opacity: 0.8;
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        opacity: 0;
        transform: scale(2.5) rotate(10deg);
    }
}

.camera-flash.large {
    width: 80px;
    height: 80px;
}

.camera-flash.medium {
    width: 50px;
    height: 50px;
}

.camera-flash.small {
    width: 30px;
    height: 30px;
}

/* ================================
   FLOATING BUTTONS
================================ */

.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.back-to-top {
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #444444 0%, #2a2a2a 100%);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #34e477 0%, #1aa889 100%);
}

.back-to-top.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    pointer-events: none;
}

.whatsapp-btn {
    opacity: 1;
    visibility: visible;
    animation: fadeInUp 0.6s ease-out 1s forwards;
}

@media (max-width: 768px) {
    .floating-buttons {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* ================================
   COOKIE CONSENT BANNER
================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid #333333;
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
    color: #e5e5e5;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-banner-text p {
    margin: 0 0 8px 0;
}

.cookie-banner-text a {
    color: #d4af37;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-banner-text a:hover {
    color: #f4c842;
}

.cookie-banner-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #f4c842 0%, #d4af37 100%);
    transform: translateY(-2px);
}

.cookie-btn-manage {
    background: transparent;
    color: #e5e5e5;
    border: 1px solid #555555;
}

.cookie-btn-manage:hover {
    background: #333333;
    border-color: #d4af37;
    color: #d4af37;
}

.cookie-btn-reject {
    background: transparent;
    color: #cc6666;
    border: 1px solid #cc6666;
}

.cookie-btn-reject:hover {
    background: #cc6666;
    color: #ffffff;
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-banner-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .cookie-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* ================================
   COOKIE PREFERENCES MODAL
================================ */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #333333;
}

.cookie-modal-header {
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #333333;
    margin-bottom: 0;
}

.cookie-modal-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-modal-header p {
    color: #cccccc;
    margin-bottom: 20px;
    line-height: 1.6;
}

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: #333333;
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: #d4af37;
    transform: scale(1.1);
}

.cookie-modal-body {
    padding: 0 24px 24px 24px;
}

.cookie-category {
    background: #262626;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #333333;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cookie-category-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: #444444;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cookie-toggle.active {
    background: #d4af37;
}

.cookie-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cookie-toggle.active::before {
    transform: translateX(24px);
}

.cookie-category-description {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-category-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #333333;
}

.cookie-category-details ul {
    color: #aaaaaa;
    font-size: 0.85rem;
    margin: 8px 0 0 20px;
    padding: 0;
}

.cookie-category-details li {
    margin-bottom: 4px;
}

.cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #333333;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-modal-btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #ffffff;
}

.cookie-modal-btn-primary:hover {
    background: linear-gradient(135deg, #f4c842 0%, #d4af37 100%);
    transform: translateY(-2px);
}

.cookie-modal-btn-secondary {
    background: transparent;
    color: #cccccc;
    border: 1px solid #555555;
}

.cookie-modal-btn-secondary:hover {
    background: #333333;
    color: #ffffff;
}

@media (max-width: 768px) {
    .cookie-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-btn {
        width: 100%;
    }
}

/* ================================
   ABOUT SECTION
================================ */

.about-section {
    padding: 100px 0;
    background: var(--secondary-bg);
    display: block !important;
    visibility: visible !important;
}

[data-theme="light"] .about-section {
    background: var(--tertiary-bg);
}

.about-content {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    visibility: visible !important;
}

.about-text {
    order: 1;
    display: block !important;
    visibility: visible !important;
}

.about-story p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

.about-story strong {
    color: var(--accent-color);
    font-weight: 600;
}

.about-image {
    flex: 0.8;
    order: 2;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 0;
    display: block !important;
    visibility: visible !important;
    padding: 20px;
}

.about-image img {
    width: clamp(250px, 30vw, 350px);
    height: auto;
    transition: all 0.3s ease;
    display: block !important;
    visibility: visible !important;
    padding: 20px;
    margin: 0 auto;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ================================
   SERVICES SECTION
================================ */

.services-section {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
    min-height: 500px;
    display: block !important;
    visibility: visible !important;
    position: relative;
}

[data-theme="light"] .services-section {
    background: var(--primary-bg);
}

.services-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.service-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: left;
    border: 1px solid var(--card-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block !important;
    visibility: visible !important;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--card-border);
    box-shadow: 0 20px 40px var(--shadow-color);
    background: var(--card-bg);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 0 1.5rem 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
    backdrop-filter: blur(10px);
}

[data-theme="light"] .service-icon {
    background: rgba(26, 26, 26, 0.9);
    color: #ffffff;
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

/* ================================
   PORTFOLIO SECTION
================================ */

.portfolio-section {
    padding: 100px 0;
    background: var(--primary-bg);
}

[data-theme="light"] .portfolio-section {
    background: var(--tertiary-bg);
}

.portfolio-section .container {
    max-width: none;
    padding: 0;
}





.portfolio-grid {
    column-count: 3;
    column-gap: 1.5rem;
    max-width: none;
    padding: 0 2rem;
    position: relative;
}

.portfolio-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1rem;
    break-inside: avoid;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--secondary-bg);
    position: relative;
    box-shadow: 0 4px 20px var(--shadow-color);
    /* Animazione di ingresso */
    opacity: 0;
    transform: translateX(200px);
}

/* Le immagini mantengono il loro rapporto d'aspetto naturale */
.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}



.portfolio-item:hover img {
    transform: scale(1.05);
    filter: none;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 0;
}

/* Masonry responsive breakpoints */
@media (max-width: 480px) {
    .portfolio-grid {
        column-count: 1;
        column-gap: 0.5rem;
        padding: 0 1rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .portfolio-grid {
        column-count: 2;
        column-gap: 0.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .portfolio-grid {
        column-count: 2;
        column-gap: 1.2rem;
    }
}

@media (min-width: 1025px) {
    .portfolio-grid {
        column-count: 3;
        column-gap: 1.5rem;
    }
}

@media (min-width: 1400px) {
    .portfolio-grid {
        column-count: 4;
        column-gap: 1.8rem;
    }
}

.portfolio-overlay i {
    font-size: 2rem;
    color: #ffffff;
}

/* Animazioni masonry */
.portfolio-item.animate-left {
    animation: slideFromLeft 0.8s ease forwards;
}

.portfolio-item.animate-right {
    animation: slideFromRight 0.8s ease forwards;
}

.portfolio-item.animate-fade {
    animation: fadeInScale 0.8s ease forwards;
}

@keyframes slideFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-300px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideFromRight {
    0% {
        opacity: 0;
        transform: translateX(300px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================================
   LIGHTBOX
================================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(26, 26, 26, 0.8);
    color: #ffffff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: #d4af37;
    color: #0a0a0a;
}

#lightbox-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    background: rgba(26, 26, 26, 0.8);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
}

/* ================================
   VIDEO SECTION
================================ */

.video-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
}

[data-theme="light"] .video-section {
    background: var(--primary-bg);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: -1rem auto 3rem;
    max-width: 600px;
    line-height: 1.6;
}

.video-pagination-container {
    margin-top: 2rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0 5px;
    }
}

.video-item {
    max-width: 400px;
    width: 100%;
}

.video-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #0a0a0a;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.pagination-btn:disabled {
    background: #333333;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

[data-theme="light"] .pagination-btn:disabled {
    background: #e9ecef;
    color: #adb5bd;
}

.pagination-info {
    color: #e5e5e5;
    font-weight: 500;
    font-size: 0.9rem;
}

[data-theme="light"] .pagination-info {
    color: var(--text-primary);
}

.video-grid .video-item {
    background: var(--secondary-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    max-width: 400px;
    width: 100%;
}

.video-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    transition: all 0.3s ease;
}

.youtube-facade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: #000;
}

.youtube-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 68px;
    height: 48px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button:hover {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.video-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* ================================
   CLIENTS SECTION
================================ */

.clients-section {
    padding: 5rem 0;
    background: #0f0f0f;
    border-top: 1px solid var(--border-color);
}

[data-theme="light"] .clients-section {
    background: var(--tertiary-bg);
}

/* Carosello clienti */
.clients-carousel-wrapper {
    margin-top: 3rem;
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.clients-carousel {
    width: 100%;
    overflow: hidden;
}

.clients-track {
    display: flex;
    animation: scrollClients 25s linear infinite;
    gap: 2rem;
    width: fit-content;
}

@keyframes scrollClients {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-220px * 7 - 14rem));
    }
}

.clients-track:hover {
    animation-play-state: paused;
}

.client-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1.5rem;
    transition: all 0.3s ease;
    min-height: 120px;
    min-width: 200px;
    flex-shrink: 0;
}

.client-logo:hover {
    transform: scale(1.05);
}

.client-logo img {
    max-width: 100%;
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.7);
    transition: all 0.3s ease;
    mix-blend-mode: multiply;
}

.client-logo:hover img {
    filter: grayscale(50%) brightness(0.9);
}

.grayscale-light {
    filter: grayscale(100%) brightness(1.3) contrast(0.6) !important;
}

.client-logo:hover .grayscale-light {
    filter: grayscale(80%) brightness(1.5) contrast(0.8) !important;
}

/* Dimensione specifica per logo Antonietta Tuccillo */
.client-logo img[alt="Antonietta Tuccillo"] {
    height: 45px !important;
}

.client-caption {
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #a0a0a0;
    text-align: center;
    font-weight: 500;
    transition: color 0.3s ease;
    height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.client-logo:hover .client-caption {
    color: #d4af37;
}

/* ================================
   CONTACT SECTION
================================ */

.contact-section {
    padding: 100px 0;
    background: var(--tertiary-bg);
    display: block !important;
    visibility: visible !important;
}

[data-theme="light"] .contact-section {
    background: var(--primary-bg);
}

.contact-content {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    visibility: visible !important;
}

.contact-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    color: #d4af37;
    font-size: 1.2rem;
    margin-top: 4px;
}

.contact-item div span {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.contact-item a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: #1a1a1a;
    border: 2px solid #333333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e5e5;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover,
.social-links a:focus {
    background: #d4af37;
    border-color: #d4af37;
    color: #1a1a1a;
    transform: translateY(-3px);
    outline: none;
}

/* ================================
   CONTACT FORM
================================ */

.contact-form {
    background: var(--secondary-bg);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: block !important;
    visibility: visible !important;
}

.contact-form h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #d4af37;
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-group a {
    color: var(--accent-color);
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.error-message {
    display: block;
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    min-height: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #0a0a0a;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.submit-btn:hover,
.submit-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
    outline: none;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-status {
    margin-top: 1rem;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-status.success {
    background: rgba(72, 187, 120, 0.1);
    color: #48bb78;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.form-status.error {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* ================================
   FOOTER
================================ */

.footer {
    background: var(--primary-bg);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

[data-theme="light"] .footer {
    background: var(--tertiary-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-right p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--accent-color);
    outline: none;
}

.footer-credit {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-credit p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.footer-credit a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-credit a:hover,
.footer-credit a:focus {
    color: var(--text-primary);
    outline: none;
}

/* ================================
   ANIMATIONS
================================ */

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Classi per le animazioni */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.animate-fade-up {
    transform: translateY(30px);
}

.animate-on-scroll.animate-fade-left {
    transform: translateX(-30px);
}

.animate-on-scroll.animate-fade-right {
    transform: translateX(30px);
}

.animate-on-scroll.animate-fade-scale {
    transform: scale(0.9);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
    will-change: auto;
}

/* Riduzione animazioni per dispositivi con prestazioni limitate */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        transition: opacity 0.3s ease;
    }
    
    .animate-on-scroll.animate-fade-up,
    .animate-on-scroll.animate-fade-left,
    .animate-on-scroll.animate-fade-right {
        transform: none;
    }
    
    .animate-on-scroll.animate-fade-scale {
        transform: none;
    }
}

/* Ritardi per animazioni scaglionate */
.animate-delay-100 { transition-delay: 0.1s; }
.animate-delay-200 { transition-delay: 0.2s; }
.animate-delay-300 { transition-delay: 0.3s; }
.animate-delay-400 { transition-delay: 0.4s; }
.animate-delay-500 { transition-delay: 0.5s; }
.animate-delay-600 { transition-delay: 0.6s; }

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   RESPONSIVE DESIGN
================================ */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-text {
        order: 1;
        text-align: left;
    }
    
    .about-text .section-title {
        text-align: center;
    }
    
    .about-image {
        order: 2;
        text-align: center;
        display: flex;
        justify-content: center;
    }
    
    .about-image img {
        width: clamp(250px, 50vw, 400px);
        margin: 0 auto;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .video-item {
        margin: 0 auto;
        max-width: 400px;
    }
    
    .clients-carousel-wrapper {
        overflow: hidden;
        position: relative;
    }
    
    .clients-carousel {
        width: 100%;
        overflow: hidden;
    }
    
    .clients-track {
        display: flex;
        animation: scrollClientsMobile 20s linear infinite;
        gap: 1.5rem;
        width: fit-content;
    }
    
    @keyframes scrollClientsMobile {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(calc(-180px * 7 - 10.5rem));
        }
    }
    
    .client-logo {
        padding: 1rem;
        min-height: 100px;
        min-width: 160px;
        flex-shrink: 0;
    }
    
    .client-logo img {
        height: 50px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
        --header-height: 70px;
    }
    
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    * {
        box-sizing: border-box;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--navbar-bg-scrolled);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: start;
        padding-top: 2rem;
        gap: 1rem;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        column-count: 2;
        column-gap: 0.75rem;
        padding: 0 1rem;
    }
    
    
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .clients-track {
        animation: scrollClientsMobile 15s linear infinite;
        gap: 1rem;
    }
    
    @keyframes scrollClientsMobile {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(calc(-140px * 7 - 7rem));
        }
    }
    
    .client-logo {
        min-width: 120px;
        padding: 0.5rem;
    }
    
    .client-logo img {
        height: 40px;
    }
/* Mobile portfolio grid */
    .portfolio-grid {
        column-count: 1;
        column-gap: 0.5rem;
        padding: 0 1rem;
    }
    /* Riduci margine-top in About Section mobile */
    .about-section {
        padding: 60px 0 30px 0;
    }
    
    .about-image {
        margin-top: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    .about-image img {
        width: clamp(200px, 60vw, 300px);
        margin: 0 auto;
        padding: 10px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 14px 24px;
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* ================================
   ACCESSIBILITY IMPROVEMENTS
================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #d4af37;
    color: #0a0a0a;
    padding: 8px;
    z-index: 9999;
    text-decoration: none;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Focus indicators */
*:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
    border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --accent-color: #ffff00;
        --border-color: #ffffff;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-scroll-indicator,
    .cta-button,
    .contact-form,
    .social-links {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero {
        height: auto;
        min-height: auto;
        page-break-after: always;
    }
}