/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

header h1 {
    margin: 0;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

nav ul li a {
    color: #f9f9f9;
    text-decoration: none;
}

.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
}

/* Hero Section CSS */
.hero {
    background-color: #555; /* Background color for hero section */
    color: #fff; /* Text color for hero section */
    padding: 2rem 0;
    text-align: center;
}

.hero h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem; /* Adjust font size to be slightly smaller */
}

.hero p {
    font-size: 1rem; /* Adjust font size */
    margin-bottom: 1.5rem;
}

.hero button {
    background-color: #ff6600; /* Button background color */
    color: #fff; /* Button text color */
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.hero button:hover {
    background-color: #cc5200;
}

/* Listings Page CSS */
main.listings {
    display: flex;
    justify-content: center;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

#all-listings-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Align items to the start of each row */
    width: 100%;
    max-width: 1200px; /* Max width for the container */
    padding: 0; /* Remove any padding to ensure it fits within the page */
    margin: 0 auto; /* Center the container */
}

/* Styling for each listing */
.listing {
    box-sizing: border-box;
    flex: 1 1 calc(25% - 1rem); /* Ensure roughly four per row */
    max-width: calc(25% - 1rem); /* Ensure max width is also set to match */
    margin: 0.5rem; /* Adjust margin to fit within the container */
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.listing a {
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Inherit color from parent */
}

.image-wrapper {
    width: 100%;
    height: 0;
    padding-top: 75%; /* Aspect ratio 4:3 */
    position: relative;
    overflow: hidden;
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.details {
    padding: 1rem;
}

.details h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.details p {
    margin: 0.25rem 0;
    color: #666;
}

/* Individual Listing Page CSS */
.individual-listing-page .individual-listing .listing-detail {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: left; /* Align text to the left */
}

.individual-listing-page .individual-listing .listing-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
}

.individual-listing-page .individual-listing .title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center; /* Center title */
}

.individual-listing-page .individual-listing .price {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center; /* Center price */
}

.individual-listing-page .individual-listing p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6; /* Improve line spacing */
    text-align: left; /* Ensure text is aligned to the left */
}

.individual-listing-page .individual-listing .description {
    margin-top: 20px;
}

.individual-listing-page .individual-listing .location,
.individual-listing-page .individual-listing .contact-name,
.individual-listing-page .individual-listing .brokerage,
.individual-listing-page .individual-listing .phone-number,
.individual-listing-page .individual-listing .email {
    margin-top: 10px; /* Add spacing between different sections */
}

.individual-listing-page .individual-listing .back-button {
    display: block; /* Ensure button is block level */
    background-color: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    margin: 20px auto 0; /* Center button and add margin */
    max-width: 200px; /* Optional: limit button width */
}

.individual-listing-page .individual-listing .back-button:hover {
    background-color: #cc5200;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 10px;
    }

    .individual-listing-page .individual-listing .listing-detail {
        padding: 10px;
    }

    .individual-listing-page .individual-listing .title {
        font-size: 1.5rem;
    }

    .individual-listing-page .individual-listing .price {
        font-size: 1.25rem;
    }
}

/* Featured Listings CSS */
.featured-listings {
    text-align: center;
}

.featured-listings .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the featured listings */
    width: 100%;
    max-width: 1200px; /* Adjust this to control the max width */
    margin: 0 auto;
}

.featured-listings h2 {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

.featured-listing {
    box-sizing: border-box;
    flex: 1 1 calc(50% - 1rem); /* Ensure two per row */
    max-width: calc(50% - 1rem); /* Ensure max width is also set to match */
    margin: 0.5rem; /* Adjust margin to fit within the container */
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.featured-listing img {
    width: 100%;
    height: auto;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.featured-listing h2 {
    font-size: 1.25rem;
    color: #333;
    margin: 0.5rem 1rem;
}

.featured-listing p {
    font-size: 1rem;
    color: #666;
    margin: 0.25rem 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-listing {
        flex: 1 1 100%; /* Full width on smaller screens */
        max-width: 100%;
    }

    .hero h2 {
        font-size: 1.25rem; /* Smaller font size for smaller screens */
    }

    .hero p {
        font-size: 1rem; /* Smaller font size for smaller screens */
    }

    .hero button {
        font-size: 1rem; /* Adjust button font size */
        padding: 0.5rem 1rem;
    }

    .listing {
        flex: 1 1 100%; /* Full width on smaller screens */
        max-width: 100%;
    }
}

/* Authentication Page CSS */
#content_container {
    width: 80%;
    margin: 100px auto; /* Center container on page */
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
}

.form_container {
    width: 45%;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.form_header_container {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.form_header {
    font-size: 1.5rem;
    color: #333;
}

.form_content_container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form_content_inner_container {
    width: 100%;
}

input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.button_container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.button_container button {
    width: 100%;
    padding: 10px;
    background-color: #ff6600;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.button_container button:hover {
    background-color: #cc5200;
}

/* Blog Page CSS */
.blog {
    padding: 20px 0;
}

.blog-post {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: left; /* Align text to the left */
}

.blog-post h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center; /* Center title */
}

.blog-post h3, .blog-post h4 {
    font-size: 1.5rem;
    color: #333;
    margin-top: 20px;
}

.blog-post p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6; /* Improve line spacing */
}

.blog-post hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: none;
    border-top: 1px solid #ddd;
}

/* Blog Image CSS */
.blog-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto; /* Center the image and add margin */
}

/* Container adjustments for the blog */
.blog .container {
    max-width: 800px; /* Set a max-width for the blog content */
    margin: 0 auto;
}

.image-wrapper {
    width: 100%;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: auto;
}
