/* Global Styles */
:root {
    --primary-color: #1a3c6c;
    --secondary-color: #e63946;
    --accent-color: #2a9d8f;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

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

.text-center {
    text-align: center;
}

.section-padding {
    padding: 5rem 0;
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.logo p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-right: 1.5rem;
}

nav ul li:last-child {
    margin-right: 0;
}

nav ul li a {
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    bottom: 0;
    right: 0;
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
    right: auto;
    left: 0;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    margin-top: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Buttons */
.cta-button, .brand-button, .submit-btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover, .brand-button:hover, .submit-btn:hover {
    background-color: #c1121f;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: #fff;
}

/* Brands Section */
.brands {
    padding: 5rem 0;
    background-color: var(--light-color);
}

.brands h2 {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.brands h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

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

.brand-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.brand-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.brand-card img {
    max-width: 150px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

/* Vehicles Section */
.vehicles {
    padding: 5rem 0;
}

.vehicle-filters {
    text-align: center;
    margin-bottom: 2rem;
}

.filter-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    margin: 0 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: #fff;
}

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

.vehicle-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.vehicle-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vehicle-card:hover .vehicle-image {
    transform: scale(1.03);
}

.vehicle-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.vehicle-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-weight: 700;
    min-height: 3rem;
    display: flex;
    align-items: center;
}

.vehicle-description {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.5em;
}

.vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 0.9rem;
}

.spec-item {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px;
    transition: all 0.2s ease;
    border: 1px solid #eee;
}

.spec-item i {
    color: #e74c3c;
    font-size: 0.9em;
}

.spec-item:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.vehicle-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c;
    margin-top: auto;
    text-align: center;
    padding: 12px 0;
    background: linear-gradient(to right, #f8f9fa, #fff);
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.vehicle-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicle-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    gap: 10px;
}

.vehicle-actions .btn {
    flex: 1;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.vehicle-actions .btn i {
    font-size: 0.9em;
}

.vehicle-image-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contact Form */
.contact {
    background-color: var(--light-color);
    padding: 5rem 0;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.contact h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
    background: #f9f9f9;
}

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

.form-group label {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: var(--gray-color);
    transition: var(--transition);
    pointer-events: none;
    background: #f9f9f9;
    padding: 0 0.5rem;
    border-radius: 3px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:not([value=""]) + label {
    top: -0.6rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    background: #fff;
}

/* Form Validation Styles */
.form-group input.error,
.form-group select.error {
    border-color: #e63946 !important;
    background-color: #fff5f5;
}

.form-group label.error {
    color: #e63946;
}

.form-group .error-message {
    color: #e63946;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 4rem 0 0;
}

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

.footer-section h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: var(--secondary-color);
    bottom: 0;
    right: 0;
}

.footer-section p, .footer-section a, .footer-section i {
    color: #adb5bd;
    margin-bottom: 0.8rem;
    display: block;
}

.footer-section a:hover {
    color: #fff;
    padding-right: 5px;
}

.footer-section i {
    margin-left: 10px;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 90px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 90px);
        background: #fff;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 2rem;
        overflow-y: auto;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 0 0 1.5rem 0;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero {
        margin-top: 80px;
        height: calc(100vh - 80px);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .brands-grid, .vehicles-grid, .footer-content {
        grid-template-columns: 1fr;
    }
    
    .vehicle-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 40px 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    display: flex;
    align-items: center;
    max-width: 90%;
    min-width: 300px;
}

.notification.success {
    background-color: #28a745;
    border-right: 5px solid #218838;
}

.notification.error {
    background-color: #dc3545;
    border-right: 5px solid #c82333;
}

.notification.info {
    background-color: #17a2b8;
    border-right: 5px solid #138496;
}

.notification.warning {
    background-color: #ffc107;
    color: #212529;
    border-right: 5px solid #e0a800;
}

.close-notification {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-notification:hover {
    opacity: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* File Upload Styles */
.form-group input[type="file"] {
    display: none;
}

.file-label {
    position: static !important;
    transform: none !important;
    color: var(--primary-color) !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    background: none !important;
    padding: 0 !important;
}

.file-input-wrapper {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #f9f9f9;
    position: relative;
}

.file-input-wrapper:hover {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.file-input-wrapper i {
    font-size: 2rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
    display: block;
}

.file-text {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.form-group input[type="file"]:focus + .file-input-wrapper {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 60, 108, 0.1);
}

.form-group input[type="file"]:valid + .file-input-wrapper {
    border-color: var(--accent-color);
    background: #f0fff4;
}

.form-group input[type="file"]:valid + .file-input-wrapper .file-text {
    color: var(--accent-color);
    font-weight: 600;
}

/* Custom Color Input Styles */
.form-group input[type="text"]#custom-car-color {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
    background: #f9f9f9;
    margin-top: 10px;
}

.form-group input[type="text"]#custom-car-color:focus {
    border-color: var(--primary-color);
    outline: none;
    background: #fff;
}

.btn-secondary {
    background-color: var(--gray-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: #5a6268;
}
