/*
Theme Name: DATIMMO Theme
Theme URI: #
Author: Your Name
Author URI: #
Description: A custom WordPress theme for DATIMMO, inspired by Zillow.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: datimmo
*/

/* --- General Body & Typography --- */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Montserrat:wght@400;600;700&display=swap');

body {
    font-family: 'Lato', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1; /* Pushes the footer to the bottom */
    padding: 20px; /* Adjust as needed */
}

/* --- Header Styling --- */
.site-header {
    background-color: #fff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.site-branding .site-title {
    margin: 0;
}

.site-branding .site-title a {
    text-decoration: none;
    color: #333;
    font-size: 28px;
    font-weight: bold;
}

.main-navigation .main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-navigation .main-menu li {
    margin-left: 30px;
}

.main-navigation .main-menu a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    transition: color 0.3s ease;
}

.main-navigation .main-menu a:hover {
    color: #007bff; /* Example hover color */
}

/* --- Hero Section (Homepage Only) --- */
.hero-section {
    background: url('https://datimmo.fr/wp-content/uploads/2025/07/Screenshot-2025-07-08-at-21.13.58.png') no-repeat center center; /* Replace with a relevant image */
    background-size: cover;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px; /* Adjust as needed */
    position: relative; /* For overlay */
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
}

.hero-content {
    position: relative; /* Bring content above overlay */
    z-index: 1;
    max-width: 800px;
    width: 100%;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.search-bar-container {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.search-bar-container input[type="text"] {
    flex-grow: 1;
    padding: 15px 20px;
    border: none;
    font-size: 18px;
    outline: none;
}

.search-bar-container button {
    background-color: #007bff; /* Zillow-like blue */
    color: #fff;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.search-bar-container button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.search-icon {
    margin-left: 5px; /* Adjust spacing for icon if needed */
}

/* --- Estimator Page Specific Styles --- */
.estimator-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.estimator-page .property-address {
    font-size: 36px;
    color: #007bff;
    text-align: center;
    margin-bottom: 40px;
}

.estimator-layout {
    display: flex;
    /* flex-wrap: wrap; */ /* Allows columns to wrap on smaller screens */
    gap: 40px; /* Space between columns */
}

.left-column,
.right-column {
    flex: 1; /* Makes columns take equal space */
    min-width: 300px; /* Minimum width before wrapping */
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.left-column {
    flex-basis: 40%; /* Left column takes slightly less space */
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 400px;
}

.right-column {
    flex-basis: 55%; /* Right column takes more space */
}

.google-map-section h2,
.price-trend-section h2,
.estimation-summary h2,
.yearly-data-section h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.property-map {
    width: 100%;
    max-width: 600px; /* Limit map width */
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.api-key-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    text-align: center;
}

.chart-container {
    background-color: #f0f0f0;
    padding: 30px;
    border-radius: 4px;
    text-align: center;
    color: #666;
    min-height: 250px; /* Placeholder height */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estimation Summary */
.estimation-summary .price-m2-display {
    text-align: center;
    margin-bottom: 30px;
}

.estimation-summary .big-price {
    font-size: 36px;
    font-weight: bold;
    color: #007bff;
    margin: 10px 0;
}

.estimation-summary h3 {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.surface-estimation .form-group {
    margin-bottom: 20px;
}

.surface-estimation label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

.surface-estimation .surface-input {
    width: calc(100% - 22px); /* Account for padding */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.surface-estimation .calculated-value {
    font-size: 18px;
    font-weight: bold;
    color: #28a745; /* Green for estimation */
    margin-top: 10px;
}

/* Yearly Data Section */
.yearly-data-section .year-block {
    background-color: #f7f7f7;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 25px;
}

.yearly-data-section .year-block h3 {
    font-size: 20px;
    color: #007bff;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    background-color: #e6f2ff;
    padding: 10px;
    border-radius: 4px;
}

.median-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns for Maison and Appartement */
    gap: 20px;
}

.median-data-grid .data-item {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 4px;
    background-color: #fff;
}

.median-data-grid .data-item h4 {
    font-size: 18px;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 8px;
}

.median-data-grid .data-item p {
    margin: 5px 0;
    font-size: 15px;
}

.median-data-grid .data-item strong {
    color: #007bff;
}

/* --- Footer Styling --- */
.site-footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 50px; /* Space above footer */
}

.site-info p {
    margin: 0;
    font-size: 14px;
}

/* --- Basic WordPress Specifics (Screen Reader Text, etc.) --- */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    word-wrap: normal !important;
    border: 0;
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        padding: 15px 20px;
    }

    .main-navigation .main-menu {
        flex-direction: column;
        align-items: center;
        margin-top: 15px;
    }

    .main-navigation .main-menu li {
        margin: 5px 0;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .search-bar-container {
        flex-direction: column;
    }

    .search-bar-container input[type="text"],
    .search-bar-container button {
        width: 100%;
        border-radius: 0;
    }
    .search-bar-container button {
        margin-top: 10px;
        border-radius: 8px; /* Give button rounded corners on its own */
    }

    .estimator-layout {
        flex-direction: column;
        gap: 30px;
    }

    .left-column,
    .right-column {
        flex-basis: auto; /* Allow them to take full width */
    }

    .estimator-page .property-address {
        font-size: 28px;
    }

    .estimation-summary .big-price {
        font-size: 28px;
    }

    .median-data-grid {
        grid-template-columns: 1fr; /* Stack Maison and Appartement vertically */
    }
}

@media (max-width: 480px) {
    .site-content {
        padding: 10px;
    }

    .site-branding .site-title a {
        font-size: 24px;
    }

    .hero-content h1 {
        font-size: 24px;
    }
}
/* Styles for the autocomplete results container */
.autocomplete-results {
    position: absolute; /* Position it relative to its parent (like .search-bar-container if it's positioned relative) */
    z-index: 100; /* Ensure it appears above other content */
    width: calc(100% - 2px); /* Match the width of the input, minus any borders if applicable */
    max-height: 250px; /* Limit height and make it scrollable */
    overflow-y: auto; /* Add scrollbar if content exceeds max-height */
    background-color: #fff; /* White background */
    border: 1px solid #ddd; /* Light border */
    border-top: none; /* No top border if it directly abuts the input */
    border-radius: 0 0 8px 8px; /* Rounded bottom corners */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Soft shadow */
    list-style: none; /* Remove default list styling */
    padding: 0;
    margin-top: -1px; /* Overlap slightly with the input border to make it seamless */
    top: 55px;
    /* display: none; */ /* Hide by default, show with JavaScript when results are available */
}

/* Styles for the unordered list inside the results container */
.autocomplete-results ul {
    list-style: none; /* Ensure no bullet points */
    padding: 0;
    margin: 0;
}

/* Styles for individual autocomplete items */
.autocomplete-results .autocomplete-item {
    padding: 12px 15px; /* Ample padding for clickability */
    cursor: pointer; /* Indicate it's clickable */
    color: #333; /* Dark text color */
    border-bottom: 1px solid #eee; /* Light separator between items */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.autocomplete-results .autocomplete-item:last-child {
    border-bottom: none; /* No border for the last item */
}

.autocomplete-results .autocomplete-item:hover,
.autocomplete-results .autocomplete-item.selected { /* 'selected' class for keyboard navigation */
    background-color: #f0f0f0; /* Light gray background on hover/selection */
    color: #000; /* Darker text on hover/selection */
}

/* Add this to your existing input if the autocomplete-results are absolutely positioned
   relative to the search bar container */
.search-bar-container {
    position: relative; /* This is crucial for .autocomplete-results to position correctly */
    /* height: auto; */
    overflow: visible;
}

/* A class that JavaScript would toggle to show/hide results */
.autocomplete-results.show {
    display: block;
}