/* ========================================
   RESET & FONTS
======================================== */

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

*,
*::before,
*::after {
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transition: all 0.3s ease;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   CSS VARIABLES
======================================== */

:root {
    /* Light Mode Colors */
    --primary-color: #3d3a8c;
    --secondary-color: #5a4fcf;
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #3d3a8c 0%, #5a4fcf 50%, #8b5cf6 100%);
    --gradient-surface: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-error: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --gradient-info: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    --gradient-rainbow: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    --gradient-sunset: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    --gradient-ocean: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-forest: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

/* Dark Mode Colors */
.dark-mode {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
    --gradient-surface: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --gradient-error: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-info: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --gradient-rainbow: linear-gradient(135deg, #4c1d95 0%, #7c3aed 25%, #ec4899 50%, #dc2626 75%, #0ea5e9 100%);
    --gradient-sunset: linear-gradient(135deg, #be185d 0%, #ec4899 50%, #f472b6 100%);
    --gradient-ocean: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --gradient-forest: linear-gradient(135deg, #064e3b 0%, #059669 100%);
}

/* Dark mode body background */
.dark-mode body {
    background: #000000;
    color: var(--text-primary);
}

/* Dark mode for service categories */
.dark-mode .categoria-servizi {
    background: #111111;
    border-color: var(--border-color);
}

/* Dark mode for service boxes */
.dark-mode .servizio-box {
    background: #1a1a1a;
    border-color: var(--border-color);
}

/* Dark mode for listino prezzi section */
.dark-mode .listino-prezzi {
    background: #000000;
}

/* Dark mode for contatti section - use same gradient as light mode */
.dark-mode .contatti {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

/* Make contatti description more visible */
.contatti-desc {
    color: #2d3748 !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ========================================
   LAYOUT GLOBAL
======================================== */

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   HEADER
======================================== */

.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.dark-mode .header {
    background: rgba(30, 41, 59, 0.95);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
}

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

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

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

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

.theme-toggle {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-right: 1rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theme-toggle:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.theme-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

/* Dark mode adjustments for theme toggle */
.dark-mode .theme-toggle {
    background: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.dark-mode .theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========================================
   SEARCH BAR
======================================== */

.search-container {
    position: relative;
    flex: 1;
    max-width: 500px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(61, 58, 140, 0.1);
    transform: translateY(-1px);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 400;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-clear:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.search-clear i {
    width: 16px;
    height: 16px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0.5rem;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--background-color);
}

.search-result-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.search-result-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.search-result-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-left: auto;
    flex-shrink: 0;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.search-no-results i {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    opacity: 0.5;
}

.search-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.search-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-error {
    padding: 2rem;
    text-align: center;
    color: var(--error-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.search-error i {
    width: 24px;
    height: 24px;
}

.search-results-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.search-results-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success-color);
    font-weight: 600;
}

.search-results-count i {
    width: 16px;
    height: 16px;
}

.search-results-query {
    color: var(--text-muted);
    font-style: italic;
}

.search-result-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

.search-highlight {
    background: rgba(61, 58, 140, 0.2);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.1em 0.2em;
    border-radius: 3px;
}

/* Evidenziazione sezione trovata */
.search-section-highlighted {
    animation: searchSectionHighlight 2s ease-in-out;
    transform: scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    position: relative;
    z-index: 5;
}

/* Evidenziazione servizio trovato */
.search-highlighted {
    animation: searchHighlight 3s ease-in-out;
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    position: relative;
    z-index: 10;
}

@keyframes searchSectionHighlight {
    0% {
        transform: scale(1);
        box-shadow: var(--shadow-sm);
        border-color: var(--border-color);
    }
    10% {
        transform: scale(1.01);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-color);
    }
    90% {
        transform: scale(1.01);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-color);
    }
    100% {
        transform: scale(1);
        box-shadow: var(--shadow-sm);
        border-color: var(--border-color);
    }
}

@keyframes searchHighlight {
    0% {
        transform: scale(1);
        box-shadow: var(--shadow-sm);
        border-color: var(--border-color);
    }
    10% {
        transform: scale(1.02);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-color);
    }
    90% {
        transform: scale(1.02);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-color);
    }
    100% {
        transform: scale(1);
        box-shadow: var(--shadow-sm);
        border-color: var(--border-color);
    }
}

/* Dark mode adjustments for search */
.dark-mode .search-box {
    background: var(--surface-color);
    border-color: var(--border-color);
}

.dark-mode .search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(61, 58, 140, 0.2);
}

.dark-mode .search-results {
    background: var(--surface-color);
    border-color: var(--border-color);
}

.dark-mode .search-result-item:hover {
    background: var(--background-color);
}

/* ========================================
   HERO SECTION - REMOVED
======================================== */

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn::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 ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-rainbow);
    color: white;
    box-shadow: var(--shadow-md);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-ocean);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-info);
    border-radius: inherit;
    padding: 2px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
}

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

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
}

/* ========================================
   LISTINO PREZZI SECTION
======================================== */

.listino-prezzi {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.listino-prezzi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 30%, rgba(118, 75, 162, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(240, 147, 251, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(245, 87, 108, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Mobile adjustments for listino prezzi */
@media (max-width: 768px) {
    .listino-prezzi {
        padding: 2.5rem 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .listino-prezzi {
        padding: 2rem 0 1rem;
    }
}

.listino-header {
    text-align: center;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
}

.listino-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}


.categoria-servizi {
    margin-bottom: 2rem;
    background: var(--surface-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.categoria-servizi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(61, 58, 140, 0.3) 0%, rgba(91, 79, 207, 0.3) 50%, rgba(139, 92, 246, 0.3) 100%);
    transition: all 0.3s ease;
}

.categoria-servizi:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.categoria-servizi:hover::before {
    height: 4px;
}

/* Colori specifici per ogni categoria - più sottili */
.categoria-servizi:nth-child(1)::before {
    background: linear-gradient(90deg, rgba(61, 58, 140, 0.3) 0%, rgba(91, 79, 207, 0.3) 50%, rgba(139, 92, 246, 0.3) 100%);
}

.categoria-servizi:nth-child(2)::before {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.3) 100%);
}

.categoria-servizi:nth-child(3)::before {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.3) 0%, rgba(52, 211, 153, 0.3) 100%);
}

.categoria-servizi:nth-child(4)::before {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.3) 0%, rgba(251, 191, 36, 0.3) 100%);
}

.categoria-servizi:nth-child(5)::before {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.3) 0%, rgba(248, 113, 113, 0.3) 100%);
}

.categoria-servizi:nth-child(6)::before {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

.categoria-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.categoria-title::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

/* Colori specifici per i titoli delle categorie - più sottili */
.categoria-servizi:nth-child(1) .categoria-title::before {
    background: linear-gradient(90deg, rgba(61, 58, 140, 0.4) 0%, rgba(91, 79, 207, 0.4) 50%, rgba(139, 92, 246, 0.4) 100%);
}

.categoria-servizi:nth-child(2) .categoria-title::before {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.4) 0%, rgba(96, 165, 250, 0.4) 100%);
}

.categoria-servizi:nth-child(3) .categoria-title::before {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.4) 0%, rgba(52, 211, 153, 0.4) 100%);
}

.categoria-servizi:nth-child(4) .categoria-title::before {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.4) 0%, rgba(251, 191, 36, 0.4) 100%);
}

.categoria-servizi:nth-child(5) .categoria-title::before {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.4) 0%, rgba(248, 113, 113, 0.4) 100%);
}

.categoria-servizi:nth-child(6) .categoria-title::before {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

/* Desktop layout - no horizontal scroll */
@media (min-width: 1025px) {
    .servizi-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
        overflow-x: visible !important;
        max-width: 100%;
        flex-direction: unset !important;
        padding: 0 !important;
        scroll-behavior: unset !important;
        -webkit-overflow-scrolling: unset !important;
        scrollbar-width: unset !important;
        -ms-overflow-style: unset !important;
        position: unset !important;
        align-items: unset !important;
        justify-content: unset !important;
        scroll-snap-type: unset !important;
        scroll-padding: unset !important;
        margin: 0 0 0.5rem 0 !important;
    }
    
    /* Ensure container doesn't cause horizontal overflow */
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        overflow-x: hidden;
    }
    
    .categoria-servizi {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    /* Ensure all services fit in viewport without horizontal scroll */
    .servizi-grid:has(.servizio-box:nth-child(4)) {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .servizi-grid:has(.servizio-box:nth-child(5)) {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .servizi-grid:has(.servizio-box:nth-child(6)) {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .servizi-grid:has(.servizio-box:nth-child(7)) {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .servizi-grid:has(.servizio-box:nth-child(8)) {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Reset mobile carousel styles for desktop */
    .servizi-grid::after {
        display: none !important;
    }
    
    .servizio-box {
        flex: unset !important;
        min-width: unset !important;
        max-width: unset !important;
        scroll-snap-align: unset !important;
        transform-origin: unset !important;
        position: unset !important;
        margin: 0 !important;
        width: 100% !important;
    }
}

/* Large Desktop layout - optimized for wide screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 0 30px;
    }
    
    .servizi-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
    
    .servizi-grid:has(.servizio-box:nth-child(4)) {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .servizi-grid:has(.servizio-box:nth-child(5)) {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .servizi-grid:has(.servizio-box:nth-child(6)) {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .servizi-grid:has(.servizio-box:nth-child(7)) {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .servizi-grid:has(.servizio-box:nth-child(8)) {
        grid-template-columns: repeat(8, 1fr);
    }
}

.servizio-box {
    background: var(--background-color);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.servizio-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* Colori specifici per le card dei servizi - più sottili */
.categoria-servizi:nth-child(1) .servizio-box::before {
    background: linear-gradient(90deg, rgba(61, 58, 140, 0.3) 0%, rgba(91, 79, 207, 0.3) 50%, rgba(139, 92, 246, 0.3) 100%);
}

.categoria-servizi:nth-child(2) .servizio-box::before {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.3) 100%);
}

.categoria-servizi:nth-child(3) .servizio-box::before {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.3) 0%, rgba(52, 211, 153, 0.3) 100%);
}

.categoria-servizi:nth-child(4) .servizio-box::before {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.3) 0%, rgba(251, 191, 36, 0.3) 100%);
}

.categoria-servizi:nth-child(5) .servizio-box::before {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.3) 0%, rgba(248, 113, 113, 0.3) 100%);
}

.categoria-servizi:nth-child(6) .servizio-box::before {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

.servizio-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.servizio-box:hover::before {
    transform: scaleX(1);
}

/* Effetto hover per mostrare descrizione e prezzo su desktop */
@media (hover: hover) {
    .servizio-box:hover .servizio-descrizione,
    .servizio-box:hover .servizio-prezzo {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

/* Effetto click per mostrare descrizione e prezzo su mobile */
.servizio-box.active .servizio-descrizione,
.servizio-box.active .servizio-prezzo {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
}

.servizio-icon {
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.servizio-icon i {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
}

.servizio-box:hover .servizio-icon i {
    transform: scale(1.1);
    color: var(--primary-color);
}

.servizio-nome {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.servizio-nome::after {
    content: 'Clicca per dettagli';
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 0.175rem;
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-style: italic;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.servizio-box:hover .servizio-nome::after {
    opacity: 1;
}

.servizio-descrizione {
    display: none; /* Nascondi completamente la descrizione */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.servizio-prezzo {
    display: none; /* Nascondi completamente il prezzo */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Miglioramenti specifici per i prezzi */
.servizio-prezzo::before {
    content: '';
    display: inline-block;
    width: 0.3em;
}

.servizio-prezzo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(61, 58, 140, 0.2) 50%, transparent 100%);
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 0.5px;
}

.servizio-box:hover .servizio-prezzo::after {
    opacity: 1;
    transform: scaleX(1.02);
}

/* Stile Apple per i prezzi - più pulito e minimalista */
.servizio-prezzo {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Colori specifici per i prezzi - più sottili */
.categoria-servizi:nth-child(1) .servizio-prezzo {
    background: linear-gradient(90deg, rgba(61, 58, 140, 0.7) 0%, rgba(91, 79, 207, 0.7) 50%, rgba(139, 92, 246, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categoria-servizi:nth-child(2) .servizio-prezzo {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.7) 0%, rgba(96, 165, 250, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categoria-servizi:nth-child(3) .servizio-prezzo {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.7) 0%, rgba(52, 211, 153, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categoria-servizi:nth-child(4) .servizio-prezzo {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.7) 0%, rgba(251, 191, 36, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categoria-servizi:nth-child(5) .servizio-prezzo {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.7) 0%, rgba(248, 113, 113, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categoria-servizi:nth-child(6) .servizio-prezzo {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prezzo-note {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.02em;
    line-height: 1.4;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    opacity: 0.8;
}

.categoria-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    line-height: 1.5;
}

/* ========================================
   PROGETTI DI RIFERIMENTO SECTION
======================================== */

.progetti-riferimento {
    padding: 6rem 0;
    background: var(--surface-color);
    position: relative;
    overflow: hidden;
}

.progetti-riferimento::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(61, 58, 140, 0.02) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.progetti-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.progetti-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.progetti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.progetto-card {
    background: var(--background-color);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.progetto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.progetto-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.progetto-card:hover::before {
    transform: scaleX(1);
}

.progetto-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.progetto-card:hover .progetto-icon {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.progetto-icon i {
    width: 28px;
    height: 28px;
}

.progetto-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.progetto-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.progetto-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.progetto-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--gradient-ocean);
}

.progetto-link i {
    width: 16px;
    height: 16px;
}

/* Dark mode adjustments */
.dark-mode .progetti-riferimento {
    background: var(--surface-color);
}

.dark-mode .progetto-card {
    background: var(--background-color);
    border-color: var(--border-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .progetti-riferimento {
        padding: 4rem 0;
    }
    
    .progetti-header {
        margin-bottom: 3rem;
    }
    
    .progetti-desc {
        font-size: 1rem;
    }
    
    .progetti-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .progetto-card {
        padding: 1.5rem;
    }
    
    .progetto-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1.25rem;
    }
    
    .progetto-icon i {
        width: 24px;
        height: 24px;
    }
    
    .progetto-title {
        font-size: 1.25rem;
    }
    
    .progetto-desc {
        font-size: 0.9rem;
    }
    
    .progetto-link {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .progetti-riferimento {
        padding: 3rem 0;
    }
    
    .progetti-header {
        margin-bottom: 2.5rem;
    }
    
    .progetti-grid {
        gap: 1.25rem;
    }
    
    .progetto-card {
        padding: 1.25rem;
    }
    
    .progetto-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 1rem;
    }
    
    .progetto-icon i {
        width: 22px;
        height: 22px;
    }
    
    .progetto-title {
        font-size: 1.1rem;
    }
    
    .progetto-desc {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }
    
    .progetto-link {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   CONTATTI SECTION
======================================== */

.contatti {
    padding: 6rem 0;
    background: var(--gradient-sunset);
    position: relative;
}

.contatti::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 154, 158, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(254, 207, 239, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.contatti-desc {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.contatti-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
}

.contatti-form {
    margin-top: 3rem;
    text-align: left;
    background: var(--background-color);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--surface-color);
    color: var(--text-primary);
    font-family: inherit;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(61, 58, 140, 0.1);
    transform: translateY(-1px);
}

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

.footer {
    background: var(--text-primary);
    color: var(--surface-color);
    padding: 2rem 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--surface-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

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

.social-link i {
    width: 20px;
    height: 20px;
}

/* ========================================
   DARK MODE ADJUSTMENTS
======================================== */

.dark-mode .hero::before {
    background: radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(61, 58, 140, 0.2) 0%, transparent 50%);
}

.dark-mode .contatti::before {
    background: radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(61, 58, 140, 0.1) 0%, transparent 50%);
}

.dark-mode .prezzo-item:hover {
    background: rgba(30, 41, 59, 0.5);
}

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

/* Prevenzione spazi bianchi e overflow */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Assicura che tutti gli elementi rispettino i limiti del viewport */
.listino-prezzi,
.categoria-servizi,
.servizi-grid,
.servizio-box,
.header,
.footer,
.contatti,
.container {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .listino-title {
        font-size: 2.2rem;
    }
    
    .categoria-servizi {
        padding: 1.25rem;
    }
    
    .servizi-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
        overflow-x: visible;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: nowrap;
        gap: 1rem;
        padding: 0.75rem 0;
    }
    
    .logo {
        gap: 0.5rem;
        flex: 0 0 auto;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .search-container {
        flex: 1;
        max-width: none;
    }
    
    .search-box {
        padding: 0.625rem 0.875rem;
    }
    
    .search-input {
        font-size: 0.95rem;
    }
    
    
    .listino-title {
        font-size: 2rem;
    }
    
    .categoria-servizi {
        padding: 1rem;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        overflow: hidden;
    }
    
    
    .categoria-title {
        font-size: 1.5rem;
    }
    
    /* Layout scroll semplice stile Apple per mobile */
    .servizi-grid {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 1rem;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-snap-type: x mandatory;
        scroll-padding: 1rem;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Nascondi scrollbar WebKit */
    .servizi-grid::-webkit-scrollbar {
        display: none;
    }
    
    /* Indicatore di scroll per mobile */
    .servizi-grid::after {
        content: '← Scorri per navigare →';
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        color: var(--text-muted);
        white-space: nowrap;
        opacity: 0.7;
        pointer-events: none;
        font-weight: 500;
        letter-spacing: 0.5px;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0%, 100% { opacity: 0.7; }
        50% { opacity: 1; }
    }
    
    .servizio-box {
        flex: 0 0 280px;
        padding: 1.25rem;
        min-width: 280px;
        max-width: 280px;
        scroll-snap-align: center;
        transition: all 0.2s ease;
        position: relative;
        border-radius: 12px;
        background: var(--surface-color);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        margin: 0;
        box-sizing: border-box;
    }
    
    /* Ottimizzazioni specifiche per iPhone */
    @media (max-width: 414px) {
        .servizi-grid {
            gap: 0.75rem;
            padding: 0.75rem;
        }
        
        .servizio-box {
            flex: 0 0 260px;
            min-width: 260px;
            max-width: 260px;
            padding: 1rem;
        }
    }
    
    /* Ottimizzazioni per iPhone SE e schermi piccoli */
    @media (max-width: 375px) {
        .servizi-grid {
            gap: 0.5rem;
            padding: 0.5rem;
        }
        
        .servizio-box {
            flex: 0 0 240px;
            min-width: 240px;
            max-width: 240px;
            padding: 0.875rem;
        }
    }
    
    /* Effetto carousel uniforme - tutte le card hanno lo stesso aspetto */
    .servizio-box {
        transform: scale(1);
        opacity: 1;
        z-index: 1;
        filter: none;
        box-shadow: var(--shadow-sm);
        border-color: var(--border-color);
    }
    
    /* Card attiva quando è in focus - solo bordo colorato */
    .servizio-box.active {
        border-color: var(--primary-color);
        box-shadow: var(--shadow-md);
    }
    
    /* Card duplicate per effetto infinito */
    .servizio-box.duplicate {
        pointer-events: none;
    }
    
    .servizio-box.duplicate-first {
        order: -1;
    }
    
    .servizio-box.duplicate-last {
        order: 1;
    }
    
    .servizio-nome {
        font-size: 1.1rem;
    }
    
    .servizio-nome::after {
        font-size: 0.15rem;
        bottom: -18px;
    }
    
    .servizio-descrizione {
        font-size: 0.9rem;
    }
    
    .servizio-prezzo {
        font-size: 1.4rem;
        letter-spacing: -0.015em;
        font-weight: 600;
    }
    
    .servizio-descrizione {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .servizio-nome {
        font-size: 1.1rem;
        letter-spacing: 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Layout carousel ottimizzato per schermi piccoli */
    .servizi-grid {
        display: flex;
        flex-direction: row;
        gap: 0.75rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 1rem 0;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin: 0;
        align-items: stretch;
        justify-content: flex-start;
        scroll-snap-type: x mandatory;
        scroll-padding: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .servizi-grid::-webkit-scrollbar {
        display: none;
    }
    
    .servizio-box {
        flex: 0 0 260px;
        padding: 1.25rem;
        min-width: 260px;
        max-width: 260px;
        margin: 0;
        scroll-snap-align: center;
        transition: all 0.3s ease;
        transform-origin: center;
        position: relative;
        border-radius: 14px;
        background: var(--surface-color);
        border: 2px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        box-sizing: border-box;
    }
    
    /* Effetto carousel uniforme per schermi piccoli */
    .servizio-box {
        transform: scale(1);
        opacity: 1;
        z-index: 1;
        box-shadow: var(--shadow-sm);
        border-color: var(--border-color);
    }
    
    .servizio-box.active {
        border-color: var(--primary-color);
        box-shadow: var(--shadow-md);
    }
    
    .servizio-nome {
        font-size: 1rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .categoria-servizi {
        padding: 0.75rem;
        margin-bottom: 1rem;
        overflow-x: hidden;
    }
    
    .categoria-title {
        font-size: 1.2rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .header-content {
        padding: 0.5rem 0;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }
    
    .logo {
        flex: 0 0 auto;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .search-container {
        flex: 1;
        max-width: none;
    }
    
    .search-box {
        padding: 0.5rem 0.75rem;
    }
    
    .search-input {
        font-size: 0.9rem;
    }
    
    .search-icon {
        width: 18px;
        height: 18px;
        margin-right: 0.5rem;
    }
    
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .listino-title {
        font-size: 1.8rem;
    }
    
    .categoria-servizi {
        padding: 0.875rem;
        margin-bottom: 1.25rem;
    }
    
    .categoria-title {
        font-size: 1.3rem;
    }
    
    .servizio-box {
        padding: 1rem;
    }
    
    .servizio-nome {
        font-size: 1rem;
    }
    
    .servizio-nome::after {
        font-size: 0.14rem;
        bottom: -16px;
    }
    
    .servizio-descrizione {
        font-size: 0.85rem;
    }
    
    .servizio-prezzo {
        font-size: 1.3rem;
        letter-spacing: -0.01em;
        font-weight: 600;
    }
    
    .servizio-descrizione {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .servizio-nome {
        font-size: 1rem;
        letter-spacing: 0;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .contatti-form {
        padding: 1.5rem;
    }
}

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

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

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


.categoria-servizi {
    animation: fadeInUp 0.6s ease-out;
}

.categoria-servizi:nth-child(1) { animation-delay: 0.1s; }
.categoria-servizi:nth-child(2) { animation-delay: 0.2s; }
.categoria-servizi:nth-child(3) { animation-delay: 0.3s; }
.categoria-servizi:nth-child(4) { animation-delay: 0.4s; }
.categoria-servizi:nth-child(5) { animation-delay: 0.5s; }
.categoria-servizi:nth-child(6) { animation-delay: 0.6s; }

.servizio-box {
    animation: slideInRight 0.4s ease-out;
}

.servizio-box:nth-child(1) { animation-delay: 0.1s; }
.servizio-box:nth-child(2) { animation-delay: 0.2s; }
.servizio-box:nth-child(3) { animation-delay: 0.3s; }
.servizio-box:nth-child(4) { animation-delay: 0.4s; }


/* ========================================
   SERVICE DETAIL PAGES
======================================== */

.service-pages-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background-color);
    z-index: 10001;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-pages-container.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.service-page {
    min-height: 100vh;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    position: relative;
}

.service-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 30%, rgba(118, 75, 162, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(240, 147, 251, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(245, 87, 108, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.service-page-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.dark-mode .service-page-header {
    background: rgba(30, 41, 59, 0.95);
}

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

.service-page-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.service-page-back:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.service-page-back i {
    width: 20px;
    height: 20px;
}

.service-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.service-page-close {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.service-page-close:hover {
    background: var(--error-color);
    color: white;
    transform: scale(1.1);
}

.service-page-close i {
    width: 20px;
    height: 20px;
}

.service-page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.service-hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
}

.service-hero-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.service-hero-icon i {
    width: 40px;
    height: 40px;
}

.service-hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.service-hero-price {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.service-sections {
    display: grid;
    gap: 3rem;
    margin-bottom: 4rem;
}

.service-section {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 20px 20px 0 0;
}

.service-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-section-title i {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.service-section-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.service-section-content p {
    margin-bottom: 1.5rem;
}

.service-section-content p:last-child {
    margin-bottom: 0;
}

.service-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-feature {
    background: var(--background-color);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.service-feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.service-feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
}

.service-feature-icon i {
    width: 24px;
    height: 24px;
}

.service-feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.service-feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Projects Gallery Section */
.service-projects {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 20px 20px 0 0;
}

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

.project-card {
    background: var(--background-color);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

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

.project-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
}

.project-placeholder i {
    width: 48px;
    height: 48px;
    opacity: 0.6;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

    .project-link i {
        width: 16px;
        height: 16px;
    }
    
    .project-features-title,
    .project-technologies-title {
        font-size: 0.85rem;
    }
    
    .project-features-list li {
        font-size: 0.8rem;
    }
    
    .tech-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

.project-link.secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.project-link.secondary:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
}

/* Project Features */
.project-features {
    margin: 1rem 0;
}

.project-features-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-features-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.375rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.project-features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.8rem;
}

/* Project Technologies */
.project-technologies {
    margin: 1rem 0;
}

.project-technologies-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-technologies-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* CTA Section */
.service-cta {
    background: var(--gradient-primary);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    margin-top: 3rem;
}

.service-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.service-cta-content {
    position: relative;
    z-index: 1;
}

.service-cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.service-cta-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.service-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.service-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.service-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--background-color);
}

.service-cta-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    box-shadow: none;
}

.service-cta-btn.secondary:hover {
    background: white;
    color: var(--primary-color);
}

.service-cta-btn i {
    width: 20px;
    height: 20px;
}

/* Dark mode adjustments */
.dark-mode .service-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.dark-mode .service-page::before {
    background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 30%, rgba(61, 58, 140, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(245, 87, 108, 0.1) 0%, transparent 50%);
}

.dark-mode .service-section {
    background: var(--surface-color);
    border-color: var(--border-color);
}

.dark-mode .service-feature {
    background: var(--background-color);
    border-color: var(--border-color);
}

.dark-mode .service-projects {
    background: var(--surface-color);
    border-color: var(--border-color);
}

.dark-mode .project-card {
    background: var(--background-color);
    border-color: var(--border-color);
}

/* ========================================
   RESPONSIVE DESIGN - SERVICE PAGES
======================================== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .service-page-content {
        max-width: 1400px;
    }
    
    .service-hero-title {
        font-size: 3.5rem;
    }
    
    .service-section {
        padding: 3rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .service-page-content {
        max-width: 1000px;
    }
    
    .service-hero-title {
        font-size: 3.2rem;
    }
    
    .service-section {
        padding: 2.75rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Large (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .service-page-header {
        padding: 0.875rem 0;
        margin-bottom: 1.75rem;
    }
    
    .service-page-nav {
        padding: 0 20px;
        gap: 1rem;
    }
    
    .service-page-title {
        font-size: 1.4rem;
    }
    
    .service-page-content {
        padding: 0 20px;
    }
    
    .service-hero {
        padding: 2.5rem 0;
        margin-bottom: 3.5rem;
    }
    
    .service-hero-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-hero-icon i {
        width: 35px;
        height: 35px;
    }
    
    .service-hero-title {
        font-size: 2.8rem;
    }
    
    .service-hero-subtitle {
        font-size: 1.15rem;
    }
    
    .service-hero-price {
        font-size: 2.2rem;
    }
    
    .service-sections {
        gap: 2.5rem;
        margin-bottom: 3.5rem;
    }
    
    .service-section {
        padding: 2rem;
    }
    
    .service-section-title {
        font-size: 1.8rem;
    }
    
    .service-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
    
    .service-cta {
        padding: 2.5rem;
    }
    
    .service-cta-title {
        font-size: 2.2rem;
    }
    
    .service-cta-actions {
        gap: 1.25rem;
    }
}

/* Tablet (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
    .service-page-header {
        padding: 0.75rem 0;
        margin-bottom: 1.5rem;
    }
    
    .service-page-nav {
        padding: 0 15px;
        gap: 0.75rem;
    }
    
    .service-page-back {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .service-page-title {
        font-size: 1.3rem;
    }
    
    .service-page-close {
        width: 40px;
        height: 40px;
    }
    
    .service-page-content {
        padding: 0 15px;
    }
    
    .service-hero {
        padding: 2rem 0;
        margin-bottom: 3rem;
    }
    
    .service-hero-icon {
        width: 65px;
        height: 65px;
    }
    
    .service-hero-icon i {
        width: 32px;
        height: 32px;
    }
    
    .service-hero-title {
        font-size: 2.5rem;
    }
    
    .service-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .service-hero-price {
        font-size: 2rem;
    }
    
    .service-sections {
        gap: 2rem;
        margin-bottom: 3rem;
    }
    
    .service-section {
        padding: 1.75rem;
    }
    
    .service-section-title {
        font-size: 1.7rem;
        gap: 0.75rem;
    }
    
    .service-section-title i {
        width: 28px;
        height: 28px;
    }
    
    .service-features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-feature {
        padding: 1.25rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        border-radius: 14px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-content {
        padding: 1.25rem;
    }
    
    .service-cta {
        padding: 2rem;
    }
    
    .service-cta-title {
        font-size: 2rem;
    }
    
    .service-cta-description {
        font-size: 1.1rem;
    }
    
    .service-cta-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .service-cta-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}

/* Mobile Large (480px - 599px) */
@media (max-width: 599px) and (min-width: 480px) {
    .service-page-header {
        padding: 0.625rem 0;
        margin-bottom: 1.25rem;
    }
    
    .service-page-nav {
        padding: 0 12px;
        gap: 0.5rem;
    }
    
    .service-page-back {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        gap: 0.375rem;
    }
    
    .service-page-back i {
        width: 16px;
        height: 16px;
    }
    
    .service-page-title {
        font-size: 1.2rem;
    }
    
    .service-page-close {
        width: 36px;
        height: 36px;
    }
    
    .service-page-close i {
        width: 18px;
        height: 18px;
    }
    
    .service-page-content {
        padding: 0 12px;
    }
    
    .service-hero {
        padding: 1.75rem 0;
        margin-bottom: 2.5rem;
    }
    
    .service-hero-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .service-hero-icon i {
        width: 30px;
        height: 30px;
    }
    
    .service-hero-title {
        font-size: 2.2rem;
        margin-bottom: 0.75rem;
    }
    
    .service-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .service-hero-price {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .service-sections {
        gap: 1.75rem;
        margin-bottom: 2.5rem;
    }
    
    .service-section {
        padding: 1.5rem;
    }
    
    .service-section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
        gap: 0.625rem;
    }
    
    .service-section-title i {
        width: 26px;
        height: 26px;
    }
    
    .service-section-content {
        font-size: 1rem;
    }
    
    .service-features-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
        margin-top: 1.5rem;
    }
    
    .service-feature {
        padding: 1.125rem;
    }
    
    .service-feature-icon {
        width: 42px;
        height: 42px;
        margin-bottom: 0.875rem;
    }
    
    .service-feature-icon i {
        width: 22px;
        height: 22px;
    }
    
    .service-feature-title {
        font-size: 1.1rem;
        margin-bottom: 0.625rem;
    }
    
    .service-feature-description {
        font-size: 0.9rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .project-card {
        border-radius: 12px;
    }
    
    .project-image {
        height: 160px;
    }
    
    .project-placeholder {
        font-size: 1rem;
    }
    
    .project-placeholder i {
        width: 42px;
        height: 42px;
    }
    
    .project-content {
        padding: 1.125rem;
    }
    
    .project-title {
        font-size: 1.2rem;
        margin-bottom: 0.625rem;
    }
    
    .project-description {
        font-size: 0.9rem;
        margin-bottom: 0.875rem;
    }
    
    .project-links {
        gap: 0.75rem;
    }
    
    .project-link {
        padding: 0.375rem 0.875rem;
        font-size: 0.85rem;
    }
    
    .project-link i {
        width: 14px;
        height: 14px;
    }
    
    .project-features-title,
    .project-technologies-title {
        font-size: 0.8rem;
    }
    
    .project-features-list li {
        font-size: 0.75rem;
    }
    
    .tech-tag {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }
    
    .service-cta {
        padding: 1.75rem;
        margin-top: 2.5rem;
    }
    
    .service-cta-title {
        font-size: 1.8rem;
        margin-bottom: 0.875rem;
    }
    
    .service-cta-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .service-cta-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.875rem;
    }
    
    .service-cta-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .service-cta-btn i {
        width: 18px;
        height: 18px;
    }
}

/* Mobile Small (320px - 479px) */
@media (max-width: 479px) {
    .service-page-header {
        padding: 0.5rem 0;
        margin-bottom: 1rem;
    }
    
    .service-page-nav {
        padding: 0 10px;
        gap: 0.375rem;
    }
    
    .service-page-back {
        padding: 0.375rem 0.875rem;
        font-size: 0.8rem;
        gap: 0.25rem;
        border-radius: 10px;
    }
    
    .service-page-back i {
        width: 14px;
        height: 14px;
    }
    
    .service-page-title {
        font-size: 1.1rem;
    }
    
    .service-page-close {
        width: 32px;
        height: 32px;
    }
    
    .service-page-close i {
        width: 16px;
        height: 16px;
    }
    
    .service-page-content {
        padding: 0 10px;
    }
    
    .service-hero {
        padding: 1.5rem 0;
        margin-bottom: 2rem;
    }
    
    .service-hero-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 1.25rem;
    }
    
    .service-hero-icon i {
        width: 28px;
        height: 28px;
    }
    
    .service-hero-title {
        font-size: 1.9rem;
        margin-bottom: 0.625rem;
        line-height: 1.1;
    }
    
    .service-hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }
    
    .service-hero-price {
        font-size: 1.6rem;
        margin-bottom: 1.25rem;
    }
    
    .service-sections {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .service-section {
        padding: 1.25rem;
    }
    
    .service-section-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .service-section-title i {
        width: 24px;
        height: 24px;
    }
    
    .service-section-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .service-features-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: 1.25rem;
    }
    
    .service-feature {
        padding: 1rem;
    }
    
    .service-feature-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 0.75rem;
    }
    
    .service-feature-icon i {
        width: 20px;
        height: 20px;
    }
    
    .service-feature-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .service-feature-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.25rem;
    }
    
    .project-card {
        border-radius: 10px;
    }
    
    .project-image {
        height: 140px;
    }
    
    .project-placeholder {
        font-size: 0.9rem;
    }
    
    .project-placeholder i {
        width: 38px;
        height: 38px;
    }
    
    .project-content {
        padding: 1rem;
    }
    
    .project-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .project-description {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
        line-height: 1.5;
    }
    
    .project-links {
        gap: 0.625rem;
        flex-direction: column;
    }
    
    .project-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
        justify-content: center;
    }
    
    .project-link i {
        width: 13px;
        height: 13px;
    }
    
    .project-features-title,
    .project-technologies-title {
        font-size: 0.75rem;
    }
    
    .project-features-list li {
        font-size: 0.7rem;
    }
    
    .tech-tag {
        font-size: 0.6rem;
        padding: 0.1rem 0.4rem;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
    }
    
    .theme-icon {
        width: 18px;
        height: 18px;
    }
    
    .service-cta {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .service-cta-title {
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
    }
    
    .service-cta-description {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }
    
    .service-cta-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .service-cta-btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .service-cta-btn i {
        width: 16px;
        height: 16px;
    }
}

/* Extra Small Mobile (max 360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Layout carousel ottimizzato per schermi molto piccoli */
    .servizi-grid {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 1rem 0;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin: 0;
        align-items: stretch;
        justify-content: flex-start;
        scroll-snap-type: x mandatory;
        scroll-padding: 1rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .servizi-grid::-webkit-scrollbar {
        display: none;
    }
    
    .servizio-box {
        flex: 0 0 240px;
        padding: 1rem;
        min-width: 240px;
        max-width: 240px;
        margin: 0;
        scroll-snap-align: center;
        transition: all 0.3s ease;
        transform-origin: center;
        position: relative;
        border-radius: 12px;
        background: var(--surface-color);
        border: 2px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        box-sizing: border-box;
    }
    
    /* Effetto carousel uniforme per schermi molto piccoli */
    .servizio-box {
        transform: scale(1);
        opacity: 1;
        z-index: 1;
        box-shadow: var(--shadow-sm);
        border-color: var(--border-color);
    }
    
    .servizio-box.active {
        border-color: var(--primary-color);
        box-shadow: var(--shadow-md);
    }
    
    .servizio-nome {
        font-size: 0.9rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .servizio-nome::after {
        font-size: 0.125rem;
        bottom: -14px;
    }
    
    .categoria-servizi {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
        overflow-x: hidden;
    }
    
    .categoria-title {
        font-size: 1.1rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .listino-title {
        font-size: 1.5rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .header-content {
        padding: 0.375rem 0;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .logo-icon {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .search-box {
        padding: 0.375rem 0.625rem;
    }
    
    .search-input {
        font-size: 0.85rem;
    }
    
    .search-icon {
        width: 16px;
        height: 16px;
        margin-right: 0.375rem;
    }
}

/* Extra Small Mobile (max 320px) */
@media (max-width: 320px) {
    .service-page-nav {
        padding: 0 8px;
    }
    
    .service-page-content {
        padding: 0 8px;
    }
    
    .service-hero-title {
        font-size: 1.7rem;
    }
    
    .service-hero-price {
        font-size: 1.4rem;
    }
    
    .service-section {
        padding: 1rem;
    }
    
    .service-section-title {
        font-size: 1.2rem;
    }
    
    .service-cta {
        padding: 1.25rem;
    }
    
    .service-cta-title {
        font-size: 1.4rem;
    }
}

/* ========================================
   TOUCH AND ACCESSIBILITY IMPROVEMENTS
======================================== */

/* Touch targets minimum size */
.service-page-back,
.service-page-close,
.service-cta-btn,
.project-link {
    min-height: 44px;
    min-width: 44px;
}

/* Focus states for accessibility */
.service-page-back:focus,
.service-page-close:focus,
.service-cta-btn:focus,
.project-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scrolling for better UX */
.service-pages-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal scroll on mobile */
.service-page {
    overflow-x: hidden;
}

/* Prevent horizontal scroll on all main elements */
.listino-prezzi,
.categoria-servizi,
.servizi-grid,
.servizio-box,
.header,
.footer,
.contatti {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure all text elements wrap properly and don't cause overflow */
.servizio-nome,
.categoria-title,
.listino-title,
.section-title,
.servizio-prezzo,
.servizio-descrizione {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* Prevent any element from causing horizontal scroll */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure images and media don't overflow */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}


/* Additional mobile optimizations */
@media (max-width: 480px) {
    /* Ensure no element exceeds viewport width */
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    /* Improve touch targets */
    .servizio-box {
        min-height: 60px;
        touch-action: manipulation;
    }
    
    /* Better spacing for very small screens */
    .listino-prezzi {
        padding: 1.5rem 0 1rem;
    }
    
    .listino-header {
        margin-bottom: 1rem;
    }
    
    /* Ensure search box doesn't overflow */
    .search-container {
        min-width: 0;
        flex: 1;
    }
    
    .search-box {
        min-width: 0;
        width: 100%;
    }
    
    .search-input {
        min-width: 0;
        width: 100%;
    }
    
    /* Prevent horizontal scroll completely */
    .servizi-grid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .servizio-box {
        margin: 0;
        flex-shrink: 0;
    }
}

/* Better text selection */
.service-section-content,
.service-feature-description,
.project-description {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Improved touch feedback */
.service-page-back:active,
.service-page-close:active,
.service-cta-btn:active,
.project-link:active {
    transform: scale(0.98);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-section {
        border: 2px solid var(--text-primary);
    }
    
    .service-feature {
        border: 1px solid var(--text-primary);
    }
    
    .project-card {
        border: 1px solid var(--text-primary);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .service-pages-container,
    .service-page-back,
    .service-page-close,
    .service-cta-btn,
    .project-link,
    .service-feature,
    .project-card {
        transition: none;
    }
    
    .service-pages-container {
        transform: none;
    }
}

/* Print styles */
@media print {
    .service-page-header,
    .service-cta {
        display: none;
    }
    
    .service-page {
        background: white;
        color: black;
    }
    
    .service-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

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

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}