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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    font-size: 16px;
}

/* Trust indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.trust-indicators span {
    padding: 5px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
}

/* Improved buttons */
button {
    min-height: 44px;
    min-width: 44px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Touch feedback */
button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

button:active::after {
    width: 300px;
    height: 300px;
}

/* Form improvements */
input, select, textarea {
    min-height: 44px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    line-height: 1.5;
}

/* Team grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.team-member {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Contact form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Security indicators */
.security-badge {
    display: inline-block;
    padding: 5px 10px;
    background: #28a745;
    color: white;
    border-radius: 15px;
    font-size: 12px;
    margin: 5px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #e52e2e 0%, #c41e3a 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.header-logo {
    max-width: 150px;
    margin-bottom: 1rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

/* Navigation */
nav {
    background: linear-gradient(135deg, #333 0%, #444 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
}

/* padding removed - now handled by anchor tag */

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 5px;
    padding: 0.8rem 1.2rem;
    display: block;
}

nav ul li a:hover {
    color: #e52e2e;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sticky navigation */
.tab {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/error states */
.success {
    color: #28a745;
    background: #d4edda;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
}

.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}

section {
    margin-bottom: 2rem;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

h2 {
    color: #e52e2e;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e52e2e;
    padding-bottom: 0.5rem;
}

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

h4 {
    color: #555;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

/* Improved readability */
p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Car Grid */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.car-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.car-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}



.car-item img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 1rem;
    border-radius: 5px;
}

/* Content improvements */
.story-content p {
    margin-bottom: 1rem;
}

/* Data tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

tr:hover {
    background: #f8f9fa;
}

/* Lists */
.wishlist {
    list-style-position: inside;
    padding-left: 1rem;
}

/* Improved list styling */
ul li {
    position: relative;
    padding-left: 1.5rem;
}

ul li::before {
    content: '•';
    color: #007bff;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.wishlist li {
    margin-bottom: 0.8rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-left: 4px solid #e52e2e;
    border-radius: 0 5px 5px 0;
    transition: all 0.3s ease;
}

.wishlist li:hover {
    background-color: #f0f0f0;
    transform: translateX(5px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #333;
    color: white;
    margin-top: 2rem;
}

footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

/* Cookie banner */
#cookieBanner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 10px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#cookieBanner a {
    color: #e52e2e;
    text-decoration: underline;
}

#cookieBanner button {
    background: #e52e2e;
    color: white;
    border: none;
    padding: 5px 15px;
    margin-left: 10px;
    border-radius: 3px;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .car-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .trust-indicators {
        font-size: 12px;
        gap: 10px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    /* Ensure touch targets are large enough */
    button, input, select {
        min-height: 44px;
        font-size: 16px;
    }
    
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
    }
    
    /* Stack elements vertically on mobile */
    .contact-info, .contact-form {
        margin-bottom: 30px;
    }
}

/* Performance optimizations */
/* Lazy loading should be set via HTML: <img loading="lazy" ...> */

/* Accessibility improvements */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
    box-shadow: 0 0 0 1px rgba(0,123,255,0.25);
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #007bff;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Tooltips */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }
    
    .trust-indicators span {
        background: black;
        color: white;
    }
    
    button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    button:hover {
        transform: none;
    }
}