/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --white: #ffffff;
    --text-dark: #374151;
    --text-light: #6b7280;
    --success-color: #10b981;
    --border-color: #e5e7eb;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.top-bar {
    background: var(--dark-color);
    color: white;
    padding: 10px 0;
    font-size: 0.9em;
}

.contact-info {
    display: flex;
    gap: 30px;
    justify-content: flex-end;
}

.contact-item {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

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

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin: 0;
}

.logo p {
    font-size: 0.85em;
    color: var(--text-light);
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-color);
    color: white;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('ferrari-sfondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    padding: 100px 0;
    position: relative;
}

/* Fixed background only on desktop */
@media (min-width: 769px) {
    .hero {
        background-attachment: fixed;
    }
}

.hero-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.3em;
    margin-bottom: 40px;
    opacity: 0.95;
}

.search-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.search-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.search-field label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.search-field select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.search-field select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

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

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

.btn-large {
    padding: 15px 40px;
    font-size: 1.1em;
    width: 100%;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5em;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1em;
    color: var(--text-light);
}

/* Cars Grid */
.cars-section {
    background: var(--light-color);
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

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

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

.car-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Mobile optimization for car images */
@media (max-width: 768px) {
    .car-image {
        height: 200px;
        background-size: contain;
    }
}

@media (max-width: 480px) {
    .car-image {
        height: 180px;
        background-size: contain;
    }
}

.car-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.car-info {
    padding: 20px;
}

.car-title {
    font-size: 1.4em;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.car-price {
    font-size: 1.8em;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.car-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.car-spec {
    font-size: 0.9em;
    color: var(--text-light);
}

.car-spec strong {
    color: var(--text-dark);
}

.car-actions {
    display: flex;
    gap: 10px;
}

.car-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 0.9em;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5em;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.about-text h3 {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--light-color);
    border-radius: 10px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9em;
}

.image-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    height: 400px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.image-placeholder p {
    margin-top: 10px;
    font-size: 1.1em;
}

/* CTA Dual */
.cta-dual {
    background: var(--dark-color);
    color: white;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.cta-card {
    background: rgba(255,255,255,0.1);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
}

@media (max-width: 992px) {
    .cta-grid {
        grid-template-columns: 1fr !important;
    }
}

.cta-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.cta-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.cta-card h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
}

.cta-card p {
    margin-bottom: 25px;
    font-size: 1.1em;
    opacity: 0.9;
}

/* Valuation Section */
.valuation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.valuation-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.step {
    display: flex;
    gap: 20px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    flex-shrink: 0;
}

.step h4 {
    font-size: 1.3em;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.step p {
    color: var(--text-light);
}

.valuation-form {
    background: var(--light-color);
    padding: 40px;
    border-radius: 15px;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-info {
    background: #fef3c7;
    border-left: 4px solid var(--accent-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

/* Reviews */
.reviews-section {
    background: var(--light-color);
}

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

.review-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.review-stars {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.review-text {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-style: italic;
}

.review-author {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.review-author strong {
    color: var(--dark-color);
}

.review-author span {
    font-size: 0.9em;
    color: var(--text-light);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--light-color);
    border-radius: 12px;
    transition: transform 0.3s;
}

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

.service-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.service-card h4 {
    font-size: 1.3em;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-light);
}

/* Contact */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info-box {
    background: var(--light-color);
    padding: 40px;
    border-radius: 15px;
}

.contact-info-box h3 {
    font-size: 1.8em;
    color: var(--dark-color);
    margin-bottom: 25px;
}

.contact-detail {
    margin-bottom: 25px;
}

.contact-detail strong {
    display: block;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.contact-detail p {
    color: var(--text-dark);
    line-height: 1.6;
}

.contact-detail a {
    color: var(--primary-color);
    text-decoration: none;
}

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

.contact-form-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    border: 2px solid var(--border-color);
}

.contact-form-box h3 {
    font-size: 1.8em;
    color: var(--dark-color);
    margin-bottom: 25px;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.2em;
}

.footer-col p {
    line-height: 1.8;
    opacity: 0.9;
}

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

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-col ul li a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: background 0.3s;
}

.social-link:hover {
    background: rgba(255,255,255,0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    opacity: 0.7;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
}

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

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.3s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

.whatsapp-icon {
    font-size: 2em;
}

/* Utilities */
.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 992px) {
    .search-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content,
    .valuation-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero-title {
        font-size: 2em;
    }
    
    .hero-subtitle {
        font-size: 1.1em;
    }
    
    .search-row,
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .cta-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    /* Make phone numbers white on mobile - STRONGER RULE */
    .footer-col p a,
    .footer-col a[href^="tel:"],
    .footer-col a[href^="mailto:"] {
        color: white !important;
        text-decoration: none !important;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }
    
    .search-box {
        padding: 20px;
    }
    
    section {
        padding: 50px 0;
    }
    
    .section-header h2 {
        font-size: 2em;
    }
}