/* style.css - Autonoleggio Molinari */

/* ============================================
   RESET & VARIABILI
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colori */
    --color-primary: #9b3131;
    --color-primary-dark: #7a2525;
    --color-text-dark: #6d0808;
    --color-text-light: #ffffff;
    --color-bg-light: #fdfbf7;
    --color-bg-offwhite: #f5f0ea;
    --color-border: #e8e0d5;
    
    /* Font */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    /* Spaziature */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 4rem;
    
    /* Transizioni */
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-dark);
    background: var(--color-bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
    text-align: center;
}

/* ============================================
   HEADER & DESKTOP NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-primary);
    z-index: 100;
    padding: var(--spacing-sm) var(--spacing-md);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

.header-logo .logo-img {
    height: 60px;
    width: auto;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.header-contact .contact-email,
.header-contact .contact-phone {
    font-size: 0.8rem;
    color: var(--color-text-light);
    letter-spacing: 0.3px;
    opacity: 0.9;
}

.header-contact a:hover {
    opacity: 1;
}

.header-social {
    display: flex;
    gap: 0.8rem;
}

.social-icon-img {
    width: 20px;
    height: 20px;
    display: block;
    transition: opacity 0.3s ease;
}

.social-icon-img:hover {
    opacity: 0.7;
}

/* Desktop Navigation */
.main-nav {
    background: var(--color-primary);
    border-top: none;
    border-bottom: none;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    list-style: none;
    padding: 0.75rem 0;
    margin: 0 auto;
    max-width: var(--container-width);
}

.nav-menu a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text-light);
    transition: var(--transition);
}

.nav-menu a:hover {
    opacity: 0.7;
}

/* ============================================
   HAMBURGER (MOBILE ONLY)
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 102;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-light);
    margin: 3px 0;
    transition: var(--transition);
}

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

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 200;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
    display: block;
    opacity: 1;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(85%, 320px);
    background: var(--color-bg-light);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    padding: var(--spacing-md);
    overflow-y: auto;
    z-index: 201;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu-overlay.open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--color-text-dark);
    padding: 0.5rem;
}

.mobile-menu-close:hover {
    color: var(--color-primary);
}

.mobile-menu-preview {
    text-align: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.mobile-logo {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-primary);
}

.mobile-tagline {
    font-size: 0.75rem;
    color: var(--color-text-dark);
    margin-top: var(--spacing-sm);
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-item {
    display: block;
    padding: 1.8rem var(--spacing-sm);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-dark);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
    text-align: center;
    line-height: 1;
}

.mobile-menu-item:hover {
    color: var(--color-primary);
    padding-left: calc(var(--spacing-sm) + 5px);
}

.mobile-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1.8rem 0;
    border-top: none;
}

.mobile-social-img {
    width: 28px;
    height: 28px;
    display: block;
    transition: opacity 0.3s ease;
}

.mobile-social-img:hover {
    opacity: 0.7;
}

.mobile-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
}

.mobile-contact a {
    font-size: 0.85rem;
    color: var(--color-primary);
}

.mobile-menu-bg {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

/* ============================================
   INTRODUZIONE ATTIVITÀ
   ============================================ */
.intro-activity {
    padding: calc(var(--spacing-xl) + 100px) 0 2rem 0;
    background: var(--color-bg-light);
    border-bottom: 1px solid var(--color-border);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.intro-image {
    width: 100%;
}

.intro-img {
    width: 100%;
    display: block;
}

.intro-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.intro-text p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-dark);
    line-height: 1.7;
}

/* ============================================
   HERO CAR SECTION
   ============================================ */
.hero-car {
    padding: 2rem 0 var(--spacing-xl) 0;
    background: var(--color-bg-light);
    border-bottom: 1px solid var(--color-border);
}

.hero-car:first-of-type {
    margin-top: 0;
}

.car-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: var(--spacing-xs);
}

.car-title span {
    font-weight: 700;
}

.car-subtitle {
    text-align: center;
    color: var(--color-text-dark);
    margin-bottom: 2rem;
    font-size: 1rem;
    letter-spacing: 1px;
}

/* GALLERY */
.hero-gallery {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2rem auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.gallery-container {
    position: relative;
    width: 100%;
    background: #1a1a1a;
}

.gallery-container::after {
    content: "";
    display: block;
    padding-bottom: 56.25%;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #9b3131;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

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

.car-description {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.car-description p {
    margin-bottom: 0;
    color: var(--color-text-dark);
    font-size: 1rem;
    line-height: 1.7;
}

/* ============================================eviews
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--color-primary);
}

/* ============================================
   RECENSIONI - CAROUSEL
   ============================================ */
.reviews {
    padding: 2rem 0 2rem 0;
    background: var(--color-bg-offwhite);
    overflow: hidden;
}

.reviews .section-title {
    margin-bottom: 2rem;
}

.reviews-carousel {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    cursor: pointer;
}

.reviews-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 2rem;
}

.review-card {
    flex: 0 0 calc(33.333% - 1.333rem);
    background: var(--color-bg-light);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
}

.review-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.review-stars {
    margin-bottom: 1rem;
}

.star {
    font-size: 1.2rem;
    color: #ccc;
}

.star.filled {
    color: #ffc107;
}

.review-text {
    font-style: italic;
    line-height: 1.6;
    color: var(--color-text-dark);
    font-size: 0.9rem;
    flex: 1;
}

/* ============================================
   CONTATTI E SERVIZI
   ============================================ */
.contact {
    padding: 2rem 0 var(--spacing-xl) 0;
    background: var(--color-bg-light);
}

.contact .section-title {
    margin-bottom: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.contact-info h3,
.service-info h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.contact-info p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-dark);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.contact-details a {
    font-size: 1.1rem;
    color: var(--color-primary);
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--color-primary-dark);
    padding-left: 5px;
}

.service-info ul {
    list-style: none;
}

.service-info ul li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-dark);
}

.service-info ul li strong {
    color: var(--color-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--color-primary);
    color: var(--color-text-light);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.footer-logo h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
}

.footer-logo p {
    font-size: 0.75rem;
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: var(--spacing-sm);
}

.footer-social-img {
    width: 24px;
    height: 24px;
    display: block;
    transition: opacity 0.3s ease;
}

.footer-social-img:hover {
    opacity: 0.7;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    opacity: 0.7;
}
.hero-car:first-of-type {
    margin-top: 130px; /* Compensa l'altezza dell'header fisso */
}

/* Legal note nel footer */
.legal-note {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 0.75rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .header-right {
        display: none;
    }
    .main-nav {
    display: none;
    }
    .hamburger {
        display: flex;
    }
    .hero-car {
    padding: 2rem 0 2rem 0;
    }
    .hero-car:first-of-type {
        margin-top: 0;
    }
    
    .car-title {
        font-size: 1.8rem;
    }
    
    .hero-gallery {
        max-width: 95%;
    }
    
    .intro-activity {
        padding: calc(var(--spacing-xl) + 80px) 0 2rem 0;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .intro-text {
        text-align: center;
    }
    
    .intro-title {
        font-size: 1.6rem;
    }
    
        .review-card {
        flex: 0 0 calc(100% - 1rem);
        min-height: 260px;
    }
    
    .reviews-track {
        gap: 1rem;
    }
    
    .review-title {
        font-size: 1rem;
    }
    
    .review-text {
        font-size: 0.85rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .car-title {
        font-size: 1.5rem;
    }
    
    .review-card {
        padding: var(--spacing-md);
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 20px;
        padding: 10px 15px;
    }
}