/* Simple style for Airbnb-like platform clone */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    /* Use the imported Inter font for a more modern look */
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

header {
    background-color: #fff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff385c;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    align-items: center;
}

nav li {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: background-color 0.2s ease;
}

nav li:hover {
    background-color: #f7f7f7;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
}

/* Hero section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    /* Use a local image for hero background to avoid external dependencies */
    background-image: url('images/brussels.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 1rem;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Updated search bar for hero */
.hero .search-bar {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.hero .search-bar input,
.hero .search-bar select {
    border: none;
    padding: 0.5rem 0.75rem;
    flex: 1;
    min-width: 120px;
    font-size: 1rem;
    outline: none;
}

.hero .search-bar input::placeholder {
    color: #888;
}

.hero .search-bar button {
    background-color: #ff385c;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.hero .search-bar button:hover {
    background-color: #e61e44;
}

/* Search section */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    /* allow absolute children like the date overlay to align relative to the search bar */
    position: relative;
}

.search-bar input, .search-bar select {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.search-bar button {
    background-color: #ff385c;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.search-bar button:hover {
    background-color: #e61e44;
}

/* Date overlay for search bar (Airbnb style) */
.search-bar {
    /* Position relative so the date overlay can be positioned over it */
    position: relative;
}

/* Container for the date overlay; hidden by default */
.date-overlay {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    z-index: 100;
    display: none;
}

/* Card inside the overlay containing calendar, tabs and buttons */
.date-overlay-card {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 1rem;
    width: 100%;
}

/* Close (X) button for the overlay */
/* Close (X) button for the overlay
 * Position it in the top‑right of the overlay card and increase the size
 * to make it easier to click. Use a darker colour for better contrast. */
.date-overlay-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 1.75rem;
    color: #555;
    cursor: pointer;
    z-index: 2;
}

/* Tab buttons container */
.date-overlay-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Individual tab buttons */
.date-overlay-tabs button {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #f7f7f7;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.15s ease;
}

/* Active tab styling */
.date-overlay-tabs button.active {
    background: #fff;
    border-color: #ddd;
    font-weight: 500;
}

/* Container for quick range buttons */
.date-overlay-quick {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

/* Quick range buttons */
.date-overlay-quick button {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    color: #333;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Hover effect for quick buttons */
.date-overlay-quick button:hover {
    background-color: #f7f7f7;
}

/* Active quick button */
.date-overlay-quick button.active {
    background-color: #ff385c;
    color: #fff;
    border-color: #ff385c;
}

/* --------------------------------------------------------------------
 * Customise the inline flatpickr calendar within the search bar overlay
 * to more closely match Airbnb's style. Adjust typography, sizing and
 * colour treatments for the months, weekday headings and date cells.
 */

/* Make month names slightly larger and bolder, and capitalise the first
 * letter (French locale defaults to lowercase). */
.date-overlay .flatpickr-months .flatpickr-month .flatpickr-current-month {
    font-size: 1rem;
    font-weight: 600;
}
.date-overlay .flatpickr-months .flatpickr-month .cur-month {
    text-transform: capitalize;
}

/* Style the weekday headings: use uppercase single letters, smaller font
 * and light colour. We override the locale via script to use L M M J V S D.
 */
.date-overlay .flatpickr-weekdays {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #777;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}

/* Reduce the spacing around the calendar days and make each cell a
 * consistent square. */
.date-overlay .flatpickr-day {
    font-size: 0.875rem;
    width: 40px;
    height: 40px;
    line-height: 40px;
    margin: 2px;
    border-radius: 50%;
}

/* Default day style: grey text for days in current month, lighter for
 * days outside the current month (handled by flatpickr). */
.date-overlay .flatpickr-day {
    color: #333;
}
.date-overlay .flatpickr-day.flatpickr-disabled,
.date-overlay .flatpickr-day.prevMonthDay,
.date-overlay .flatpickr-day.nextMonthDay {
    color: #ccc;
    background: transparent;
    border-color: transparent;
}

/* Highlight the selected start and end of a range with dark circles. */
.date-overlay .flatpickr-day.startRange,
.date-overlay .flatpickr-day.endRange,
.date-overlay .flatpickr-day.selected.startRange,
.date-overlay .flatpickr-day.selected.endRange {
    background-color: #000;
    color: #fff;
}

/* Use a light grey background for days that fall inside the selected range. */
.date-overlay .flatpickr-day.inRange {
    background-color: #f2f2f2;
    color: #333;
    border-radius: 0;
}

/* Ensure today’s date has no border when not selected. */
.date-overlay .flatpickr-day.today:not(.selected) {
    border-color: transparent;
}

/* Listings grid */
.listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.listing-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.listing-card:hover {
    transform: translateY(-4px);
}

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

.listing-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.listing-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.listing-details p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.25rem;
}

.listing-details .price {
    font-weight: bold;
    margin-top: 0.5rem;
}

/* Star rating */
.star-rating {
    margin-top: auto;
    color: #ff385c;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

/* Property page */
.property-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.property-images {
    flex: 1 1 50%;
    min-width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 12px;
}

.property-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-info {
    flex: 1 1 45%;
    min-width: 250px;
}

.property-info h2 {
    margin-bottom: 0.5rem;
}

.property-info p {
    margin-bottom: 0.75rem;
    color: #555;
}

.booking-form {
    background-color: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.booking-form h3 {
    margin-bottom: 1rem;
}

.booking-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.booking-form input, .booking-form select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.booking-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: #ff385c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.booking-form button:hover {
    background-color: #e61e44;
}

/* Footer */
/*
 * Footer styling
 * Use a dark background with light text for better contrast.  
 * The footer includes copyright information and a set of policy links.
 */
footer {
    background-color: #141414;
    color: #f1f1f1;
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 0;
}

footer p {
    margin: 0;
}

footer .footer-links {
    margin-top: 0.5rem;
}

footer .footer-links a {
    color: #f1f1f1;
    margin: 0 0.75rem;
    text-decoration: none;
    font-size: 0.85rem;
}

footer .footer-links a:hover {
    text-decoration: underline;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    /* Position context for the close button */
    position: relative;
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content label {
    display: block;
    margin-top: 0.75rem;
    font-weight: bold;
}

.modal-content input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.modal-content button {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background-color: #ff385c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-content button:hover {
    background-color: #e61e44;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    /* Larger and darker close button for better visibility */
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* Review section on property page */
.reviews {
    margin-top: 2rem;
}

.reviews h3 {
    margin-bottom: 1rem;
}

.review-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.review-item .review-author {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.review-item .review-rating {
    color: #ff385c;
    margin-bottom: 0.25rem;
}

.review-form {
    margin-top: 1rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.review-form label {
    display: block;
    margin-top: 0.5rem;
    font-weight: bold;
}

.review-form input,
.review-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.review-form button {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #ff385c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.review-form button:hover {
    background-color: #e61e44;
}

@media (max-width: 768px) {
    .property-header {
        flex-direction: column;
    }
}

/*
 * Call‑to‑action section encouraging users to become hosts
 * This section appears just above the footer on several pages.
 */
.become-host-cta {
    background: linear-gradient(135deg, #ff385c, #ff8a1a);
    color: #fff;
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 3rem;
    border-radius: 0.5rem;
}

.become-host-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.become-host-cta p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

.become-host-cta .cta-button {
    display: inline-block;
    background-color: #ffffff;
    color: #ff385c;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.become-host-cta .cta-button:hover {
    background-color: #f0f0f0;
    color: #e61e44;
}

/* Date overlay styling for the search bar */
.date-overlay {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 999;
    display: none;
}

.date-overlay-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.date-overlay-tabs {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
}

.date-overlay-tabs .tab {
    background: #f7f7f7 !important;
    border: 1px solid #ddd !important;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    margin-right: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555 !important;
    transition: background 0.2s, color 0.2s;
}

.date-overlay-tabs .tab.active {
    /* Active tab: white background with subtle border, similar to Airbnb */
    background: #ffffff !important;
    border-color: #ddd !important;
    color: #222 !important;
}

.date-overlay-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.date-overlay-quick button {
    /* Override button styling inherited from the search bar */
    background: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    color: #333 !important;
    cursor: pointer;
    transition: background 0.2s;
}

.date-overlay-quick button:hover {
    background: #eee;
}

/* Contact host button styling on the property page */
.contact-host-button {
    display: inline-block;
    padding: 0.6rem 1rem;
    background-color: #ff385c;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}
.contact-host-button:hover {
    background-color: #e61e44;
}