body {
    font-family: 'Open Sans', sans-serif; /* A more modern, widely used font */
    margin: 0;
    background: linear-gradient(to right, #f8f9fa, #e9ecef); /* Subtle light mode gradient */
    color: #212529; /* Darker text for better readability */
    line-height: 1.6;
}

body.dark-mode {
    background: linear-gradient(to right, #212529, #343a40); /* Dark mode gradient */
    color: #e0e0e0; /* Lighter text for dark mode */
}

.container {
    max-width: 1200px;
    margin: 30px auto; /* More vertical margin */
    padding: 30px;
    background-color: #ffffff; /* White background for light mode content */
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* Softer, more pronounced shadow */
}

body.dark-mode .container {
    background-color: #2c3e50; /* Darker background for dark mode content */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef; /* Separator line */
    position: relative; /* For positioning the toggle button */
}

body.dark-mode header {
    border-bottom-color: #495057;
}

header h1 {
    font-family: 'Montserrat', sans-serif; /* A more impactful font for headings */
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    color: #0056b3; /* A professional blue for branding */
    text-transform: uppercase; /* Modern touch */
}

body.dark-mode header h1 {
    color: #4da6ff; /* Lighter blue for dark mode */
}

header p {
    font-size: 1.3rem;
    color: #6c757d;
}

body.dark-mode header p {
    color: #adb5bd;
}

.header-image {
    width: 100%;
    max-height: 250px; /* Limit height of the banner */
    object-fit: cover; /* Ensure image covers the area without distortion */
    margin-top: 20px; /* Space from header text */
    border-radius: 8px; /* Slightly rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}



/* Filters Section */
.filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px; /* More space below filters */
    flex-wrap: wrap;
    padding: 20px;
    background-color: #f8f9fa; /* Light background for filters */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.dark-mode .filters {
    background-color: #3b4d61;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.filters input,
.filters select {
    padding: 12px 18px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 1.05rem;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #343a40;
}

body.dark-mode .filters input,
body.dark-mode .filters select {
    background-color: #495057;
    border-color: #6c757d;
    color: #e0e0e0;
}

.filters input:focus,
.filters select:focus {
    border-color: #007bff; /* Focus highlight */
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

body.dark-mode .filters input:focus,
body.dark-mode .filters select:focus {
    border-color: #8bd2ff;
    box-shadow: 0 0 0 0.2rem rgba(139, 210, 255, 0.25);
}

.filters input::placeholder {
    color: #adb5bd;
}

body.dark-mode .filters input::placeholder {
    color: #ced4da;
}

/* Property Listings */
.property-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Slightly larger cards */
    gap: 30px; /* More space between cards */
    padding-top: 20px;
}

.property-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Deeper shadow */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

body.dark-mode .property-card {
    background-color: #3b4d61;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.property-card:hover {
    transform: translateY(-8px); /* More pronounced lift effect */
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

body.dark-mode .property-card:hover {
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4);
}

.property-card img {
    width: 100%;
    height: 220px; /* Taller images */
    object-fit: cover;
    border-bottom: 1px solid #e9ecef;
}

body.dark-mode .property-card img {
    border-bottom-color: #495057;
}

.property-details {
    padding: 25px;
    flex-grow: 1;
}

.property-details h2 {
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 12px;
    color: #0056b3;
    font-family: 'Montserrat', sans-serif;
}

body.dark-mode .property-details h2 {
    color: #4da6ff;
}

.property-details p {
    margin: 8px 0;
    font-size: 1.05rem;
    color: #495057;
}

body.dark-mode .property-details p {
    color: #adb5bd;
}

.property-details p strong {
    color: #343a40;
}

body.dark-mode .property-details p strong {
    color: #e0e0e0;
}

.download-button {
    display: block; /* Make it a block element to take full width */
    width: fit-content;
    padding: 10px 15px;
    margin-top: 15px; /* Space from other details */
    background-color: #28a745; /* A success-green color */
    color: #ffffff;
    text-align: center;
    border-radius: 5px;
    text-decoration: none; /* Remove underline from link */
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none; /* Remove default button border */
    cursor: pointer; /* Indicate it's clickable */
}

.download-button:hover {
    background-color: #218838; /* Darker green on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

body.dark-mode .download-button {
    background-color: #20c997; /* Lighter green for dark mode */
}

body.dark-mode .download-button:hover {
    background-color: #17a2b8; /* A teal-ish color on hover for dark mode */
}

/* Voting Section Styles */
.voting-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

body.dark-mode .voting-section {
    border-top-color: #495057;
}

.voting-section h3 {
    font-size: 1.2rem;
    color: #343a40;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

body.dark-mode .voting-section h3 {
    color: #e0e0e0;
}

.vote-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin: 0 5px;
}

.vote-button.good-buy {
    background-color: #28a745; /* Green for good buy */
    color: #ffffff;
}

.vote-button.good-buy:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.vote-button.not-good-buy {
    background-color: #dc3545; /* Red for not good buy */
    color: #ffffff;
}

.vote-button.not-good-buy:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

body.dark-mode .vote-button.good-buy {
    background-color: #20c997;
}

body.dark-mode .vote-button.good-buy:hover {
    background-color: #1a8b6e;
}

body.dark-mode .vote-button.not-good-buy {
    background-color: #e4606d;
}

body.dark-mode .vote-button.not-good-buy:hover {
    background-color: #c23342;
}

.vote-results {
    margin-top: 15px;
    font-size: 1.05rem;
    color: #495057;
    font-weight: bold;
}

body.dark-mode .vote-results {
    color: #adb5bd;
}

/* Vote Meter Styles */
.vote-meter-container {
    margin-top: 15px;
    text-align: center;
}

.vote-meter-bar {
    width: 100%;
    background-color: #e9ecef; /* Light background for the meter bar */
    border-radius: 5px;
    height: 15px; /* Height of the meter bar */
    overflow: hidden; /* Ensures fill stays within bounds */
    margin-bottom: 5px;
}

body.dark-mode .vote-meter-bar {
    background-color: #495057;
}

.vote-meter-fill {
    height: 100%;
    background-color: #28a745; /* Green for "Good Buy" */
    width: 0%; /* Initial width, will be set by JS */
    border-radius: 5px;
    transition: width 0.5s ease-in-out; /* Smooth transition for width change */
}

body.dark-mode .vote-meter-fill {
    background-color: #20c997;
}

.vote-meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #6c757d;
}

body.dark-mode .vote-meter-labels {
    color: #adb5bd;
}

/* Responsive adjustments for filters */
@media (max-width: 768px) {
    .filters {
        flex-direction: column;
        gap: 15px;
    }

    .filters input,
    .filters select {
        width: 100%;
    }
}

/* Mode Toggle Button Styles */
.mode-toggle {
    position: absolute;
    top: 25px; /* Adjust positioning */
    right: 25px;
    background: #ffc107; /* A warm yellow for light mode toggle */
    color: #343a40;
    border: none;
    padding: 10px;
    font-size: 18px;
    border-radius: 50%;
    width: 50px; /* Slightly larger button */
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mode-toggle:hover {
    background: #e0a800; /* Darker yellow on hover */
    transform: translateY(-2px);
}

body.dark-mode .mode-toggle {
    background: #6f42c1; /* A deep purple for dark mode toggle */
    color: #ffffff;
}

body.dark-mode .mode-toggle:hover {
    background: #5a359c; /* Darker purple on hover */
}

.mode-icon {
    width: 28px; /* Larger icon */
    height: 28px;
    color: inherit;
}

.hidden {
    display: none;
}

/* Recently Transacted Prices Section Styles */
.transactions-section {
    margin-top: 60px;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

body.dark-mode .transactions-section {
    border-top-color: #495057;
}

.transactions-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    color: #0056b3;
    margin-bottom: 30px;
}

body.dark-mode .transactions-section h2 {
    color: #4da6ff;
}

.transactions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Consistent sizing with property cards */
    gap: 25px;
    justify-content: center;
    padding-bottom: 20px;
}

.transaction-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    padding: 25px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .transaction-item {
    background-color: #3b4d61;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.transaction-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

body.dark-mode .transaction-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.transaction-item h3 {
    font-size: 1.3rem;
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

body.dark-mode .transaction-item h3 {
    color: #4da6ff;
}

.transaction-item p {
    font-size: 1rem;
    color: #495057;
    margin: 6px 0;
}

body.dark-mode .transaction-item p {
    color: #adb5bd;
}

.transaction-item p strong {
    color: #343a40;
}

body.dark-mode .transaction-item p strong {
    color: #e0e0e0;
}

/* Advertisements Section Styles */
.advertisements-section {
    margin-top: 60px;
    text-align: center;
    padding: 40px 0;
    background-color: #e9ecef; /* Lighter background for ads section */
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 12px 12px; /* Rounded bottom corners for consistency */
}

body.dark-mode .advertisements-section {
    background-color: #212529; /* Darker background for ads section */
    border-top: 1px solid #495057;
}

.advertisements-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    color: #0056b3;
    margin-bottom: 30px;
}

body.dark-mode .advertisements-section h2 {
    color: #4da6ff;
}

.ads-container {
    display: flex;
    justify-content: center;
    gap: 30px; /* More space between ad slots */
    flex-wrap: wrap;
}

.ad-slot {
    background-color: #f1f3f5; /* Light grey background for ad slot */
    border: 2px dashed #adb5bd; /* More visible dashed border */
    border-radius: 10px;
    width: 336px; /* Standard ad size */
    height: 280px; /* Standard ad size */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: #6c757d;
    text-align: center;
    padding: 15px;
    box-sizing: border-box; /* Include padding in width/height */
}

body.dark-mode .ad-slot {
    background-color: #495057;
    border: 2px dashed #6c757d;
    color: #ced4da;
}

/* Feedback Section Styles */
.feedback-section {
    margin-top: 60px;
    text-align: center;
    padding: 40px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}

body.dark-mode .feedback-section {
    background-color: #2c3e50;
    border-top: 1px solid #495057;
}

.feedback-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    color: #0056b3;
    margin-bottom: 30px;
}

body.dark-mode .feedback-section h2 {
    color: #4da6ff;
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
}

body.dark-mode .feedback-form {
    background-color: #3b4d61;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.form-group label {
    display: block;
    font-size: 1.1rem;
    color: #343a40;
    margin-bottom: 8px;
    font-weight: bold;
}

body.dark-mode .form-group label {
    color: #e0e0e0;
}

.feedback-form input[type="text"],
.feedback-form input[type="email"],
.feedback-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #ffffff;
    color: #343a40;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; /* Include padding in element's total width and height */
}

body.dark-mode .feedback-form input[type="text"],
body.dark-mode .feedback-form input[type="email"],
body.dark-mode .feedback-form textarea {
    background-color: #495057;
    border-color: #6c757d;
    color: #e0e0e0;
}

.feedback-form input[type="text"]:focus,
.feedback-form input[type="email"]:focus,
.feedback-form textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.feedback-form textarea {
    resize: vertical; /* Allow vertical resizing */
}

.submit-button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.submit-button:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

body.dark-mode .submit-button {
    background-color: #4da6ff;
}

body.dark-mode .submit-button:hover {
    background-color: #2196f3;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 15% from the top and centered */
    padding: 30px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    text-align: left;
}

body.dark-mode .modal-content {
    background-color: #3b4d61;
    border-color: #2c3e50;
    color: #e0e0e0;
}

.close-button {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
}

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

body.dark-mode .close-button:hover,
body.dark-mode .close-button:focus {
    color: #eee;
}

.modal-content h2 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
}

body.dark-mode .modal-content h2 {
    color: #4da6ff;
}

.modal-content .form-group {
    margin-bottom: 15px;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #343a40;
}

body.dark-mode .modal-content label {
    color: #e0e0e0;
}

.modal-content input[type="text"],
.modal-content input[type="email"] {
    width: calc(100% - 24px); /* Account for padding */
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #ffffff;
    color: #343a40;
}

body.dark-mode .modal-content input[type="text"],
body.dark-mode .modal-content input[type="email"] {
    background-color: #495057;
    border-color: #6c757d;
    color: #e0e0e0;
}

.modal-button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.modal-button:hover {
    background-color: #0056b3;
}

body.dark-mode .modal-button {
    background-color: #4da6ff;
}

body.dark-mode .modal-button:hover {
    background-color: #2196f3;
}

.message {
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
}