/* Import Google Fonts for Hindi text */
@import url('https://fonts.googleapis.com/css2?family=Tiro+Devanagari+Hindi&display=swap');

/* Global Box-Sizing for consistent sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* General Styles */
body {
    /* Apply Tiro Devanagari Hindi as the primary font, with fallbacks */
    font-family: 'Tiro Devanagari Hindi', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0; /* Removed horizontal padding from body to allow full-width header background */
    background-color: #F2F3ED; /* Updated: Light cream background */
    color: #444; /* Darker grey for general text */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Reverted container padding to 20px horizontal for internal content spacing */
}

/* Header - Made slimmer and added stronger shadow */
header {
    background-color: #e3e8c8; /* Specified hex color for header background */
    border-bottom: 1px solid #eee; /* Lighter border */
    padding: 0; /* No vertical padding on header itself */
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); /* Stronger shadow below header */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px; /* Constrain header content to align with other main sections */
    margin: 0 auto; /* Center header content */
    padding: 5px 30px; /* 30px horizontal padding for content within the header, and 5px vertical */
}

/* Base style for h1 in logo, though it's now replaced by an image */
.logo h1 {
    margin: 0;
    font-size: 28px;
    color: #333; /* Dark color for BhavanX.com */
    font-weight: normal;
}

/* Style for the brand logo image in the header */
.header-content .logo .brand-logo {
    height: 120px; /* Current height */
    width: auto; /* Maintain aspect ratio */
    max-width: 600px; /* Current max-width */
    display: block; /* Ensure it behaves as a block element */
    margin: 0; /* Removed any default or inherited margins around the image */
}

/* Language selection and Login button styles combined */
.language-options {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between language links and login button */
}

.lang-selector,
.login-button {
    text-decoration: none;
    color: #333; /* Darker text for better contrast */
    font-size: 15px;
    padding: 10px 20px; /* Increased padding for a more substantial button feel */
    border-radius: 8px; /* More rounded corners */
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease, background-image 0.3s ease;
    border: none; /* Removed border */
    /* New: Gradient derived from header background for harmony */
    background-image: linear-gradient(to bottom right, #eff4d9, #e3e8c8);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1); /* Softer, slightly more pronounced shadow */
    white-space: nowrap; /* Prevent text from wrapping */
    font-weight: 600; /* Bolder font-weight for better readability */
    cursor: pointer; /* Indicate interactivity */
}

.lang-selector:hover,
.login-button:hover {
    /* New: Darker gradient on hover, still harmonious with header */
    background-image: linear-gradient(to bottom right, #e3e8c8, #d7dcbb);
    color: #111;
    box-shadow: 0 5px 12px rgba(0,0,0,0.2); /* More pronounced shadow on hover */
    transform: translateY(-2px); /* More noticeable lift effect on hover */
}

.lang-selector.active {
    /* New: Even darker gradient for active state */
    background-image: linear-gradient(to bottom right, #d7dcbb, #cdd1a6);
    color: #333;
    font-weight: bold;
    border: none; /* Ensure no border overrides */
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2); /* Inner shadow for pressed effect */
    transform: none; /* Remove transform if active */
}

.lang-separator {
    color: #a0a0a0; /* Slightly darker separator for visibility */
    font-size: 15px;
}


/* Search Bar - Highlighted Box with stronger pop and alignment */
.search-bar {
    background-color: #ffffff; /* White background for the box */
    padding: 30px; /* Internal padding for content inside the search bar */
    text-align: center;
    border-radius: 12px; /* More prominent rounded corners */
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); /* Stronger, more visible shadow for a distinct pop effect */
    max-width: 1200px; /* Aligns with the overall content width of .container */
    margin: 30px auto; /* Centered with increased top/bottom margin. This auto margin creates the 3cm+ gap. */
    border: none; /* Removed subtle border, shadow provides separation */
}

.search-bar h2 {
    margin-top: 0;
    margin-bottom: 30px; /* More space below heading */
    font-size: 26px;
    color: #333;
    font-weight: normal;
}

.search-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end; /* Ensures button aligns with the bottom of the input fields */
}

.input-group {
    text-align: left;
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    color: #777;
    font-size: 14px;
}

.input-group input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 150px;
    font-size: 15px;
    color: #555;
    height: 42px;
    line-height: normal;
}

/* Search Button color - Brown - Modernized (now matching header) */
.search-button {
    /* Updated: Gradient using header-like colors */
    background-image: linear-gradient(to bottom right, #e3e8c8, #d7dcbb); /* Uses header colors */
    color: #333; /* Changed text color to dark gray for contrast */
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-image 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    height: 42px;
    margin-top: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.search-button:hover {
    /* Updated: Darker gradient for hover state */
    background-image: linear-gradient(to bottom right, #d7dcbb, #cdd1a6); /* Darker shades of header colors */
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
}

.search-icon {
    width: 18px;
    height: 18px;
    /* Removed filter: invert(100%); as icon should now be dark to match text */
    filter: none; /* Reset filter so original icon colors show, or manually set to dark if needed */
}


/* Property Listings */
.property-listings {
    padding: 20px 0 40px 0;
}

.property-listings .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 25px;
}

.property-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    text-align: left;
    display: flex;
    flex-direction: column;
    position: relative; /* Essential for absolute positioning of child button */
    padding-bottom: 60px; /* Increased padding-bottom to make space for the absolutely positioned button */
    transition: transform 0.2s ease-in-out;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Property Name Styling - Enhanced for visibility and elegance */
.property-card h3 {
    /* Updated: Background color as a band below the image */
    background-color: #E1E5CC; /* Earthy tone (light green/beige) */
    color: #493D36; /* Dark brown color for property names */
    padding: 10px 15px; /* Add vertical padding to create the band effect */
    margin: 0; /* Remove default margins to ensure it's a tight band */
    font-size: 24px; /* Increased font size for prominence */
    font-weight: 700; /* Bolder for strong emphasis */
    font-family: 'Segoe UI', Arial, sans-serif; /* Clean sans-serif font */
    letter-spacing: -0.5px; /* Slightly tighter letter spacing */
    width: 100%; /* Ensure it spans full width of the card */
    display: block; /* Ensure it behaves as a block to take background */
    box-sizing: border-box; /* Include padding in width calculation */
}


.property-card .address {
    margin: 0 15px 10px 15px;
    color: #777;
    font-size: 13px;
    padding-top: 10px; /* Add padding to push address below the H3 band */
}

/* Property Description Styling - Standardized height */
.property-card .description {
    margin: 0 15px 15px 15px;
    font-size: 14px;
    line-height: 1.5;
    flex-grow: 1;
    color: #555;
    /* Enforce a maximum height for consistency */
    max-height: 4.5em; /* Approximately 3 lines of text (1.5em line-height * 3 lines) */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
}

/* Centering the details (beds, baths, icons) */
.property-card .details {
    display: flex;
    justify-content: center; /* Centered horizontally */
    gap: 20px;
    margin: 0 15px 15px 15px;
    font-size: 14px;
    color: #666;
    align-items: center;
}

.property-card .details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-card .details img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* "View Details" button - fixed to bottom, full width - Color updated to black */
.view-details-button {
    position: absolute; /* Positioned absolutely within the .property-card */
    bottom: 0; /* Aligned to the bottom edge of the card */
    left: 0; /* Aligned to the left edge of the card */
    right: 0; /* Aligned to the right edge of the card */
    width: 100%; /* Ensures it spans the full width */
    padding: 15px 20px; /* Increased vertical padding, kept horizontal */
    text-align: center; /* Center the text inside the button */

    /* Reverted to sage green gradient for background */
    background-image: linear-gradient(to bottom right, #D7E0AE, #C2CC97); /* Light sage green to muted sage green */
    color: black; /* Changed text color to black */
    border: none;
    border-radius: 0 0 8px 8px; /* Rounded only on bottom corners to match card */
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background-image 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.view-details-button:hover {
    /* Reverted to darker sage green gradient for hover state */
    background-image: linear-gradient(to bottom right, #C2CC97, #AAB686); /* Muted sage green to darker sage green */
    transform: translateY(-2px); /* Lift effect on hover */
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* Footer */
footer {
    background-color: #333;
    color: #bbb;
    padding: 25px 0;
    text-align: center;
    font-size: 13px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-content p {
    margin: 0;
}

.contact-info {
    margin-top: 10px;
    /* Added horizontal line above contact info */
    border-top: 1px solid #777; /* A subtle gray line */
    padding-top: 15px; /* Space between line and text */
    width: 100%; /* Ensure line spans full width of content */
    /* Removed flex properties from contact-info itself to only apply to sub-paragraph */
    /* It now serves as a container for stacked paragraphs */
}

/* Style for the row containing phone and email */
.contact-details-row {
    display: flex; /* Make it a flex container */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 10px; /* Space between phone and email links */
    margin: 0; /* Remove default paragraph margin */
    padding: 0; /* Remove default paragraph padding */
}

/* Styling for contact icons - Adjusted size */
.contact-icon {
    width: 16px; /* Adjusted icon size to 16px */
    height: 16px; /* Adjusted icon size to 16px */
    vertical-align: middle; /* Align icon with text */
    margin-right: 5px; /* Space between icon and text */
    filter: invert(80%); /* Make icons visible on dark background */
}

.contact-info a {
    color: #bbb;
    text-decoration: none;
    display: flex; /* Make links flex containers for icon and text */
    align-items: center; /* Vertically align icon and text within link */
    white-space: nowrap; /* Prevent breaking phone/email into multiple lines */
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-separator {
    color: #bbb; /* Color for the separator between phone and email */
    margin: 0 5px; /* Space around the separator */
}

/* Floating WhatsApp Button - Corrected position and size */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    left: auto; /* Explicitly set left to auto to ensure it stays on the right */
    background-color: #25d366; /* WhatsApp green */
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.whatsapp-float:hover {
    background-color: #1DA851; /* Darker green on hover */
    transform: scale(1.12);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.whatsapp-float .whatsapp-icon {
    width: 32px; /* Ensure icon maintains its size */
    height: 32px; /* Ensure icon maintains its size */
    object-fit: contain;
}


/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0 15px; /* Adjust body padding for smaller screens */
    }
    .search-form {
        flex-direction: column;
        align-items: stretch; /* Stretch items to fill width */
        gap: 15px; /* Consistent vertical gap */
    }

    .input-group {
        width: 100%; /* Make input groups take full width */
        margin-bottom: 0;
    }

    .input-group input {
        width: calc(100% - 2px);
    }

    .search-button {
        width: 100%;
        justify-content: center;
        margin-top: 0;
    }

    .property-listings .grid {
        grid-template-columns: 1fr;
    }

    /* Responsive adjustments for WhatsApp float */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
    .header-content .logo .brand-logo { /* Adjust for smaller screens */
        height: 60px;
        max-width: 300px;
    }

    .contact-details-row {
        /* Removed flex-direction: column; here to keep them horizontal */
        gap: 5px; /* Reduce gap when wrapped */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    .logo h1 {
        font-size: 24px;
    }

    .search-bar h2 {
        font-size: 20px;
    }
    .search-bar {
        padding: 30px 15px;
        margin: 20px auto;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .header-content .logo .brand-logo { /* Further adjust for very small screens */
        height: 50px;
        max-width: 250px;
    }
}
