/* ===================================
   RESET E VARIABILI
   =================================== */

:root {
    /* Colori */
    --primary-color: #FF6B35;
    --secondary-color: #004E89;
    --accent-color: #F77F00;
    --dark-color: #4a4a4a;
    --light-color: #faf8f5;
    --white: #FFFFFF;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --success-color: #28a745;
    --error-color: #dc3545;
    
    /* Font — Corporate: Montserrat titoli, Inter testi */
    --font-primary: 'Inter', 'Roboto', sans-serif;
    --font-heading: 'Montserrat', 'Space Grotesk', sans-serif;
    
    /* Spaziature */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Transizioni */
    --transition: all 0.3s ease;
    --home-gradient-dark: radial-gradient(circle at 92% 8%, #8a99ad 0%, rgba(138, 153, 173, 0) 48%), radial-gradient(circle at 8% 92%, #8392a5 0%, rgba(131, 146, 165, 0) 52%), linear-gradient(180deg, #9ba8ba 0%, #8b99ac 52%, #a4b2c4 82%, #b8c5d6 100%);
}

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

html {
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

/* ===================================
   ACCESSIBILITÀ
   =================================== */

/* Skip-to-content — visibile solo con focus da tastiera */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-to-content:focus {
    top: 0;
}

/* Focus visibile per navigazione da tastiera */
:focus {
    outline: none;
}
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Focus su elementi scuri (chi siamo, modal) */
.chi-siamo-video-content :focus-visible,
.modal-content :focus-visible {
    outline-color: #fff;
}

/* Nasconde visivamente ma mantiene accessibile agli screen reader */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
    scroll-margin-top: 96px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
    border-bottom: none;
    z-index: 1000;
    transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

@media (min-width: 769px) {
    .logo a {
        padding: 0;
        background: transparent;
    }

    .logo-switcher {
        width: 220px;
        height: 84px;
        position: relative;
        background: var(--home-gradient-dark);
        border-radius: 10px;
        overflow: hidden;
    }

    .logo-switcher::before,
    .logo-switcher::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        height: 8px;
        pointer-events: none;
    }

    .logo-switcher::before {
        top: 0;
        background: linear-gradient(
            90deg,
            rgba(150, 160, 173, 0.2) 0%,
            rgba(150, 160, 173, 0.55) 50%,
            rgba(150, 160, 173, 0.2) 100%
        );
    }

    .logo-switcher::after {
        bottom: 0;
        background: linear-gradient(
            90deg,
            rgba(145, 156, 170, 0.18) 0%,
            rgba(145, 156, 170, 0.5) 50%,
            rgba(145, 156, 170, 0.18) 100%
        );
    }

    .logo-switcher-img {
        height: 74px;
    }
}

.header-scrolled {
    background: #ffffff;
    box-shadow: 0 1px 24px rgba(0, 0, 0, 0.08);
    border-bottom-color: transparent;
}

/* Header trasparente — regole :not(.header-scrolled) non più necessarie, rimosse */

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    position: relative;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* Logo Switcher — cross-fade animation tra immagine e nome testuale */
.logo-switcher {
    position: relative;
    width: 200px;
    height: 110px;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-switcher-img,
.logo-switcher-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.8s ease;
    white-space: nowrap;
}

.logo-switcher-img {
    height: 100px;
    width: auto;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.8s ease, filter 0.35s ease;
}

.logo-switcher-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #333333; /* Grigio Antracite */
    opacity: 0;
    text-align: center;
    max-width: 200px;
    line-height: 1.25;
}

.logo-show-text .logo-switcher-img { opacity: 0; }
.logo-show-text .logo-switcher-text { opacity: 1; }

.nav ul {
    display: flex;
    gap: 2rem;
}

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

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

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

.nav-link:hover {
    color: var(--primary-color);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

/* --- Mobile: logo link wrapper --- */
.header-mobile-brand-link {
    display: none;
}

/* Logo mobile centrato — visibile solo su mobile, centrato nell'header */
.header-mobile-brand {
    display: none;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    border-radius: 3px;
    transition: background 0.35s ease, transform 0.3s ease, opacity 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===================================
   THEME SELECTOR
   =================================== */

.theme-selector {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

.theme-link {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    border: 1.5px solid transparent;
    transition: all 0.22s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.theme-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.theme-link.active {
    color: var(--white);
    background: var(--primary-color);
    border-color: var(--primary-color);
}

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

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

/* ---- Background Slider ---- */
.hero-bg-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-slide {
    position: absolute;
    top: 96px; /* sotto l'header fisso (logo 80px + padding ridotto) */
    left: 0;
    right: 0;
    bottom: 0;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #111;
    opacity: 0;
    transition: opacity 0.6s ease;
    will-change: opacity;
}

.hero-bg-slide.active {
    opacity: 1;
}

/* Frecce navigazione sfondo */
.hero-bg-btn {
    position: absolute;
    top: calc(50% + 56px); /* centrato nell'area visibile sotto l'header (112px/2 = 56px) */
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.2s ease;
    user-select: none;
}

.hero-bg-btn:hover {
    background: rgba(0, 0, 0, 0.70);
    transform: translateY(-50%) scale(1.08);
}

.hero-bg-prev { left: 20px; }
.hero-bg-next { right: 20px; }

/* Dot indicators */
.hero-bg-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
}

.hero-bg-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
}

.hero-bg-dot.active {
    background: #fff;
    transform: scale(1.3);
}

.hero-bg-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Etichetta opzione */
.hero-bg-label {
    position: absolute;
    bottom: 54px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.25);
    white-space: nowrap;
    pointer-events: none;
}

/* Overlay e contenuto hero */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: none;
}

.hero-content {
    display: none;
    position: relative;
    z-index: 5;
}

/* ---- Static Hero — immagine centrata su sfondo bianco ---- */
.hero-static {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    margin-top: 0;
    background: var(--home-gradient-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 1rem 2rem;
    overflow: visible;
    /* Su schermi bassi evita che la sezione superi il viewport */
    box-sizing: border-box;
}

.hero-static::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% 10%, rgba(70, 81, 96, 0.28) 0%, rgba(70, 81, 96, 0) 52%),
        radial-gradient(circle at 10% 90%, rgba(64, 74, 88, 0.24) 0%, rgba(64, 74, 88, 0) 56%),
        radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 58%);
    pointer-events: none;
    z-index: 0;
}

/* Divisore SVG curvo tra Hero e sezione Auto */
.hero-wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 68px;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.hero-wave-divider svg {
    display: block;
    width: 100%;
    height: 68px;
}

.hero-wave-divider .wave-back {
    opacity: 0.92;
    animation: waveBackFloat 8s ease-in-out infinite;
}

.hero-wave-divider .wave-front {
    opacity: 1;
    animation: waveFrontFloat 5.2s ease-in-out infinite;
}

@keyframes waveFrontFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

@keyframes waveBackFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

/* Legacy bg div nascosto — ora si usa <img class="hero-img"> */
.hero-static-bg {
    display: none;
}

.hero-img {
    display: block;
    max-width: 1200px;
    width: 96%;
    height: auto;
    /* Limita l'altezza su schermi bassi: l'immagine non supera mai lo spazio disponibile sotto l'header */
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 16px;
    opacity: 0;
    animation: heroFadeIn 0.9s ease-out both;
    position: relative;
    z-index: 1;
}

@keyframes heroFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Scroll indicator */
.hero-scroll-hint {
    position: absolute;
    bottom: 46px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-decoration: none;
    cursor: pointer;
    animation: hintFade 1s ease 1.6s both;
}

.scroll-hint-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.scroll-hint-arrow {
    display: block;
    color: var(--primary-color);
    animation: bounceChevron 1.8s ease-in-out 1.8s infinite;
    margin-top: -6px;
}

.scroll-hint-arrow2 {
    animation-delay: 2.1s;
    opacity: 0.45;
    margin-top: -14px;
}

@keyframes bounceChevron {
    0%, 100% { transform: translateY(0);   opacity: 1; }
    50%       { transform: translateY(6px); opacity: 0.7; }
}

@keyframes hintFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.hero-static .hero-overlay {
    background: none;
}

.hero-content-visible {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 5;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
}

.hero-title-dark { color: var(--white); }
.hero-subtitle-dark { color: rgba(255,255,255,0.88); }

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    text-shadow: 2px 3px 6px rgba(0, 0, 0, 0.5);
}

.hero-title-sub {
    font-size: 0.55em;
    font-weight: 400;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

/* ===================================
   AUTO SECTION HEADER
   =================================== */

.auto-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    position: relative;
}

.auto-section-header > div {
    text-align: center;
    flex: 1;
}

.auto-section-header .section-title {
    margin-bottom: var(--spacing-xs);
    text-align: center;
}

.auto-section-header .section-subtitle {
    text-align: center;
    margin-bottom: 0;
}

.auto-section-header .filter-drawer-btn {
    position: absolute;
    right: 0;
    bottom: 0.25rem;
}

/* Filter Drawer Button */
.filter-drawer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.2rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    margin-bottom: 0.5rem;
    font-family: var(--font-primary);
}

.filter-drawer-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===================================
   FILTER DRAWER
   =================================== */

.filter-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.filter-drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.filter-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 380px;
    max-width: 80vw;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 1501;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.filter-drawer.active {
    transform: translateX(0);
}

.filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-drawer-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--dark-color);
}

.filter-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem;
    color: var(--text-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-drawer-close:hover {
    background: var(--light-color);
    color: var(--dark-color);
}

.filter-drawer-body {
    padding: 1.5rem;
    flex: 1;
}

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

.filter-group-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.filter-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--white);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 0.4rem 0.4rem 0;
    transition: all 0.22s ease;
    font-family: var(--font-primary);
}

.filter-option:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* ===================================
   SERVIZI SECTION
   =================================== */

.servizi {
    background: var(--light-color);
}

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

.servizio-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.servizio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.servizio-image {
    height: 200px;
    overflow: hidden;
}

.servizio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.servizio-card:hover .servizio-image img {
    transform: scale(1.1);
}

.servizio-content {
    padding: 1.5rem;
}

.servizio-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.servizio-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===================================
   AUTO SECTION
   =================================== */

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

/* --- Tab Buttons --- */
.auto-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.auto-tab {
    padding: 0.65rem 1.6rem;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.25s ease;
}

.auto-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.auto-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.auto-tab[data-filter="noleggio"].active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* --- Pill bar tipo: Vendita / Noleggio / Tutti --- */
.tipo-filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.25rem 0 1.5rem 0;
}

.tipo-pill {
    padding: 0.45rem 1.2rem;
    border-radius: 999px;
    border: 1.5px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    letter-spacing: 0.01em;
}

.tipo-pill:hover {
    background: rgba(255, 107, 53, 0.08);
}

.tipo-pill.active {
    background: var(--primary-color);
    color: #fff;
}

/* --- Griglia auto --- */
.auto-grid-wrapper {
    position: relative;
}

.auto-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0.5rem 0 1rem 0;
}

/* --- Paginazione --- */
.auto-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.auto-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 1.5px solid var(--border-color, #e0dbd4);
    background: transparent;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
}

.auto-page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.auto-page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
}

.auto-page-btn.prev-next {
    width: auto;
    padding: 0 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

/* Voce tema nella nav mobile — nascosta su desktop, visibile nel menu mobile */
.nav-theme-mobile {
    display: none;
}

/* SVG icon inside info-box h3 */
.info-icon {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.2em;
    margin-right: 0.45rem;
    flex-shrink: 0;
    color: var(--primary-color);
}

/* CTA icon SVG */
.cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.cta-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary-color);
}

/* ===================================
   ANIMAZIONI CARD AUTO — BOOM POP-IN
   =================================== */

@keyframes autoCardStaggerReveal {
    0% {
        opacity: 0;
        transform: translateY(35px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.auto-card {
    width: 100%;
    height: auto;
    min-height: 380px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #f5f5f7;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    /* Nascosto prima dell'ingresso */
    opacity: 0;
    /* Transizioni usate ESCLUSIVAMENTE per hover, NON per il reveal iniziale */
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.auto-card.card-visible {
    /* Stati base una volta visibile o a fine animazione */
    opacity: 1;
    transform: translateY(0);
    /* L'animazione gestisce ingresso. 'backwards' applica lo step 0% durante il delay per mascherarla */
    animation: autoCardStaggerReveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: calc(var(--order, 0) * 0.16s);
}

.auto-card.hiding {
    opacity: 0;
    transform: translateY(35px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.auto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

/* Immagine in cima alla card — più alta con ratio 4:3.9 (+30% altezza) */
.auto-card-image {
    position: relative;
    aspect-ratio: 4 / 3.9;
    flex-shrink: 0;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* --- Messaggio vuoto --- */
.auto-empty-message {
    text-align: center;
    padding: 3rem 1rem;
}

.auto-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: var(--text-light);
}

.auto-empty-message h3 {
    font-family: var(--font-heading);
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.auto-empty-message p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.auto-card-image::after {
    content: '© FDM di Francesco Messina';
    position: absolute;
    bottom: 8px;
    right: 8px;
    top: auto;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.85);
    padding: 3px 8px;
    font-size: 0.65rem;
    border-radius: 3px;
    font-weight: 600;
    pointer-events: none;
    z-index: 3;
    letter-spacing: 0.5px;
}

.auto-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

.auto-card-image .auto-sold-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 2.6vw, 2.15rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.34));
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    backdrop-filter: saturate(120%) blur(1.5px);
    -webkit-backdrop-filter: saturate(120%) blur(1.5px);
    z-index: 5;
    pointer-events: none;
}

.auto-card.auto-card-is-sold .auto-card-image img {
    filter: grayscale(22%) contrast(0.95) brightness(0.9);
}

.auto-card:hover .auto-card-image img {
    transform: scale(1.06);
}

/* Tag badge — top-left */
.auto-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: auto;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 4;
    white-space: nowrap;
}

.auto-tag.noleggio {
    background: var(--secondary-color);
}

/* Badge Prezzo — top-right */
.auto-price {
    position: absolute;
    top: 1rem;
    right: 1rem;
    bottom: auto;
    left: auto;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-heading);
    z-index: 4;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.auto-tag.vendita {
    background: var(--primary-color);
}

/* Sezione info sotto l'immagine — sfondo chiaro, testo scuro (Apple-style) */
.auto-card-content {
    padding: 0.9rem 1rem 1rem;
    background: #f5f5f7;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auto-card-content h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: var(--dark-color);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specifiche compatte */
.auto-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.auto-card-specs span {
    background: rgba(0, 0, 0, 0.07);
    color: var(--text-color);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
}

.auto-card-content p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* CTA scopri di più */
.auto-card-cta {
    display: inline-block;
    margin-top: auto;
    padding-top: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    transition: opacity 0.2s ease;
}

.auto-card:hover .auto-card-cta {
    opacity: 0.75;
}

/* ===================================
   MODAL AUTO
   =================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    margin: 2rem;
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--white);
    cursor: pointer;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-gallery {
    width: 100%;
}

.autoSwiper {
    width: 100%;
    height: 400px;
}

.autoSwiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.autoSwiper .swiper-slide::after {
    content: '© FDM di Francesco Messina - Foto Originale';
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.75);
    color: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 4px;
    font-weight: 600;
    pointer-events: none;
    z-index: 10;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.autoSwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--white);
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
}

.swiper-pagination-bullet {
    background: var(--white);
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
}

.modal-info {
    padding: 2rem;
}

.modal-tag {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.modal-tag.noleggio {
    background: var(--secondary-color);
}

.modal-info h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.modal-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-spec {
    display: flex;
    flex-direction: column;
    background: var(--light-color);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    min-width: 90px;
}

.modal-spec strong {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.modal-spec span {
    color: var(--dark-color);
    font-weight: 600;
}

.modal-info p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.modal-contact {
    display: inline-block;
}

/* ===================================
   CHI SIAMO — VIDEO BACKGROUND
   =================================== */

.chi-siamo {
    background: #111;
}

/* Sezione video: Grid layout — video-bg e content nella stessa cella,
   così il video-bg segue SEMPRE l'altezza reale (no position:absolute che
   dipende da bottom:0 su contenitore con solo min-height) */
.chi-siamo-video {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(clamp(690px, calc(100vh - 64px), 1080px), auto);
    overflow: hidden;
    padding: 0 !important;
    background: #ffffff;
}

/* Video-bg: copre l'intera cella della grid, espandendosi senza bande laterali (cover) */
.chi-siamo-video-bg {
    grid-row: 1;
    grid-column: 1;
    align-self: stretch;
    justify-self: stretch;
    background: #111;
    z-index: 0;
    position: relative;
    overflow: hidden;
}

/* Wrapper che occupa tutto lo sfondo disponibile */
.video-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.chi-siamo-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Loader del video */
.video-loader {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.video-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

/* Gradiente scuro — titolo leggibile in alto, testo in basso */
.chi-siamo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.62) 0%,
        rgba(0, 0, 0, 0.22) 40%,
        rgba(0, 0, 0, 0.72) 100%
    );
}

/* Contenuto (titolo + testo): grid item nella stessa riga 1, sopra il video */
.chi-siamo-video-content {
    grid-row: 1;
    grid-column: 1;
    align-self: stretch;
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 3rem 1rem 6rem; /* Aumentato padding bottom per staccare dal fondo su schermi orizzontali */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* space-between: titolo agganciato in alto, card testo in basso */
    justify-content: space-between;
}

.chi-siamo-title.section-title {
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
    margin-bottom: 0;
    font-size: 2rem;
    letter-spacing: -0.01em;
}


/* Card frosted-glass con il testo */
.chi-siamo-text-card {
    max-width: 960px;
    width: 92%;
    margin: 0.75rem auto 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 1.5rem 2.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    line-height: 1.7;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Sfumatura di raccordo tra video e testo (solo mobile) */
.chi-siamo-fade-bottom {
    display: none;
}

/* Credit video in basso a destra, discreto */
.video-credit {
    position: absolute;
    bottom: 0.6rem;
    right: 0.75rem;
    z-index: 2;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    letter-spacing: 0.03em;
    pointer-events: none;
    user-select: none;
    background: rgba(0, 0, 0, 0.38);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}

/* Stili legacy non più usati — mantenuti per compatibilità con altri temi */
.chi-siamo-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.chi-siamo-list { list-style: none; margin-top: 1rem; }
.chi-siamo-list li { padding: 0.75rem 0 0.75rem 2rem; position: relative; }
.chi-siamo-list li:before { content: '✓'; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; }

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

.contatti {
    background: var(--white);
    padding: 2.5rem 0;
}

.contatti .section-subtitle {
    margin-bottom: 1.5rem;
}

.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contatti-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contatti-info .info-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-box {
    background: var(--light-color);
    padding: 1.75rem 1.75rem;
    border-radius: 14px;
    border: 1.5px solid var(--border-color);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.info-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.info-box h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.info-box p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

.info-box a {
    color: var(--primary-color);
    font-weight: 500;
}

.info-box a:hover {
    text-decoration: underline;
}

/* ---- Mappa Preview nel box Dove Siamo ---- */
.info-box-map {
    /* nessuna regola extra */
}

/* Layout inline: indirizzo a sinistra, mappa a destra */
.dove-siamo-inline {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    justify-content: space-between;
}

.dove-siamo-address {
    flex: 1;
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
}

/* Mappa ~4x4cm (152px@96dpi) */
.map-preview {
    display: block;
    position: relative;
    width: 152px;
    height: 152px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    text-decoration: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.map-preview:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.map-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-preview-badge {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease;
}

.map-preview:hover .map-preview-badge {
    background: var(--primary-color);
    color: #fff;
}

/* Telefono + Email unificati */
.info-contact-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.info-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}

.info-contact-item:hover {
    color: var(--primary-dark, #c45a1e);
    gap: 0.75rem;
}

.info-contact-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ===================================
   ANIMAZIONE FADE-IN — BOX CONTATTI
   =================================== */

.contact-notify {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.contact-notify.notify-in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .contact-notify {
        transform: none;
        transition: opacity 0.25s ease;
    }
}

/* Contatti CTA Boxes */
.contatti-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ---- Layout compatto contatti ---- */
.contatti-compact {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.contatti-layout-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
        'map contact hours'
        'email whatsapp hours';
    gap: 1.1rem;
    align-items: stretch;
}

.contatti-box-map { grid-area: map; }
.contatti-box-contact { grid-area: contact; }
.contatti-box-email { grid-area: email; }
.contatti-box-whatsapp { grid-area: whatsapp; }
.contatti-box-hours {
    grid-area: hours;
    justify-content: flex-start;
}

.info-box-hours {
    background: linear-gradient(160deg, #f8fafc 0%, #ecf1f7 100%);
}

.hours-support-note {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(74, 74, 74, 0.22);
    font-size: 0.95rem;
    color: #4f5964;
}

.contatti-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

.contatti-cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    align-items: stretch;
}

.contatti-info-grid .info-box {
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: unset;
}

.contatti-info-grid .info-box h3 {
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.cta-box {
    background: var(--light-color);
    padding: 2rem 1.75rem;
    border-radius: 14px;
    text-align: left;
    border: 1.5px solid var(--border-color);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.6rem;
    min-height: 240px;
}

button.cta-box {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.cta-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.cta-box:focus-visible {
    outline: 3px solid rgba(255, 107, 53, 0.45);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

.cta-box .cta-icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.cta-box .cta-icon svg {
    width: 2.2rem;
    height: 2.2rem;
    color: var(--primary-color);
}

.cta-box h3 {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    margin-bottom: 0.3rem;
    color: var(--dark-color);
}

.cta-box p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 1.07rem;
    flex: 1;
}

/* ----
   Bottoni rettangolari, uppercase, bold nei box CTA contatti
   Sovrascrivono lo stile pill globale del .btn solo nel contesto .cta-box
---- */
.cta-box .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.72rem 1.45rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.cta-box .btn-primary {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.28);
}

.cta-box .btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 107, 53, 0.42);
}

.cta-box .btn-wa {
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.72rem 1.45rem;
}

.cta-box .btn-wa:hover {
    background: #1db954;
    border-color: #1db954;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.cta-box .btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.72rem 1.45rem;
}

.cta-box .btn-outline:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 107, 53, 0.38);
}

/* Due pulsanti Chiamaci affiancati */
.cta-call-btns {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.25rem;
}

/* Badge nome a fianco al numero di telefono */
.contact-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-left: 0.35rem;
    font-size: 0.9em;
}

/* WhatsApp CTA button */
.btn-wa {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    background: #25d366;
    color: #ffffff;
    border: 2px solid #25d366;
}

.btn-wa:hover {
    background: #1db954;
    border-color: #1db954;
}

.btn-outline {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Map */
.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.map-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.map-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 2rem 1rem 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.map-overlay span {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
}

.map-link:hover .map-overlay {
    background: linear-gradient(transparent, rgba(255, 107, 53, 0.8));
}

/* Social icons nel footer */
.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.12);
    transition: all 0.25s ease;
    text-decoration: none;
}

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

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

.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-col h4 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-col p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-legal p {
    margin-bottom: 0.25rem;
}

.footer-links a {
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.copyright p {
    margin-bottom: 0.5rem;
}

.copyright-images {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Copyright Notice under Gallery — nota legale discreta (protegge i diritti sulle foto) */
.copyright-notice {
    margin-top: 2rem;
    padding: 0.85rem 1.1rem;
    background: var(--light-gray, #f8f8f8);
    border-left: 3px solid var(--border-color);
    border-radius: 6px;
}

.copyright-notice p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.78rem;
    line-height: 1.65;
}

.copyright-notice strong {
    color: var(--text-color);
    font-weight: 600;
}

/* ===================================
   PRIVACY POLICY SECTION
   =================================== */

.privacy-section {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
}

.privacy-section.active {
    display: block;
}

.privacy-content {
    background: var(--white);
    max-width: 900px;
    margin: 2rem auto;
    padding: 3rem;
    border-radius: 12px;
    position: relative;
}

.privacy-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.privacy-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.privacy-content p,
.privacy-content ul {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.privacy-content ul {
    padding-left: 2rem;
}

.privacy-content ul li {
    list-style: disc;
    margin-bottom: 0.5rem;
}

.privacy-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.close-privacy {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--dark-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-privacy:hover {
    background: var(--light-color);
    transform: rotate(90deg);
}

/* ===================================
   ANIMAZIONI ENTRATA — unico sistema
   =================================== */

.animate-ready {
    opacity: 0;
    transform: translateY(36px);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Stagger delays per sezione */
.animate-ready:nth-child(2) { transition-delay: 0.07s; }
.animate-ready:nth-child(3) { transition-delay: 0.14s; }
.animate-ready:nth-child(4) { transition-delay: 0.21s; }
.animate-ready:nth-child(5) { transition-delay: 0.28s; }
.animate-ready:nth-child(6) { transition-delay: 0.35s; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-ready {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

/* Tablet: frecce ridotte leggermente */
/* ============================================================
   SCHERMI CON ALTEZZA RIDOTTA — es. laptop 1366x768, 1280x800
   Evita che l'hero venga tagliato su viewport "basse"
   ============================================================ */
@media (max-height: 800px) and (min-width: 769px) {
    .hero-static {
        padding-top: 104px;
        padding-bottom: 1rem;
    }

    .hero-img {
        /* Su schermo basso desktop: viewport - header(142px) - margini */
        max-height: calc(100vh - 210px);
    }

    .hero-scroll-hint {
        bottom: 34px;
    }
}

@media (max-width: 1024px) {
    .auto-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        background: #ffffff;
        border-top: none;
        border-bottom: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* Typography */
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* Header */

    /* ----
       MOBILE MENU BEHAVIOR
       Top of page  → logo centrato, voci nav inline, no hamburger
       Dopo scroll  → hamburger, nav collassata a tendina
    ---- */

    .logo {
        display: none;
    }

    /* Wrapper link logo centrato */
    .header-mobile-brand-link {
        display: block;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        pointer-events: auto;
        z-index: 2;
    }

    .header-mobile-brand {
        display: block;
        height: 46px;
        width: auto;
        max-width: 220px;
        object-fit: contain;
        pointer-events: none;
        user-select: none;
    }

    /* --- Stato TOP: hamburger nascosto, nav nascosta, solo logo centrato --- */
    .header-content {
        min-height: 64px;
        padding: 0;
    }

    .mobile-toggle {
        display: none;
    }

    .nav {
        display: none;
    }

    /* --- Stato SCROLLED: hamburger visibile, nav collassata --- */
    .header-scrolled .mobile-toggle {
        display: flex;
    }

    .header-scrolled .nav {
        position: fixed;
        top: 64px;
        left: -100%;
        width: 100%;
        background: var(--white);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        display: block;
    }

    .header-scrolled .nav.active {
        left: 0;
    }

    .header-scrolled .nav ul {
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .header-scrolled .nav ul li {
        border-bottom: 1px solid var(--border-color);
    }

    .header-scrolled .nav ul li.nav-theme-mobile {
        display: block;
    }

    .header-scrolled .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1rem;
        font-weight: 500;
        letter-spacing: 0;
    }
    
    /* Hero - mobile: immagine centrata */
    .hero {
        min-height: unset;
        height: auto;
        padding: 0;
        background: #ffffff;
    }

    .hero-static {
        min-height: 85vh;
        min-height: 85dvh;
        margin-top: 0;
        padding: 80px 1.5rem 1rem;
        background: var(--home-gradient-dark);
    }

    .hero-scroll-hint {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 0.75rem;
        margin-bottom: 0.4rem;
    }

    .hero-img {
        max-width: 864px;
        width: 96%;
    }

    .hero-content-visible {
        padding-top: 80px;
    }

    /* Nascondi theme selector su mobile (ora accessibile nella nav) */
    .theme-selector {
        display: none;
    }

    .nav-theme-mobile {
        display: flex !important;
        justify-content: center;
        gap: 0.5rem;
        padding: 1.25rem 0 0.5rem;
        margin-top: 0.5rem;
        border-bottom: none !important;
        border-top: 1px solid var(--border-color);
    }

    /* auto section header */
    .auto-section-header {
        flex-direction: column;
        align-items: center;
    }

    .auto-section-header .filter-drawer-btn {
        position: static;
        align-self: flex-end;
    }

    .auto-section-header .section-title {
        text-align: center;
    }
    
    /* Grid Layouts */
    .servizi-grid {
        grid-template-columns: 1fr;
    }
    
    .auto-grid {
        grid-template-columns: 1fr;
    }

    /* Video Chi Siamo — mobile: Opzione A
       Il video occupa uno slot fisso in alto, il testo scorre sotto */
    .chi-siamo-video {
        min-height: unset;
        display: block;
    }

    .chi-siamo-video-bg {
        position: relative;
        inset: auto;
        height: 56vw;
        min-height: 220px;
        max-height: 340px;
        overflow: hidden;
    }

    /* Su mobile il wrapper 16:9 deve riempire il contenitore fisso, no aspect-ratio */
    .video-inner {
        height: 100%;
        width: 100%;
        aspect-ratio: unset;
    }

    .chi-siamo-fade-bottom {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 90px;
        background: linear-gradient(to bottom, transparent 0%, #111 100%);
        z-index: 3;
        pointer-events: none;
    }

    .chi-siamo-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0,0,0,0.50) 0%,
            rgba(0,0,0,0.10) 60%,
            rgba(0,0,0,0.55) 100%
        );
    }

    .chi-siamo-video-content {
        position: relative;
        min-height: unset;
        padding: 2rem 1rem 2.5rem;
        background: #111;
    }

    .chi-siamo-title.section-title {
        font-size: 2rem;
        position: static;
        transform: none;
        width: auto;
        margin-bottom: 1rem;
    }

    .chi-siamo-text-card {
        width: 92%;
        margin: 0 auto;
        padding: 0.5rem 0.25rem 1rem;
        font-size: 0.97rem;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        text-align: justify;
        color: rgba(255,255,255,0.90);
    }

    .video-credit {
        bottom: 0.5rem;
        top: auto;
        right: 0.6rem;
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.95);
        background: rgba(0, 0, 0, 0.5); /* Sfondo scuro per garantire leggibilità su mobile */
        padding: 0.2rem 0.4rem;
        border-radius: 4px;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    }

    .contatti-layout-grid,
    .contatti-info-grid,
    .contatti-cta-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            'map'
            'contact'
            'email'
            'whatsapp'
            'hours';
    }

    .dove-siamo-inline {
        flex-direction: row;
        align-items: flex-start;
    }
    
    /* Modal */
    .modal-content {
        margin: 1rem;
    }
    
    .autoSwiper {
        height: 300px;
    }
    
    .modal-body {
        flex-direction: column;
    }
    
    .modal-info {
        padding: 1.5rem;
    }
    
    .modal-info h2 {
        font-size: 1.5rem;
    }
    
    /* Privacy */
    .privacy-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .privacy-content h2 {
        font-size: 2rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .hero-static {
        margin-top: 0;
        padding: 80px 1rem 1rem;
        background: var(--home-gradient-dark);
    }

    .hero-scroll-hint {
        margin-top: 0.6rem;
        margin-bottom: 0.2rem;
    }

    .hero-img {
        max-width: 100%;
        width: 98%;
    }
    
    .logo-switcher {
        width: 160px;
        height: 60px;
    }

    .logo-switcher-img {
        height: 55px;
    }
    
    /* Filter drawer full width on small mobiles */
    .filter-drawer {
        width: 100%;
        max-width: 100%;
    }
}

/* Custom cursor rimosso per performance */


/* reveal-masked rimosso — unificato in animate-ready/animate-in */


/* ===================================
   BLUR-UP LAZY IMAGE LOADING
   =================================== */

.img-blur-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.lazy-reveal {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px);
    transform: scale(1.04);
    transition: filter 0.5s ease-in, transform 0.5s ease-in;
}

.lazy-reveal.loaded {
    filter: blur(0);
    transform: scale(1);
    /* will-change rimosso: layer composito non più necessario dopo la transizione */
}


/* ===================================
   FILTER DRAWER — RANGE SLIDER & FUEL
   =================================== */

.filter-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    margin: 0.75rem 0 0.5rem;
    cursor: pointer;
}
.filter-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.4);
    transition: transform 0.15s ease;
}
.filter-range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.filter-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.filter-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.filter-range-value {
    color: var(--primary-color);
    font-weight: 700;
}

.filter-fuel {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--white);
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 0.35rem 0.35rem 0;
    transition: all 0.22s ease;
    font-family: var(--font-primary);
    letter-spacing: 0.01em;
}
.filter-fuel:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(249,115,22,0.05);
}
.filter-fuel.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(249,115,22,0.25);
}

.filter-action-group { padding-top: 0.5rem; }


/* ===================================
   FILTER FUEL BUTTONS — stile pulito
   =================================== */

.filter-fuel {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--white);
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 0.4rem 0.4rem 0;
    transition: all 0.22s ease;
    font-family: var(--font-primary);
    letter-spacing: 0.01em;
}
.filter-fuel:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255,107,53,0.05);
}
.filter-fuel.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(255,107,53,0.25);
}
