/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-gray: #f5f6fa;
    --border-color: #dcdde1;
    --hover-transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Parallax Background */
.parallax-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 800vh; /* Make it taller than viewport */
    z-index: -1;
    background: 
        linear-gradient(135deg, rgba(100, 181, 246, 0.15) 25%, transparent 25%) -50px 0,
        linear-gradient(225deg, rgba(30, 136, 229, 0.15) 25%, transparent 25%) -50px 0,
        linear-gradient(315deg, rgba(21, 101, 192, 0.15) 25%, transparent 25%),
        linear-gradient(45deg, rgba(13, 71, 161, 0.15) 25%, transparent 25%);
    background-size: 100px 100px;
    background-color: #f8faff; /* Cool light blue-gray background */
    transform-origin: center top;
    will-change: transform;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: transparent;
    position: relative;
    min-height: 100vh;
}

main {
    position: relative;
    z-index: 1;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo i {
    margin-right: 0.5rem;
}

.nav-right a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-right i {
    margin-right: 0.5rem;
}

/* Search Section */
.search-section {
    background-color: rgba(245, 246, 250, 0.9);
    backdrop-filter: blur(5px);
    padding: 2rem;
    position: relative;
    z-index: 1001;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    display: flex;
    gap: 1rem;
}

.search-box input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-box button {
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1002;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-suggestions div {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-suggestions div:hover {
    background-color: var(--light-gray);
}

.search-suggestions div.slide-right {
    animation: suggestionSlideRight 0.3s ease-out forwards;
}

@keyframes suggestionSlideRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Filters Section */
.filters-section {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 1rem 2rem;
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.filter-container select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

/* Carousel Section */
.carousel-section {
    padding: 2rem 0;
    background-color: transparent;
    overflow: hidden;
    opacity: 1;
    max-height: 1000px;
    transition: opacity 0.3s ease-out, max-height 0.5s ease-out;
    width: 100%;
}

.carousel-section h2 {
    width: 95%; /* Changed from max-width to width */
    margin: 0 auto 1.5rem;
    padding: 0 2rem;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.carousel-container {
    width: 95%; /* Changed from max-width to width */
    margin: 0 auto;
    position: relative;
    padding: 0 1rem;
}

.carousel {
    display: flex;
    gap: 1rem;
    scroll-behavior: smooth;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar */
.carousel::-webkit-scrollbar {
    display: none;
}

/* Carousel Card Styles */
.carousel .car-card {
    scroll-snap-align: start;
    min-width: calc(100% - 2rem); /* Mobile: 1 card */
    transform: scale(1);
    transition: all 0.3s ease;
}

.carousel .car-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Carousel Navigation */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: white;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.carousel-button:hover {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.carousel-button.prev {
    left: 0;
}

.carousel-button.next {
    right: 0;
}

.carousel-button i {
    font-size: 1.2rem;
}

/* Auto-scroll progress bar */
.carousel-progress {
    position: absolute;
    bottom: -10px;
    left: 2rem;
    right: 2rem;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.carousel-progress-bar {
    width: 0;
    height: 100%;
    background-color: var(--secondary-color);
    transition: width 0.2s ease;
}

/* Responsive Design - Enhanced for Wide Screens */
@media (max-width: 639px) {
    .carousel .car-card {
        min-width: calc(100% - 1rem); /* Single card for mobile */
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .carousel .car-card {
        min-width: calc(50% - 1rem); /* 2 cards for tablets */
    }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    .carousel-container,
    .carousel-section h2 {
        width: 90%;
    }
    .carousel .car-card {
        min-width: calc(33.333% - 1rem); /* 3 cards for smaller desktop */
    }
}

@media (min-width: 1440px) and (max-width: 1919px) {
    .carousel-container,
    .carousel-section h2 {
        width: 95%;
    }
    .carousel .car-card {
        min-width: calc(25% - 1rem); /* 4 cards for desktop */
    }
}

@media (min-width: 1920px) and (max-width: 2559px) {
    .carousel-container,
    .carousel-section h2 {
        width: 98%;
    }
    .carousel .car-card {
        min-width: calc(16% - 1rem); /* 5 cards for 21:9/21:10 screens */
    }
}

@media (min-width: 2560px) {
    .carousel-container,
    .carousel-section h2 {
        width: 100%;
    }
    .carousel .car-card {
        min-width: calc(12% - 1rem); /* 6 cards for ultra-wide screens */
    }
}

/* Grid Section */
.grid-section {
    padding: 2rem;
    background-color: transparent;
    position: relative;
    z-index: 2;
}

.grid-section h2 {
    max-width: 1200px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.car-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

/* Car Card */
.car-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 2;
}

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

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

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

.car-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.car-card p {
    margin-bottom: 0.5rem;
    color: #666;
}

.car-card .price {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.car-card button {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.car-card button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Reservation Page */
.reservation-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.car-details {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.car-details img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.car-info-text h2 {
    margin-bottom: 1rem;
}

.car-info-text p {
    margin-bottom: 0.5rem;
}

.reservation-form {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.validation-message {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-top: 0.3rem;
    display: block;
}

.total-price {
    margin: 2rem 0;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: 4px;
}

.form-buttons {
    display: flex;
    gap: 1rem;
}

.form-buttons button {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

#submitButton {
    background-color: var(--secondary-color);
    color: white;
}

#submitButton:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

#cancelButton {
    background-color: var(--accent-color);
    color: white;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reservation-container {
        grid-template-columns: 1fr;
    }

    .car-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .carousel-button {
        display: none;
    }

    .carousel {
        overflow-x: auto;
    }
}

/* Parallax Scroll Effect */
@media (min-width: 768px) {
    body::before {
        animation: parallaxScroll 1s infinite linear paused;
    }
    
    @keyframes parallaxScroll {
        0% {
            transform: translateY(0);
        }
        100% {
            transform: translateY(-100px);
        }
    }
}

/* Button Animations */
.search-box button,
.car-card button,
#submitButton,
#cancelButton,
.carousel-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.search-box button::before,
.car-card button::before,
#submitButton::before,
#cancelButton::before,
.carousel-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.search-box button:hover,
.car-card button:hover:not(:disabled),
#submitButton:hover:not(:disabled),
#cancelButton:hover,
.carousel-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.search-box button:hover::before,
.car-card button:hover:not(:disabled)::before,
#submitButton:hover:not(:disabled)::before,
#cancelButton:hover::before,
.carousel-button:hover::before {
    transform: translateX(100%);
}

.search-box button:active,
.car-card button:active:not(:disabled),
#submitButton:active:not(:disabled),
#cancelButton:active,
.carousel-button:active {
    transform: translateY(1px);
}

/* Click Animation */
@keyframes slideRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.button-clicked {
    animation: slideRight 0.3s ease-in-out;
}

/* Search Box Button */
.search-box button {
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Car Card Button */
.car-card button {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.car-card button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
} 