/*!
 * Main Stylesheet for ud cars ltd WordPress Theme
 * Based on original HTML design with WordPress compatibility
 */

:root {
    --primary: #0A2463; /* Deep professional blue */
    --secondary: #C41E3A; /* Sophisticated crimson accent */
    --accent: #FF9F1C; /* Vibrant orange for highlights */
    --light: #F8F9FA;
    --dark: #212529;
    --gray: #6C757D;
    --light-gray: #E9ECEF;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #fff;
    overflow-x: hidden;
}

/* WordPress specific body classes */
.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar header {
        top: 46px;
    }
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
}

h2 {
    font-size: 2.2rem;
    color: var(--primary);
    position: relative;
    padding-bottom: 0.5rem;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 4px;
    background-color: var(--secondary);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary);
}

p {
    margin-bottom: 1.2rem;
    color: var(--gray);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-accent {
    background-color: var(--accent);
}

.btn-accent:hover {
    background-color: var(--secondary);
}

/* Header & Navigation WordPress Updates */
header {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

/* WordPress Logo Styles */
.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
    color: var(--primary);
}

.logo h1 a {
    color: var(--primary);
    text-decoration: none;
}

.logo h1 a:hover {
    color: var(--primary);
}

.logo span {
    color: var(--secondary);
}

/* WordPress Custom Logo */
.custom-logo-link {
    display: inline-block;
    max-height: 50px;
}

.custom-logo {
    max-height: 50px;
    width: auto;
}

/* WordPress Navigation Updates */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 2rem;
    position: relative;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    text-decoration: none;
}

.nav-links a:hover,
.nav-links .current-menu-item > a {
    color: var(--secondary);
}

/* WordPress Submenu */
.nav-links .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

.nav-links li:hover > .sub-menu {
    display: block;
}

.nav-links .sub-menu li {
    margin: 0;
    width: 100%;
}

.nav-links .sub-menu a {
    padding: 10px 20px;
    display: block;
    border-bottom: 1px solid var(--light-gray);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 5px 10px;
    z-index: 1001;
}

/* Hero Section WordPress Updates */
.hero {
    padding: 180px 0 100px;
    background: linear-gradient(rgba(10, 36, 99, 0.85), rgba(10, 36, 99, 0.9)), url('https://images.unsplash.com/photo-1494976388531-d1058494cdd8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') no-repeat center center/cover;
    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 2rem;
}

/* Features Section */
.features {
    padding: 100px 0;
    background-color: var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2:after {
    left: 50%;
    transform: translateX(-50%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Inventory Section - WordPress Updates */
.inventory {
    padding: 100px 0;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.car-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.car-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.car-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.car-card:hover .car-image img {
    transform: scale(1.05);
}

/* WordPress Featured Image Support */
.post-thumbnail {
    width: 100%;
    height: 100%;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-info {
    padding: 25px;
}

.car-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray);
    flex-wrap: wrap;
    gap: 10px;
}

.car-price {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.3rem;
    margin: 10px 0;
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* About Section */
.about {
    padding: 100px 0;
    display: flex;
    align-items: center;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact Section - WordPress Form Updates */
.contact {
    padding: 100px 0;
    background-color: var(--light);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.3rem;
    color: var(--primary);
    margin-right: 15px;
    margin-top: 5px;
}

/* WordPress Contact Form Styling */
.contact-form {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.wpcf7-form, 
.wpforms-container {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 36, 99, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* WordPress Form Plugin Compatibility */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpforms-field input,
.wpforms-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
}

.wpcf7-submit,
.wpforms-submit {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.wpcf7-submit:hover,
.wpforms-submit:hover {
    background-color: var(--secondary);
}

/* WordPress Form Success/Error States */
.wpcf7 .screen-reader-response,
.wpforms-confirmation-container-full {
    margin-top: 15px;
    padding: 15px;
    border-radius: 4px;
}

.wpcf7-mail-sent-ok {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wpcf7-validation-errors {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer WordPress Updates */
footer {
    background-color: var(--primary);
    color: white;
    padding: 70px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--accent);
}

.footer-links h4, 
.footer-contact h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--accent);
    min-width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* WordPress Page/Post Content Styling */
.entry-content {
    margin-top: 20px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* WordPress Widget Areas */
.widget-area {
    padding: 40px 0;
}

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.widget a {
    color: var(--dark);
    text-decoration: none;
}

.widget a:hover {
    color: var(--secondary);
}

/* WordPress Breadcrumbs */
.breadcrumbs {
    padding: 15px 0;
    background-color: var(--light);
    margin-bottom: 30px;
}

.breadcrumbs a {
    color: var(--gray);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs .separator {
    margin: 0 10px;
    color: var(--gray);
}

/* WordPress Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    background-color: white;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    color: var(--dark);
    text-decoration: none;
}

.pagination a:hover,
.pagination .current {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* WordPress Search Results */
.search-results .search-result-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--light-gray);
}

.search-results .entry-title {
    margin-bottom: 10px;
}

.search-results .entry-summary {
    color: var(--gray);
}

/* WordPress 404 Page */
.error-404 {
    text-align: center;
    padding: 100px 0;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.error-404 .search-form {
    max-width: 500px;
    margin: 30px auto;
}

/* WordPress Comment Styling */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--light-gray);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--light);
    border-radius: 8px;
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author .avatar {
    border-radius: 50%;
    margin-right: 15px;
}

.comment-meta {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.comment-content {
    color: var(--dark);
}

.comment-reply-link {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.comment-reply-link:hover {
    color: var(--secondary);
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content, 
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
}


@media (max-width: 576px) {
    .stats {
        flex-direction: column;
        gap: 25px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .feature-card, 
    .service-card, 
    .contact-form {
        padding: 30px 20px;
    }
    
    .car-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* WordPress Admin Bar Fix */
@media screen and (max-width: 600px) {
    #wpadminbar {
        position: fixed !important;
    }
}


/* ============================================
   MOBILE MENU - CLEANED VERSION
   ============================================ */

/* Mobile menu button - Always visible on mobile */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
        z-index: 1001;
        margin-left: auto;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    /* Default state: Hide the menu on mobile */
    .nav-links {
        display: none !important;
        flex-direction: column;
        position: fixed;
        top: 80px; /* Adjust based on header height */
        left: 0;
        width: 100%;
        background-color: white;
        padding: 20px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    /* Active state: Show the menu when toggled */
    .nav-links.mobile-active {
        display: flex !important;
    }
    
    /* Menu items styling */
    .nav-links.mobile-active li {
        margin: 0 !important;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav-links.mobile-active li:last-child {
        border-bottom: none;
    }
    
    .nav-links.mobile-active a {
        display: block;
        padding: 15px 20px;
        width: 100%;
        font-size: 1.1rem;
    }
    
    .nav-links.mobile-active a:hover {
        background-color: var(--light);
        color: var(--secondary);
    }
    
    /* WordPress admin bar adjustment */
    .admin-bar .nav-links {
        top: 112px; /* 80px header + 32px admin bar */
    }
    
    @media screen and (max-width: 782px) {
        .admin-bar .nav-links {
            top: 126px; /* 80px header + 46px admin bar */
        }
    }
    
    /* REMOVE conflicting styles - Keep desktop menu visible */
    @media (min-width: 769px) {
        .nav-links {
            display: flex !important;
        }
    }
}


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}