/* Global Resets & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa; /* Lighter background */
    color: #343a40;
    line-height: 1.6;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Header & Navigation */
header {
    background-color: #212529; /* Dark background */
    color: #fff;
    padding: 1rem 0;
    border-bottom: 3px solid #007bff; /* Accent color border */
    position: sticky; /* Keep header visible */
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

header nav ul {
    display: flex;
}

header nav ul li {
    margin-left: 1.5rem;
}

header nav ul li a {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #007bff;
    text-decoration: none;
}

/* Hero Section */
#hero {
    background-color: #343a40; /* Slightly lighter dark */
    color: #fff;
    text-align: center;
    padding: 4rem 1.5rem;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-content p {
    font-size: 1.2rem;
    color: #adb5bd;
    margin-bottom: 2rem;
}

/* Main Content Area */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

section {
    background-color: #fff;
    margin-bottom: 2.5rem;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

section h2 {
    color: #212529;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
}

/* Car Listings */
#cars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0; /* Remove padding if section has it */
    background: none; /* Remove section background if desired */
    box-shadow: none; /* Remove section shadow if desired */
    border-radius: 0;
}

.car-listing {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push button to bottom */
}

.car-listing:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.car-listing img {
    width: 100%;
    height: 200px; /* Fixed height for images */
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
    background-color: #e9ecef;
}

.car-listing h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #007bff;
    font-size: 1.4rem;
}

.car-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1; /* Allow description to take space */
}

.car-price {
    font-size: 1.1rem;
    color: #343a40;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.car-price strong {
    font-size: 1.3rem;
    font-weight: bold;
    color: #28a745; /* Green price highlight */
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Rental Periods Section */
#rental-periods ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5em; /* Indent list */
}

#rental-periods li {
    margin-bottom: 0.7rem;
    position: relative;
}

#rental-periods li::before {
    content: "✓"; /* Simpler checkmark */
    color: #28a745;
    position: absolute;
    left: -1.5em;
    font-weight: bold;
}

#rental-periods p {
    font-style: italic;
    color: #6c757d;
    margin-top: 1rem;
    text-align: center;
}

/* Contact Section */
#contact {
    text-align: center;
}

#contact p {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: #212529;
    color: #adb5bd;
    padding-top: 3rem;
    padding-bottom: 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* Allow columns to wrap on smaller screens */
    gap: 2rem;
}

.footer-column {
    flex: 1;
    min-width: 200px; /* Minimum width before wrapping */
}

.footer-column h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid #495057;
    padding-bottom: 0.5rem;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a,
.footer-column p {
    color: #adb5bd;
    font-size: 0.95rem;
}

.footer-column ul li a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #495057;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Modal Styles - Keep existing modal styles, maybe minor tweaks */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 650px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation-name: animatetop;
    animation-duration: 0.4s
}

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h3 {
    margin-top: 0;
    color: #007bff;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

.modal-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #343a40;
    font-size: 1.2rem;
}

.modal-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}
.modal-content li {
    margin-bottom: 0.6rem;
}

.modal-content p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

.modal-content .btn {
    margin-top: 1rem;
}

/* Rental Selection Section */
#rental-selection {
    background-color: #e9ecef; /* Light grey background */
    padding: 2.5rem 1.5rem;
    margin-bottom: 2.5rem; /* Keep consistent spacing */
    border-radius: 0; /* Full width look */
    text-align: center;
    box-shadow: none;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

#rental-selection h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

#rental-selection p {
    margin-bottom: 2rem;
    color: #6c757d;
    font-size: 1.1rem;
}

.rental-form {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap */
    justify-content: center;
    align-items: flex-end; /* Align items to bottom for button */
    gap: 1.5rem;
    max-width: 900px; /* Limit form width */
    margin: 0 auto; /* Center the form */
}

.form-group {
    display: flex;
    flex-direction: column; /* Stack label and input */
    align-items: flex-start; /* Align labels to the left */
    flex: 1; /* Allow groups to grow */
    min-width: 180px; /* Minimum width before wrapping */
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    background-color: #fff;
}

/* Align the button group properly */
.form-group:has(button) {
    flex-grow: 0; /* Don't let button group grow excessively */
}

.rental-form button.btn {
    width: 100%; /* Make button full width of its group */
    padding: 0.75rem 1.5rem; /* Match input height */
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .header-container,
    main,
    .footer-container {
        padding: 0 1rem;
    }

    #hero h1 {
        font-size: 2.4rem;
    }
    #hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    .logo {
        margin-bottom: 0.5rem;
    }
    header nav ul {
        justify-content: center;
        margin-top: 0.5rem;
    }
    header nav ul li {
        margin: 0 0.8rem;
    }

    #hero {
        padding: 3rem 1rem;
    }

    #cars {
        grid-template-columns: 1fr; /* Stack cars */
    }

    section {
        padding: 1.5rem;
    }
    section h2 {
        font-size: 1.8rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-column h4 {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0.5rem;
    }
    .footer-column {
        min-width: auto;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    /* Rental selection form responsiveness */
    .rental-form {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .form-group {
        min-width: 0;
        align-items: stretch;
    }
    .form-group label {
        align-self: flex-start;
    }
} 