/* Codecar light theme – centrato e con font dinamico */
:root {
    --accent: #ffaa00;
    --accent-strong: #e69900;
    --accent-light: #fff8e1;
    --accent-contrast: #1a1a1a;
    --text: #0e1624;
    --muted: #4a5568;
    --text-soft: #6b7280;
    --bg: #f7f9fc;
    --border: #d9e2ef;
    --surface: #ffffff;
    --soft-surface: #f1f5fb;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 24px 70px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --transition: all 0.25s ease;
    --font-base: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-display: 'Montserrat', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-anchor: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-base);
    font-size: 18px;
    background: linear-gradient(180deg, #f9fbff 0%, #f3f6fb 40%, #f7f9fc 100%);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-anchor: none;
}

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

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

button { font: inherit; }

input, textarea, select {
    font-family: var(--font-base);
    font-size: 1rem;
}

h1, h2, h3, h4 { font-family: var(--font-display); }

.page-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.navbar,
.hero,
.motorsport-section,
.vehicles-section,
.services-section,
.about-section,
.contact-section,
.stats-section,
.footer {
    width: 100%;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: var(--text);
    gap: 0.25rem;
}

.logo-text { display: none !important; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    list-style: none;
}

.nav-link {
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.65rem 0.4rem;
    position: relative;
    transition: var(--transition);
}

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

.nav-link:active,
.nav-link.active {
    color: var(--accent);
}

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

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--text);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: var(--text);
    transition: var(--transition);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: none;
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.25;
    white-space: normal;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #1a1a1a;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-secondary {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent-strong);
}

.btn-decorative {
    cursor: default;
    pointer-events: none;
    opacity: 0.8;
}

.btn-whatsapp {
    background: #25D366;
    color: #0a0a0a;
}
.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
    background: #1ebe5d;
}

.cta-btn {
    background: var(--accent);
    color: #1a1a1a;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 800;
    font-size: 1rem;
    transition: var(--transition);
}

.cta-btn:hover { box-shadow: var(--shadow-soft); }

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
    background: var(--accent);
    color: var(--accent-contrast);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 170, 0, 0.4);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 3000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--accent-strong);
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(255, 170, 0, 0.5);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

/* Floating WhatsApp button */
.floating-whatsapp {
    position: fixed;
    left: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: var(--shadow-strong);
    display: grid;
    place-items: center;
    z-index: 3000;
    transition: transform .15s ease, box-shadow .2s ease;
}
.floating-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.floating-whatsapp svg { width: 28px; height: 28px; display: block; }

/* ===== Hero ===== */
.hero {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 3.5rem 1.5rem 4.5rem;
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20,20,20,0.4), rgba(10,10,10,0.5));
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 45%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.hero-background { position: absolute; inset: 0; pointer-events: none; display: none; }

.gradient-blur {
    position: absolute;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(246,164,0,0.2) 0%, transparent 65%);
    border-radius: 50%;
    top: -80px;
    right: -80px;
    animation: float 9s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-24px) translateX(20px); }
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0;
}

.hero-logo-wrapper {
    position: relative;
    display: inline-flex;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
}

.hero-logo-wrapper::before {
    content: '';
    position: absolute;
    inset: 20% -24% 40% -32%;
    background: linear-gradient(120deg, rgba(246,164,0,0) 0%, rgba(246,164,0,0.5) 35%, rgba(255,207,63,0.65) 65%, rgba(246,164,0,0) 100%);
    filter: blur(24px);
    opacity: 0;
    transform: translateX(-25%);
    pointer-events: none;
    animation: logoTrailSweep 1.2s ease-out 0.2s forwards;
}

.hero-logo-wrapper::after {
    display: none;
}

.hero-logo-main {
    width: min(560px, 86vw);
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6)) drop-shadow(0 4px 8px rgba(0,0,0,0.4)) drop-shadow(0 20px 40px rgba(0,0,0,0.5));
    animation: heroLogoPulse 5.5s ease-in-out infinite, heroLogoEnter 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.05s both;
    transform: translateY(var(--logo-shift, 0px)) rotate(var(--logo-tilt, 0deg)) scale(var(--logo-scale, 1));
    transition: transform 0.25s ease, filter 0.25s ease;
    position: relative;
    z-index: 10;
}

.hero-logo-main.hovered {
    filter: drop-shadow(0 12px 24px rgba(0,0,0,0.7)) drop-shadow(0 6px 12px rgba(0,0,0,0.5)) drop-shadow(0 24px 48px rgba(0,0,0,0.6));
}

.hero-logo-wrapper:hover::after { opacity: 0.85; }

.logo-splash { position: relative; display: inline-block; margin-bottom: 1.5rem; padding: 0.5rem 1rem; overflow: hidden; }

.logo-reveal {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 8vw, 4.6rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.12));
    opacity: 0;
    animation: revealLogo 1s ease 0.5s forwards;
    text-transform: uppercase;
}

.logo-trail {
    position: absolute;
    top: 50%;
    left: -25%;
    width: 25%;
    height: 8px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, var(--accent-light) 100%);
    border-radius: 999px;
    filter: blur(1px);
    transform: translateY(-50%);
    animation: driveAcross 1.1s ease-out forwards;
}

@keyframes driveAcross {
    0% { left: -25%; opacity: 0; }
    20% { opacity: 1; }
    70% { left: 90%; opacity: 1; }
    100% { left: 120%; opacity: 0; }
}

@keyframes revealLogo {
    0% { opacity: 0; clip-path: inset(0 100% 0 0); }
    100% { opacity: 1; clip-path: inset(0 0 0 0); }
}

.hero-title {
    font-size: clamp(2.6rem, 8vw, 4rem);
    margin-bottom: 1.25rem;
    color: var(--text);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted);
    margin-bottom: 2.6rem;
    line-height: 1.8;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

@keyframes heroLogoPulse {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.02); }
    60% { transform: scale(0.99); }
}

.hero-car-glow {
    position: absolute;
    inset: 12% 0 0 0;
    background: radial-gradient(circle at 50% 60%, rgba(246,164,0,0.22) 0%, transparent 55%);
    filter: blur(24px);
    opacity: 0.9;
    transform: scale(0.9);
    animation: glowPulse 4.4s ease-in-out infinite;
}

@keyframes driveIn {
    0% { opacity: 0; transform: translateX(-70px) scale(0.94); }
    60% { opacity: 1; transform: translateX(6px) scale(1.02); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes hoverFloat {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(4px) translateY(-6px); }
}

@keyframes logoTrailSweep {
    0% { opacity: 0; transform: translateX(-28%); filter: blur(28px); }
    30% { opacity: 0.8; }
    65% { opacity: 0.4; }
    100% { opacity: 0; transform: translateX(48%); filter: blur(16px); }
}

@keyframes heroLogoEnter {
    0% { opacity: 0; transform: translateY(22px) scale(0.96); }
    60% { opacity: 1; transform: translateY(-6px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.9; transform: scale(0.9); }
    50% { opacity: 0.5; transform: scale(1.02); }
}

.hero-drive { position: relative; width: 100%; height: 100%; overflow: visible; }
.hero-car-glow {
    position: absolute;
    inset: 12% 0 0 0;
    background: radial-gradient(circle at 50% 60%, rgba(246,164,0,0.22) 0%, transparent 55%);
    filter: blur(24px);
    opacity: 0.9;
    transform: scale(0.9);
    animation: glowPulse 4.4s ease-in-out infinite;
}
.hero-car-icon {
    position: absolute;
    top: 42%;
    left: -20%;
    font-size: 2.8rem;
    filter: drop-shadow(0 14px 20px rgba(0,0,0,0.18));
    animation: heroCarRun 6s ease-in-out infinite;
}
.hero-logo-dynamic {
    position: absolute;
    right: 6%;
    top: 14%;
    width: 88%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.94);
    filter: drop-shadow(0 25px 40px rgba(0,0,0,0.18));
    animation: heroLogoReveal 6s ease-in-out infinite;
    animation-delay: 0.6s;
}

@keyframes heroCarRun {
    0% { transform: translateX(-25%) translateY(-6%) rotate(-2deg); opacity: 0; }
    10% { opacity: 1; }
    45% { transform: translateX(40%) translateY(-2%) rotate(1deg); opacity: 1; }
    70% { transform: translateX(95%) translateY(0) rotate(-1deg); opacity: 1; }
    100% { transform: translateX(130%) translateY(4%) rotate(2deg); opacity: 0; }
}

@keyframes heroLogoReveal {
    0%, 45% { opacity: 0; transform: scale(0.94) translateY(6px); }
    55% { opacity: 1; transform: scale(1.02) translateY(0); }
    75% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.98) translateY(4px); }
}

/* ===== Sections ===== */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    display: grid;
    gap: 1.25rem;
    justify-items: center;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.8rem;
    color: var(--text);
}

.section-header p {
    font-size: 1.15rem;
    color: var(--muted);
}

.vehicles-section,
.services-section,
.about-section,
.contact-section {
    padding: 6rem 1.5rem;
}

.vehicles-section,
.services-section,
.about-section,
.contact-section,
.stats-section,
.footer-content,
.footer-bottom,
.navbar-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* ===== Vehicles ===== */
.vehicles-section { background: linear-gradient(180deg, #f5f8fd 0%, #ffffff 30%, #f5f8fd 100%); }

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0f0f0f;
    transform: translateY(-2px);
}

.vehicles-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.vehicle-card {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.5rem;
    position: relative;
    transition: var(--transition);
}

.vehicle-card:last-child { border-bottom: none; }

.vehicle-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
}

.vehicle-thumb-media {
    width: 100%;
    height: 100%;
}

.vehicle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vehicle-card:hover .vehicle-thumb img { transform: scale(1.05); }

.vehicle-photo-count {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.vehicle-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vehicle-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.vehicle-header-row h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    max-width: 70%;
    line-height: 1.2;
}

.vehicle-price-tag {
    background: var(--accent);
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 800;
    padding: 10px 20px 10px 40px;
    clip-path: polygon(30px 0, 100% 0, 100% 100%, 0% 100%);
    margin-top: -10px;
}

.vehicle-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem 1rem;
    margin-top: 0.5rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid #eee;
    padding-left: 12px;
}

.spec-item:nth-child(4n+1) { border-left: none; padding-left: 0; }

.spec-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.spec-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
}

.vehicle-actions {
    margin-top: auto;
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.btn-confronta {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-confronta:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

@media (max-width: 960px) {
    .vehicle-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-bottom: 1.5rem;
    }
    .vehicle-thumb { aspect-ratio: 4 / 3; }
    .vehicle-specs-grid { grid-template-columns: repeat(2, 1fr); }
    .vehicle-price-tag { 
        clip-path: none; 
        border-radius: 4px; 
        padding: 8px 16px;
        font-size: 1.2rem;
    }
    .spec-item { border-left: none; padding-left: 0; }
}


.vehicles-status {
    margin-top: 1.2rem;
    color: #1f1f1f;
    font-weight: 600;
    text-align: center;
}

/* ===== Services ===== */
.services-section { background: var(--soft-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.service-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 360px;
    min-width: 240px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    flex: 1 1 calc((100% - 2 * 1.5rem) / 3);
}

.service-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: var(--accent);
    box-shadow: var(--shadow-soft);
}

.service-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.service-card h3 { margin-bottom: 0.75rem; font-size: 1.3rem; }

.service-card p { margin-bottom: 1.2rem; color: var(--muted); font-size: 1.05rem; }

.service-link {
    color: var(--text);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.service-link:hover { color: var(--accent); transform: translateY(-2px); }

.service-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.service-actions .btn {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 10px 16px;
    font-size: 0.95rem;
}

@media (max-width: 1100px) {
    .service-card { flex-basis: calc((100% - 1.5rem) / 2); }
}

@media (max-width: 560px) {
    .service-card { flex-basis: 100%; }
}

/* ===== Stats ===== */
.stats-section {
    padding: 4.5rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: var(--bg);
}

.stat {
    background: var(--soft-surface);
    padding: 1.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.stat:hover { border-color: var(--accent); box-shadow: var(--shadow-soft); }

.stat h3 { font-size: 2.1rem; color: var(--text); margin-bottom: 0.4rem; }
.stat p { color: var(--muted); font-weight: 600; font-size: 1.05rem; }

/* ===== About ===== */
.about-section {
    background: var(--surface);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    align-items: center;
}

.about-content h2 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 1.4rem; }
.about-content p { margin-bottom: 1.2rem; color: var(--muted); font-size: 1.05rem; }
.about-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

.about-image {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
}

.about-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.about-image:hover img { transform: scale(1.04); }

.about-map {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    height: 100%;
    min-height: 350px;
    border: 1px solid var(--border);
}

.about-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ===== Motorsport ===== */
.motorsport-section { 
    background: linear-gradient(180deg, #f9fbff 0%, #f3f6fb 40%, #f7f9fc 100%);
    color: var(--text); 
    padding: 6rem 1.5rem; 
}
.ms-hero-break { display: none; }
.ms-hero-name { white-space: nowrap; }
.motorsport-section .eyebrow { 
    text-transform: uppercase; 
    letter-spacing: 0.14em; 
    color: var(--accent); 
    font-weight: 800; 
    margin-bottom: 0.6rem; 
}
.motorsport-section h2 { 
    color: var(--text); 
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.motorsport-section h3 {
    color: var(--text);
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.motorsport-section p { 
    color: var(--muted); 
    line-height: 1.7;
}
.motorsport-section .note { 
    color: var(--accent-strong); 
    font-weight: 700; 
    margin-top: 0.4rem; 
}

.motorsport-hero { 
    display: flex; 
    justify-content: space-between; 
    gap: 2rem; 
    align-items: center; 
    flex-wrap: wrap; 
    margin: 0 auto 3rem; 
    max-width: 1100px; 
}
.motorsport-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 0.75rem; 
    padding: 1rem 1.5rem; 
    background: var(--surface); 
    border: 2px solid var(--accent); 
    border-radius: 999px; 
    box-shadow: var(--shadow-soft); 
}
.motorsport-logo { 
    width: 64px; 
    height: 64px; 
    object-fit: contain; 
}
.motorsport-badge span { 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    font-weight: 800; 
    font-size: 0.95rem; 
    color: var(--accent); 
}

.motorsport-grid { 
    display: grid; 
    grid-template-columns: 1fr;
    gap: 1.5rem; 
    max-width: 1100px; 
    margin: 0 auto; 
    align-items: start;
}

@media (min-width: 900px) {
    .motorsport-grid {
        grid-template-columns: 1.05fr 0.95fr;
        grid-template-areas:
            "trofei timeline"
            "filosofia timeline";
    }

    .motorsport-grid .motorsport-card:nth-child(1) { grid-area: trofei; }
    .motorsport-grid .motorsport-card:nth-child(2) { grid-area: filosofia; }
    .motorsport-grid .motorsport-card:nth-child(3) { grid-area: timeline; }
}
.motorsport-card { 
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 2rem; 
    box-shadow: var(--shadow-soft); 
    transition: var(--transition);
}
.motorsport-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    border-color: var(--accent);
}
.ms-counters { 
    display: grid; 
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem; 
    margin-top: 1.5rem; 
}

@media (max-width: 420px) {
    .ms-counters {
        grid-template-columns: 1fr;
    }
}
.ms-counter { 
    background: var(--soft-surface); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 1.2rem; 
    display: grid; 
    gap: 0.2rem; 
    transition: var(--transition);
}
.ms-counter:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}
.ms-counter-value { 
    font-size: 2.2rem; 
    font-weight: 800; 
    color: var(--accent); 
}
.ms-counter-suffix { 
    font-size: 1.2rem; 
    margin-left: 4px; 
    color: var(--accent); 
    font-weight: 700; 
}
.ms-counter-label { 
    color: var(--muted); 
    font-weight: 600; 
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.ms-badge-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.7rem;
    background: var(--accent-light);
    border-color: var(--accent);
}

.ms-badge-logo {
    width: 160px;
    max-width: 100%;
    height: 52px;
    object-fit: contain;
}

.ms-badge-text {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--accent);
}
.ms-list { 
    list-style: none; 
    display: grid; 
    gap: 0.9rem; 
    margin-top: 1.2rem; 
    padding-left: 0; 
}
.ms-list li { 
    line-height: 1.6; 
    color: var(--text); 
    padding-left: 1.5rem;
    position: relative;
}
.ms-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 800;
}
.ms-list li strong {
    color: var(--accent-strong);
}
.ms-timeline { 
    display: grid; 
    gap: 1rem; 
    margin-top: 1.2rem; 
}
.ms-timeline-item { 
    padding: 1.2rem; 
    border-radius: var(--radius); 
    background: var(--soft-surface); 
    border: 1px solid var(--border); 
    transition: var(--transition);
}
.ms-timeline-item:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    transform: translateX(4px);
}
.ms-year { 
    display: inline-flex; 
    align-items: center; 
    gap: 0.4rem; 
    padding: 0.4rem 1rem; 
    border-radius: 999px; 
    background: var(--accent); 
    color: var(--accent-contrast); 
    font-weight: 800; 
    letter-spacing: 0.04em; 
    margin-bottom: 0.5rem; 
    font-size: 0.9rem;
}

.motorsport-videos {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.ms-video-volume-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    padding: 0;
}

.ms-video-volume-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.ms-video-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(0,0,0,0.25);
    position: relative;
    min-height: 280px;
}

.ms-video-card video {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    background: transparent;
    margin-top: 0;
    border-radius: inherit;
    pointer-events: none;
}

/* Safety: hide built-in controls if any browser still renders them */
.ms-video-card video::-webkit-media-controls {
    display: none !important;
}

.ms-video-card video::-webkit-media-controls {
    background: rgba(0,0,0,0.5);
}

.ms-video-card.ms-loading::before,
.ms-video-card.ms-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ms-video-card.ms-loading::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.05) 100%);
    background-size: 400px 100%;
    animation: shimmer 1.2s linear infinite;
}

.ms-video-card.ms-loading::after {
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0, rgba(255,255,255,0.05) 45%, transparent 55%);
    mix-blend-mode: screen;
}

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

.ms-video-card.ms-ready::before,
.ms-video-card.ms-ready::after {
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}



.ms-video-placeholder {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--soft-surface) 0%, var(--accent-light) 100%);
    border-top: 2px solid var(--accent);
}

.ms-video-placeholder p {
    color: var(--muted);
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .motorsport-section {
        padding: 2rem 1rem;
    }
    .motorsport-hero { 
        flex-direction: column; 
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
        text-align: center;
    }
    .motorsport-hero > div:first-child {
        order: 2;
        width: 100%;
    }
    .motorsport-badge {
        order: 1;
        padding: 0.8rem 1.2rem;
        align-self: center;
    }
    .motorsport-badge span {
        font-size: 0.85rem;
    }
    .motorsport-logo {
        width: 48px;
        height: 48px;
    }
    .motorsport-section h2 {
        font-size: 1.5rem;
        line-height: 1.3;
        text-align: center;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }
    .ms-hero-break { display: block; }
    .motorsport-section .eyebrow {
        text-align: center;
        font-size: 0.75rem;
    }
    .motorsport-section p {
        font-size: 0.9rem;
        text-align: center;
        padding: 0 0.5rem;
    }
    .motorsport-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem;
    }
    .motorsport-card {
        padding: 1.25rem;
        width: 100% !important;
    }
    .motorsport-card h3 {
        font-size: 1.1rem;
        text-align: center;
    }
    .ms-counters {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.8rem;
    }
    .ms-counter {
        padding: 1rem;
        text-align: center;
    }
    .ms-counter-value {
        font-size: 1.8rem;
    }
    .ms-counter-label {
        font-size: 0.8rem;
    }
    .ms-list {
        gap: 0.7rem;
    }
    .ms-list li {
        font-size: 0.85rem;
        padding-left: 1.2rem;
        text-align: left;
    }
    .ms-timeline {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }
    .ms-timeline-item {
        padding: 1rem;
    }
    .ms-timeline-item p {
        font-size: 0.85rem;
        text-align: left;
        margin: 0;
    }
    .ms-year {
        font-size: 0.75rem;
        padding: 0.25rem 0.7rem;
    }
    .motorsport-videos {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem;
        margin-top: 2rem;
        padding: 0;
    }
    .ms-video-card {
        border-radius: 8px;
        width: 100%;
    }
    .ms-video-card video {
        height: 180px;
    }
    .ms-video-label {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* ===== Contact ===== */
.contact-section { background: var(--soft-surface); border-top: 1px solid var(--border); }

.contact-content {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 900px;
}

.info-card {
    background: var(--surface);
    padding: 1.6rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.info-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-soft); }

.info-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.info-card h3 { margin-bottom: 0.35rem; }

.contact-form {
    background: var(--surface);
    padding: 1.6rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    transition: var(--transition);
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(246,164,0,0.15);
}

.map-embed {
    margin-top: 2rem;
    width: 100%;
    max-width: 1100px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.map-embed iframe {
    width: 100%;
    height: 380px;
    border: 0;
    display: block;
}

/* ===== Footer ===== */
.footer { background: var(--bg); color: var(--text); padding: 4rem 1.5rem 2rem; border-top: 1px solid var(--border); }

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 1.6fr) minmax(180px, 0.8fr) minmax(240px, 1fr);
    gap: 3rem;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px);
    box-shadow: var(--shadow-soft);
    padding: 2.25rem 2.5rem;
}

.footer-section h3,
.footer-section h4 { margin-bottom: 0.8rem; color: var(--text); }

.footer-section p { margin-bottom: 0.9rem; color: var(--muted); max-width: 42ch; }

.footer-section ul { list-style: none; display: grid; gap: 0.65rem; padding: 0; margin: 0; }

.footer-section a { color: var(--muted); font-weight: 600; }
.footer-section a:hover { color: var(--accent); }
.footer-section a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

.footer-brand { display: flex; gap: 1rem; align-items: center; }
/* Center the brand block vertically within the footer */
.footer-section:first-child {
    align-self: stretch;           /* stretch this grid item to the full row height */
    display: flex;                 /* allow vertical centering */
    align-items: center;           /* center content along the cross axis (vertical) */
}
.footer-brand > div { display: grid; gap: 0.2rem; align-content: center; margin-top: 0; }
/* Reduce default margins within the brand block so title and subtitle sit closer together */
.footer-brand h3 {
    margin: 0 0 0.25rem 0;
}
.footer-brand p {
    margin: 0;
}
.footer-logo { width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.10)); border-radius: 8px; }

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

.social-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--soft-surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); color: #0f0f0f; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

.footer-powered {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--muted);
    font-weight: 600;
}

.footer-powered-logo {
    height: 28px;
    width: auto;
    display: block;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--radius);
    max-width: 1180px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-strong);
    animation: slideIn 0.35s ease;
}

.modal-content.vehicle-modal {
    padding: 1rem;
}

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

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--border);
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text);
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 20;
    pointer-events: auto;
}

.modal-close:hover { color: var(--accent); }

.modal-content h2 { margin-bottom: 1.4rem; }
.modal-form { display: flex; flex-direction: column; gap: 1rem; }

.vehicle-modal { max-width: 1180px; }
.vehicle-modal-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 1.1rem; align-items: start; }
.vehicle-modal-left { display: grid; gap: 0.9rem; }
.vehicle-modal-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #0a0a0a;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    max-height: 70vh;
}
.vehicle-modal-main::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0) 40%, rgba(0,0,0,0.10));
    pointer-events: none;
    opacity: 0.9;
    z-index: 1;
}
.vehicle-modal-main img {
    position: relative;
    z-index: 0;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    background: transparent;
}
.vehicle-modal-thumbs {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.thumb-btn {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    background: var(--surface);
    cursor: pointer;
    transition: var(--transition);
    flex: 0 0 90px;
    scroll-snap-align: start;
}
.thumb-btn img { width: 100%; height: 90px; object-fit: cover; display: block; }
.thumb-btn.active, .thumb-btn:focus-visible { border-color: var(--accent); outline: none; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(0,0,0,0.35); color: #fff; border: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: var(--transition); }
.gallery-nav:hover { background: color-mix(in srgb, var(--accent) 72%, rgba(0,0,0,0.35)); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.vehicle-modal-right { display: grid; gap: 0.9rem; align-self: start; }
.vehicle-modal-header { padding-bottom: 0.2rem; }
.vehicle-modal-header h2 { margin: 0; font-size: 1.4rem; }
.vehicle-modal-header p { color: var(--text-soft); margin: 0; }
.vehicle-modal-description {
    color: var(--muted);
    font-size: 1.04rem;
    margin: 0.7rem 0 0.2rem 0;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap; /* preserva a capo e spazi dal gestionale */
}
/* Ensure description is visible and not collapsed */
.vehicle-modal-description[style*="display: none"] {
    display: none !important;
}
.vehicle-modal-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.35rem 0.75rem;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.vehicle-modal-specs .spec-row {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--soft-surface);
    border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
    font-size: 0.95rem;
}
.vehicle-modal-specs .spec-row-label { font-weight: 800; color: var(--text); }
.vehicle-modal-specs .spec-row-value { color: var(--muted); font-weight: 600; }
.vehicle-modal-actions-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--soft-surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}
.vehicle-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.vehicle-modal-actions a,
.vehicle-modal-actions button { min-width: 0; width: 100%; justify-content: center; }

.vehicle-modal-actions .vehicle-modal-share { grid-column: 1 / -1; }
.vehicle-modal-price-pill {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: var(--accent-contrast);
    padding: 9px 14px;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: 0.01em;
    box-shadow: var(--shadow-strong);
    border: 1px solid color-mix(in srgb, var(--accent-strong) 55%, #000 15%);
    z-index: 2;
}
.contact-panel { display: grid; gap: 0.6rem; background: var(--soft-surface); color: var(--text); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.contact-panel-title { margin: 0; font-weight: 800; color: var(--text); }
.contact-panel input,
.contact-panel textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--surface); color: var(--text); }
.contact-panel input:focus,
.contact-panel textarea:focus { outline: 2px solid var(--accent); }
.contact-panel .consent { display: flex; gap: 0.5rem; font-size: 0.9rem; align-items: flex-start; color: var(--muted); }
.contact-panel .consent input { width: auto; }

.vehicle-modal-options { padding: 0.4rem 0; display: grid; gap: 0.6rem; }
.vehicle-modal-options h3 { margin: 0; font-size: 1.05rem; }
.options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.45rem 0.8rem; }
.option-item { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--soft-surface); font-weight: 600; color: var(--text); opacity: 0; transform: translateY(10px); animation: optionFade 0.35s ease forwards; }
.option-item.empty { opacity: 0.7; text-align: center; }

@keyframes optionFade {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .vehicle-modal { max-width: 92vw; }
    .vehicle-modal-body { grid-template-columns: 1fr; }
    .vehicle-modal-actions { grid-template-columns: 1fr; }
    .options-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

@media (min-width: 769px) {
    .vehicle-modal-right {
        position: sticky;
        top: 0.75rem;
    }
}

/* ===== Image Lightbox (enlarged view, not fullscreen) ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000; /* above modal */
    animation: fadeIn 0.18s ease;
}
.lightbox.active { display: flex; }

.lightbox-content {
    position: relative;
    background: #0a0a0a;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 24px 70px rgba(0,0,0,0.6);
    width: auto;
    max-width: min(1100px, 90vw);
    max-height: min(88vh, 900px);
    overflow: hidden;
    animation: lightboxIn 0.22s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(86vh, 880px);
    object-fit: contain;
    background: #0a0a0a;
}

.lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.9);
    color: #111;
    font-size: 1.2rem;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.32);
    color: #fff;
    font-size: 1.4rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.lightbox-arrow:hover { transform: translateY(-50%) scale(1.04); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-content:hover .lightbox-arrow { opacity: 1; }

@media (max-width: 900px) {
    /* On mobile/tablet, keep arrows visible (no hover) */
    .lightbox-arrow {
        opacity: 1;
        background: rgba(0,0,0,0.42);
    }
    .lightbox-arrow:hover { transform: translateY(-50%) scale(1.02); }
}

.vehicle-modal-main img { cursor: zoom-in; }
.lightbox-content { cursor: zoom-out; }

@keyframes lightboxIn {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--bg);
        width: 100%;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem 0 2rem;
        transition: left 0.3s ease;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu.active { left: 0; }

    .hamburger { display: flex; }

    .hero { padding: 3rem 1.25rem 4rem; }
    .hero-visual { position: relative; right: 0; bottom: 0; margin-top: 2rem; width: 90%; }
    .hero { flex-direction: column; }
}

@media (max-width: 768px) {
    .navbar-container { padding: 0 1rem; }
    .btn { width: 100%; max-width: 320px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .section-header { margin-bottom: 2.5rem; }
    .vehicles-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .contact-info { grid-template-columns: 1fr; }
    .about-section { grid-template-columns: 1fr; }
    
    /* Footer mobile */
    .footer {
        padding: 2rem 1rem 1.5rem;
    }
    .footer-content {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
        padding: 1.5rem 1.25rem;
    }
    .footer-section {
        text-align: center;
    }
    .footer-brand {
        flex-direction: column;
        text-align: center;
    }
    .footer-brand h3 {
        font-size: 1rem;
    }
    .footer-brand p {
        font-size: 0.85rem;
    }
    .footer-section h4 {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }
    .footer-section ul {
        padding: 0;
    }
    .footer-section li {
        font-size: 0.85rem;
    }
    .footer-section p {
        font-size: 0.85rem;
    }
    .social-links {
        justify-content: center;
    }
    .footer-bottom { 
        flex-direction: column; 
        align-items: center;
        text-align: center;
        gap: 1rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    .footer-powered {
        justify-content: center;
        font-size: 0.85rem;
    }
    .footer-powered-logo {
        height: 24px;
    }
    .footer-bottom p {
        font-size: 0.8rem;
        margin: 0;
    }
    .footer-links { 
        flex-direction: column; 
        gap: 0.5rem;
        align-items: center;
    }
    .footer-links a {
        font-size: 0.8rem;
    }
}

/* ===== Utility ===== */
.fade-in { opacity: 0; transform: translateY(30px); transition: var(--transition); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.vehicle-card.fade-in {
    opacity: 0;
    transform: translateY(26px) scale(0.99);
    transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.55s ease;
}

.vehicle-card.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
}

@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .vehicle-card.fade-in {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    .vehicle-card {
        grid-template-columns: minmax(280px, 45%) 1fr;
        grid-template-areas:
            "thumb main"
            "price price";
    }

    .vehicle-price-block { grid-area: price; flex-direction: row; align-items: center; }
}

@media (max-width: 720px) {
    .vehicle-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "thumb"
            "main"
            "price";
        padding: 0.8rem;
    }

    .vehicle-price-block { align-items: flex-start; }
    .vehicle-spec-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

@media print {
    .navbar,
    .modal,
    .cta-btn {
        display: none;
    }
}

/* Reviews Section */
.reviews-section {
    width: 100%;
    max-width: 1400px;
    padding: 80px 40px;
    margin: 0 auto;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.review-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.review-avatar span {
    color: var(--accent-contrast);
    font-weight: 700;
    font-size: 20px;
}

.review-author h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.review-stars {
    font-size: 16px;
    line-height: 1;
}

.review-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-soft);
    flex-grow: 1;
}

.review-date {
    font-size: 14px;
    color: var(--muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .reviews-section {
        padding: 60px 20px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .review-card {
        padding: 24px;
    }
}
