/* Modern Homepage Styles */
.hero-section {
    min-height: 60vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
    padding-top: 70px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(251, 146, 60, 0.1) 0%,
        rgba(59, 130, 246, 0.1) 50%,
        rgba(147, 51, 234, 0.1) 100%);
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(251, 146, 60, 0.2);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(251, 146, 60, 0.25);
    padding: 2rem;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.search-form {
    max-width: 100%;
    transition: all 0.3s ease;
}

/* Sticky search container styles */
.search-container.sticky {
    position: fixed;
    top: 90px; /* Height of the navbar */
    left: 0;
    right: 0;
    max-width: 1200px;
    margin: 0 auto;
    transform: translateY(0);
    z-index: 49; /* Below navbar (z-index: 50) */
    border-radius: 0 0 24px 24px;
    padding: 1rem 2rem;
    animation: slideDown 0.3s ease-in-out;
}

.search-container.sticky .search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.search-container.sticky .grid {
    margin-bottom: 0 !important;
}

.search-container.sticky .search-btn {
    margin-top: 0;
    margin-left: auto;
    width: auto;
}

@media (max-width: 1023px) {
    .search-container.sticky {
        position: static; /* No sticky behavior on mobile */
        animation: none;
    }

    .search-container {
        padding: 1.5rem; /* Smaller padding on mobile */
    }

    .search-btn {
        padding: 0.875rem 1.5rem; /* Smaller button on mobile */
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dark .search-container {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-primary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

.search-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.search-field label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-field label i {
    color: var(--orange-500);
    font-size: 0.8rem;
}

.search-field input,
.search-field select {
    padding: 0.875rem;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
    transform: translateY(-2px);
}

.search-btn {
    background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(251, 146, 60, 0.4);
}

.features-section {
    padding: 6rem 0;
    background: var(--bg-primary);
    position: relative;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--orange-500);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin: 0 auto 1.5rem;
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotateY(360deg);
    box-shadow: 0 10px 30px rgba(251, 146, 60, 0.4);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Featured Vehicles Section Dark Mode */
.dark .py-12.bg-white {
    background-color: var(--bg-primary);
}

.dark .text-gray-900 {
    color: var(--text-primary);
}

.dark .text-gray-600 {
    color: var(--text-secondary);
}

.dark .bg-white.dark\:bg-gray-800 {
    background-color: var(--bg-secondary);
}

.dark .border-gray-100.dark\:border-gray-700 {
    border-color: var(--border-primary);
}

.dark .shadow-elegant {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.dark .hover\:shadow-xl:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
}

.dark .bg-white\/90.dark\:bg-gray-800\/90 {
    background-color: rgba(30, 41, 59, 0.9);
}

.dark .text-gray-600.dark\:text-gray-300 {
    color: var(--text-secondary);
}

.dark .border-gray-200.dark\:border-gray-700 {
    border-color: var(--border-primary);
}

.dark .text-primary-600.dark\:text-primary-400 {
    color: #f97316;
}

.dark .hover\:bg-gray-50.dark\:hover\:bg-gray-700:hover {
    background-color: var(--bg-tertiary);
}

/* Brands Section Dark Mode */
.dark .py-12.bg-gray-50 {
    background-color: var(--bg-secondary);
}

.dark .border-gray-200 {
    border-color: var(--border-primary);
}

.dark .hover\:border-blue-600:hover {
    border-color: #3b82f6;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
    }

    .search-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .features-section {
        padding: 3rem 0;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }
}
