/**
 * Main CSS - Vittorazi.eu
 * Non-critical styles loaded after page render
 */

/* PREVENT HORIZONTAL SCROLL */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

section, div, article {
    max-width: 100%;
}

/* CLS FIX: Aspect Ratio for All Images */
img {
    height: auto;
    max-width: 100%;
}

img[width][height] {
    aspect-ratio: attr(width) / attr(height);
}

/* Hero Image - Critical for CLS - Responsive Aspect Ratio */
.hero-background img {
    width: 100%;
    height: auto;
    display: block;
}

/* Mobile: 768x1024 = 3:4 aspect ratio */
@media (max-width: 768px) {
    .hero-background img {
        aspect-ratio: 3 / 4;
    }
}

/* Desktop: 1920x1080 = 16:9 aspect ratio */
@media (min-width: 769px) {
    .hero-background img {
        aspect-ratio: 16 / 9;
    }
}

/* Product Images - Fixed Aspect Ratio */
.product-card img,
.lineup-image {
    aspect-ratio: 1000 / 563;
    object-fit: cover;
}

/* Logo Images */
.logo-vittorazi,
.logo-divider-section img {
    aspect-ratio: auto;
}

/* ============================================
   SECTIONS
   ============================================ */

.logo-divider-section {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(180deg, #f9f9f9 0%, white 100%);
}

.logo-divider-section img {
    max-width: 300px;
    width: 100%;
    height: auto;
    opacity: 0.9;
    filter: grayscale(10%);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.motors-section,
.content-section,
.motor-lineup,
.cta-section {
    padding: 5rem 0;
}

.motors-section {
    background: #f9f9f9;
}

.why-vittorazi {
    background: white;
}

.why-vittorazi h2 {
    text-align: center;
}

.motor-lineup {
    background: #f5f5f5;
}

.cta-section {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

/* ============================================
   PRODUCT GRID
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.product-image {
    aspect-ratio: 1000 / 563;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e59420;
    margin-bottom: 1rem;
}

.product-cta {
    color: #e59420;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.product-card:hover .product-cta {
    text-decoration: underline;
}

/* ============================================
   FEATURES GRID
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* ============================================
   LINEUP GRID
   ============================================ */

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

.lineup-item {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.lineup-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.lineup-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #ffffff;
    padding: 1rem;
}

.lineup-item h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #e59420;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.specs-list {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.spec {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem;
    color: #666;
}

.spec:last-child {
    border-bottom: none;
}

.spec strong {
    color: #333;
    font-weight: 600;
}

.lineup-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.lineup-item .btn {
    width: 100%;
    text-align: center;
}

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

.site-footer {
    background: #222;
    color: #fff;
    padding: 3rem 0 2rem;
}

.footer-logo {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #444;
}

.footer-logo img {
    max-width: 350px;
    width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    filter: brightness(1.2) drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.footer-tagline {
    color: #aaa;
    font-size: 0.95rem;
    font-style: italic;
    margin-top: 1rem;
}

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

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #e59420;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.footer-column a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
    padding: 8px 0;
    min-height: 44px;
    line-height: 28px;
}

.footer-column a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 1.5rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #e59420;
    text-decoration: none;
    font-weight: 600;
}

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

.footer-disclaimer {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
    line-height: 1.6;
}

.footer-legal-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #555;
    font-size: 0.8rem;
    opacity: 0.7;
    line-height: 1.8;
}

.footer-legal-info strong {
    color: #e59420;
    font-weight: 600;
}

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

@media (max-width: 968px) {
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

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

    .lineup-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .motors-section,
    .content-section,
    .motor-lineup,
    .cta-section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-section p {
        font-size: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .btn-large {
        width: 100%;
        padding: 14px 24px;
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */

.language-selector-nav {
    display: flex;
    align-items: center;
}

.language-button {
    background: transparent;
    border: 2px solid #e59420;
    color: #e59420;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-button:hover {
    background: #e59420;
    color: white;
}

.language-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

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

.language-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.language-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.language-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.language-modal-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.language-modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.language-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.language-modal-body {
    padding: 2rem;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.language-option {
    background: #f9f9f9;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.language-option:hover {
    background: #f0f0f0;
    border-color: #e59420;
}

.language-option.active {
    background: #fff4e6;
    border-color: #e59420;
    color: #e59420;
    font-weight: 700;
}

.language-flag {
    font-size: 1.5rem;
    line-height: 1;
}

.language-name {
    font-size: 1rem;
}

.current-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.checkmark {
    color: #e59420;
    font-weight: 700;
    font-size: 1.2rem;
}

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

    .language-modal-content {
        width: 95%;
    }

    .language-modal-header {
        padding: 1rem 1.5rem;
    }

    .language-modal-body {
        padding: 1.5rem;
    }
}

/* ============================================
   DETAILED FEATURES SECTION
   ============================================ */

.detailed-features-section {
    background: white;
    padding: 5rem 0;
}

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

.detailed-feature {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #e59420;
}

.detailed-feature h3 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.detailed-feature p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.detailed-feature strong {
    color: #333;
    font-weight: 600;
}

@media (max-width: 968px) {
    .detailed-features-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq-section {
    background: #f9f9f9;
    padding: 5rem 0;
}

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

.faq-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.faq-item h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.faq-item ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.faq-item li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.faq-item a {
    color: #e59420;
    font-weight: 600;
}

/* ============================================
   COMPARISON TABLE
   ============================================ */

.comparison-section {
    background: white;
    padding: 5rem 0;
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin-top: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.comparison-table thead {
    background: #2c2c2c;
    color: white;
}

.comparison-table th {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.comparison-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.comparison-table td:first-child {
    background: #f5f5f5;
    font-weight: 600;
    text-align: left;
}

.btn-small {
    padding: 12px 20px;
    font-size: 0.9rem;
    min-width: 140px;
    display: inline-block;
    text-align: center;
}

.comparison-table .btn-small {
    width: 100%;
    max-width: 160px;
    margin: 0 auto;
    display: block;
}

/* ============================================
   TRUST SECTION
   ============================================ */

.trust-section {
    background: #f5f5f5;
    padding: 5rem 0;
}

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

.trust-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.trust-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.trust-item h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
}

.trust-item p {
    color: #666;
    line-height: 1.6;
}

.testimonials {
    margin-top: 4rem;
}

.testimonials h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

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

.testimonial {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stars {
    color: #ffd700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial p {
    font-style: italic;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.testimonial .author {
    font-style: normal;
    font-weight: 600;
    color: #333;
}

/* ============================================
   UTILITIES
   ============================================ */

.error-message {
    text-align: center;
    color: #c62828;
    padding: 2rem;
    font-size: 1.1rem;
    background: #ffebee;
    border-radius: 8px;
    margin: 2rem 0;
}

.success-message {
    text-align: center;
    color: #2e7d32;
    padding: 2rem;
    font-size: 1.1rem;
    background: #e8f5e9;
    border-radius: 8px;
    margin: 2rem 0;
}

/* ============================================
   CONTACT MODAL
   ============================================ */

.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.contact-modal.active {
    display: flex;
}

.contact-modal-content {
    background: white;
    max-width: 600px;
    width: 100%;
    border-radius: 12px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

.contact-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.contact-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.contact-modal h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #c62828;
}

.contact-modal-subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

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

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.95rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #c62828;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
    flex-shrink: 0;
}

.form-checkbox label {
    font-weight: 400;
    font-size: 0.9rem;
    margin: 0;
}

.form-checkbox a {
    color: #c62828;
    text-decoration: none;
}

.form-checkbox a:hover {
    text-decoration: underline;
}

.contact-submit-btn {
    width: 100%;
    background: #c62828;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-submit-btn:hover {
    background: #b71c1c;
}

.contact-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-status.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
}

.form-status.error {
    display: block;
    background: #ffebee;
    color: #c62828;
}

.contact-direct-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.contact-email-link {
    color: #c62828;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-email-link:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-modal-content {
        padding: 2rem 1.5rem;
        max-height: 95vh;
    }

    .contact-modal h2 {
        font-size: 1.5rem;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
    }
}
