/* =====================================================
   Primer Auto Garage - Main Stylesheet
   ===================================================== */

:root {
    --toyota-red: #eb0a1e;
    --toyota-dark: #1a1a1a;
    --toyota-gray: #6c757d;
    --toyota-light: #f8f9fa;
    --toyota-white: #ffffff;
    --toyota-border: #e9ecef;
    --toyota-shadow: rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333;
    background-color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s ease; }

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

/* Navigation */
.toyota-nav {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    padding: 0.875rem 0;
}

.toyota-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--toyota-red);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.brand-logo {
    width: 180px;
    height: 60px;
    object-fit: contain;
    margin-right: 0.75rem;
}

.footer-brand .brand-logo {
    width: 180px;
    height: 60px;
    margin-bottom: 0.75rem;
}

.light-sidebar .brand-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
}

.toyota-brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: #1a1a1a;
    line-height: 1.2;
}

.toyota-brand-text span {
    color: var(--toyota-red);
    font-weight: 700;
}

.navbar-light .nav-link {
    color: #4a4a4a !important;
    font-weight: 500;
    padding: 0.5rem 1.25rem !important;
    transition: color 0.2s ease;
}

.navbar-light .nav-link:hover {
    color: var(--toyota-red) !important;
}

.navbar-light .nav-link.active {
    color: var(--toyota-red) !important;
    background: rgba(235, 10, 30, 0.08);
    border-radius: 50px;
}

.btn-toyota {
    background: var(--toyota-red);
    color: #fff;
    border: 1px solid var(--toyota-red);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
}

.btn-toyota:hover {
    background: #c20818;
    color: #fff;
    border-color: #c20818;
}

.btn-outline-toyota {
    border: 1px solid var(--toyota-red);
    color: var(--toyota-red);
    font-weight: 600;
}

.btn-outline-toyota:hover { background: var(--toyota-red); color: #fff; }

.btn-outline-light-hero {
    border: 1px solid rgba(255,255,255,0.6);
    color: #fff;
    background: rgba(255,255,255,0.08);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

.btn-outline-light-hero:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Hero */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(26,26,26,0.82) 0%, rgba(26,26,26,0.6) 100%),
                url('../images/hero-bg.jpg') center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding-top: 80px;
}

.hero-bg-fallback {
    background: linear-gradient(135deg, rgba(26,26,26,0.92) 0%, rgba(26,26,26,0.75) 100%),
                linear-gradient(135deg, #1a1a1a 0%, #333 100%);
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero-badge i { color: #fff; }

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title .text-toyota-light {
    color: #ff4d5a;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.85);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

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

.hero-cta .btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
}

/* Section Titles */
.section-title {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.section-title span { color: var(--toyota-red); }

.section-subtitle {
    color: var(--toyota-gray);
    margin-bottom: 2.5rem;
}

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

/* Cards */
.toyota-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px var(--toyota-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    background: #fff;
}

.toyota-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(235, 10, 30, 0.1);
    color: var(--toyota-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.service-card {
    overflow: hidden;
}

.service-card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.service-card-header .service-icon {
    margin-bottom: 0.75rem;
}

.service-meta li {
    margin-bottom: 0.5rem;
    color: #555;
}

.service-meta i {
    margin-right: 0.5rem;
}

/* Feature cards */
.feature-card {
    padding: 2rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 24px var(--toyota-shadow);
    height: 100%;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--toyota-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

/* Stats */
.stats-section { background: var(--toyota-dark); color: #fff; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--toyota-red);
}

.stat-label { color: rgba(255,255,255,0.7); font-size: 0.9rem; }

/* Testimonials */
.testimonial-card {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 24px var(--toyota-shadow);
    height: 100%;
}

.testimonial-rating { color: #ffc107; margin-bottom: 1rem; }

/* Media */
.media-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px var(--toyota-shadow);
    cursor: pointer;
}

.media-card img { transition: transform 0.5s ease; }
.media-card:hover img { transform: scale(1.08); }

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 1.5rem;
    color: #fff;
}

/* Footer */
.toyota-footer { background: #111; color: #bbb; }

.footer-brand { color: #fff; margin-bottom: 1rem; }
.footer-brand .toyota-brand-text { color: #fff !important; }
.footer-brand .toyota-brand-text span { color: #ff6b6b !important; }

.footer-text { color: #888; font-size: 0.95rem; }

.footer-links, .footer-contact { list-style: none; padding: 0; }

.footer-links li, .footer-contact li { margin-bottom: 0.75rem; }

.footer-links a { color: #888; }
.footer-links a:hover { color: var(--toyota-red); }

.footer-contact i { color: var(--toyota-red); margin-right: 0.5rem; }

.social-links a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.social-links a:hover { background: var(--toyota-red); }

/* Forms */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid var(--toyota-border);
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--toyota-red);
    box-shadow: 0 0 0 0.2rem rgba(235, 10, 30, 0.15);
}

.form-label { font-weight: 500; color: #555; }

.auth-card {
    max-width: 500px;
    margin: 2rem auto;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

/* Booking steps */
.booking-step {
    display: none;
}

.booking-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-item::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #e9ecef;
    z-index: -1;
}

.step-item:last-child::after { display: none; }

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step-item.active .step-circle,
.step-item.completed .step-circle {
    background: var(--toyota-red);
    color: #fff;
}

.step-item.active::after,
.step-item.completed::after { background: var(--toyota-red); }

/* Badges */
.status-badge {
    display: inline-block;
    padding: 0.35em 0.75em;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d1ecf1; color: #0c5460; }
.status-in_progress { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

/* Admin Dashboard */
.dashboard-card {
    border: none;
    border-radius: 16px;
    padding: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.dashboard-card i {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    font-size: 4rem;
    opacity: 0.15;
}

.card-customers { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.card-vehicles { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.card-appointments { background: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%); }
.card-services { background: linear-gradient(135deg, #eb0a1e 0%, #ff6b6b 100%); }
.card-revenue { background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }

.sidebar {
    min-height: 100vh;
    background: #1a1a1a;
    color: #fff;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.9rem 1.5rem;
    border-left: 4px solid transparent;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--toyota-red);
}

.sidebar .nav-link i { margin-right: 0.75rem; }

/* Light Sidebar (Customer/Admin) */
.light-sidebar {
    min-height: 100vh;
    background: #fff;
    border-right: 1px solid #e9ecef;
    box-shadow: 2px 0 20px rgba(0,0,0,0.04);
}

.light-sidebar .nav-link {
    color: #555;
    padding: 0.9rem 1.5rem;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.light-sidebar .nav-link:hover,
.light-sidebar .nav-link.active {
    color: var(--toyota-red);
    background: rgba(235, 10, 30, 0.06);
    border-left-color: var(--toyota-red);
}

.light-sidebar .nav-link i { margin-right: 0.75rem; color: var(--toyota-red); }

/* Tables */
.table-toyota thead { background: #1a1a1a; color: #fff; }
.table-toyota th { font-weight: 600; padding: 1rem; }
.table-toyota td { padding: 1rem; vertical-align: middle; }

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

/* Responsive */
@media (max-width: 991.98px) {
    .hero-section { min-height: 80vh; }
    .section-padding { padding: 3rem 0; }
    .sidebar { min-height: auto; }
}

@media (max-width: 575.98px) {
    .hero-title { font-size: 2rem; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
}

/* Fixed navbar offset */
main { padding-top: 100px; }

.hero-section { margin-top: -100px; }
.page-header { margin-top: -100px; }

/* Utilities */
.bg-toyota { background-color: var(--toyota-red) !important; }
.text-toyota { color: var(--toyota-red) !important; }
.border-toyota { border-color: var(--toyota-red) !important; }

/* Aftersales Page */
.aftersales-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.aftersales-title h2 {
    font-weight: 800;
    font-size: 1.75rem;
    margin: 0;
    letter-spacing: 1px;
}

.aftersales-title .line {
    flex: 1;
    max-width: 120px;
    height: 2px;
    background: var(--toyota-red);
}

.aftersales-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transition: transform 0.3s ease;
}

.aftersales-image:hover {
    transform: translateY(-5px);
}

.aftersales-image img {
    height: 260px;
    object-fit: cover;
    display: block;
}

.aftersales-block {
    padding: 2rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.aftersales-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.aftersales-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--toyota-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
}

.aftersales-block h4 {
    font-weight: 700;
    color: var(--toyota-red);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* Featured image section (homepage) */
.featured-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 50px rgba(0,0,0,0.15);
}

.featured-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.featured-badge {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: var(--toyota-red);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

@media (max-width: 991.98px) {
    .featured-image img {
        height: 300px;
    }
}

.aftersales-hero {
    background: linear-gradient(135deg, rgba(235,10,30,0.95) 0%, rgba(200,8,24,0.92) 100%),
                url('../images/aftersales-service.jpg') center/cover no-repeat;
    color: #fff;
    padding: 5rem 0;
}

.aftersales-hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.aftersales-hero-text {
    flex: 1 1 45%;
}

.aftersales-hero-text h2 {
    font-weight: 800;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.aftersales-hero-text p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
}

.aftersales-hero-image {
    flex: 1 1 45%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.aftersales-hero-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.math-captcha {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.math-captcha .form-label {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

@media (max-width: 991.98px) {
    .aftersales-hero {
        padding: 3rem 0;
    }
    .aftersales-hero-content {
        flex-direction: column;
    }
    .aftersales-hero-image {
        width: 100%;
    }
    .aftersales-hero-image img {
        height: 220px;
    }
}

.page-header {
    position: relative;
    background: linear-gradient(135deg, rgba(26,26,26,0.92) 0%, rgba(26,26,26,0.7) 100%),
                url('../images/hero-bg.jpg') center/cover no-repeat;
    color: #fff;
    padding-top: 120px;
    padding-bottom: 60px;
    text-align: center;
}
.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, rgba(255,255,255,1));
    pointer-events: none;
}
.page-header h1 { color: #fff; font-weight: 800; font-size: 2.5rem; }
.page-header .breadcrumb { justify-content: center; }
.page-header .breadcrumb-item a { color: rgba(255,255,255,0.8); }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,0.6); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

@media print {
    .sidebar, .navbar, .btn, .footer-links, .social-links, .toyota-footer .row > div:not(:first-child) { display: none !important; }
    .toyota-card { box-shadow: none; border: 1px solid #ddd; }
    body { background: #fff; color: #000; }
}
