/*
Theme Name: DriveWise Car Rentals
Theme URI: https://example.com/drivewise
Author: Your Name
Author URI: https://example.com
Description: A modern car rental theme with advanced search functionality and API integration.
Version: 3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: drivewise
*/

/* =========================================================
   Base Setup
========================================================= */
body {
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =========================================================
   Animations
========================================================= */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* =========================================================
   Header & Navigation
========================================================= */
.main-header,
.header-glass {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.main-nav a {
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobile-menu {
    transition: all 0.3s ease;
}

/* =========================================================
   Hero Section
========================================================= */
.hero-section {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
   top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1550355291-bbee04a92027?ixlib=rb-4.0.3&auto=format&fit=crop&w=1740&q=80') center/cover;
    opacity: 0.75;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* =========================================================
   Buttons
========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* =========================================================
   Form Elements
========================================================= */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Date/Time Pickers */
.flatpickr-calendar {
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
    background: #3b82f6;
    border-color: #3b82f6;
}

/* =========================================================
   Cards
========================================================= */
.card, .feature-card, .car-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature-card {
    padding: 2rem;
    height: 100%;
}

.car-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.car-card-content {
    padding: 1.5rem;
}

.car-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
}

/* =========================================================
   Search Form
========================================================= */
/* .search-form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    color: #1f2937;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
} */

/* Auto-complete dropdown */
.auto-complete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.auto-complete-results li {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.auto-complete-results li:last-child {
    border-bottom: none;
}

.auto-complete-results li:hover {
    background-color: #f9fafb;
}

.auto-complete-results li .font-medium { font-weight: 500; }
.auto-complete-results li .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.auto-complete-results li .text-gray-500 { color: #6b7280; }

/* =========================================================
   Car Details Page
========================================================= */
.car-details-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 3rem 0;
}

.car-details-content {
    padding: 3rem 0;
}

.car-details-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.car-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.booking-form {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-top: 2rem;
}

/* =========================================================
   Footer
========================================================= */
footer {
    margin-top: auto;
    background-color: #111827;
    color: #9ca3af;
    position: relative;
    z-index: 1;
    padding: 3rem 0 1rem;
}

.footer-widget {
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-widget ul li a {
    color: #9ca3af;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.footer-widget ul li a:hover {
    color: #3b82f6;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Newsletter form */
footer form input[type="email"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

footer form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

footer form input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #3b82f6;
    color: white;
}

/* Payment icons */
footer .w-12.h-8 {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

footer .w-12.h-8:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Country flags hover */
footer img[alt*="USA"],
footer img[alt*="UK"],
footer img[alt*="Canada"],
footer img[alt*="Australia"] {
    transition: transform 0.3s ease;
}

footer img[alt*="USA"]:hover,
footer img[alt*="UK"]:hover,
footer img[alt*="Canada"]:hover,
footer img[alt*="Australia"]:hover {
    transform: scale(1.1);
}

/* Back to top button */
#backToTop {
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   Utilities
========================================================= */
.section-padding {
    padding: 5rem 0;
}

/* =========================================================
   Responsive Adjustments
========================================================= */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .hero-section { padding: 4rem 0; }
    .search-form-container { padding: 1.5rem; }
    .car-details-image { height: 250px; }
    footer { padding-bottom: 2rem; }
}
