/* General Style Settings */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    color: #2c3e50; /* Dark Blue Tone */
}

a {
    text-decoration: none;
    color: #3498db; /* Blue Link Color */
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header and Navbar */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50; /* Dark Blue Tone */
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: #555;
    font-weight: 500;
}

.nav-links a:hover {
    color: #3498db;
    text-decoration: none;
}

/* Hero Section */
.hero {
    background: url('../images/hero-bg.jpg') no-repeat center center/cover; /* Updated path */
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
    position: relative; /* For overlay */
}

.hero::before { /* Light dimming effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    color: #ffffff;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar input[type="text"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    font-size: 1em;
}

.search-bar button {
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #2980b9;
}

/* Featured Listings */
.featured-listings, .categories {
    padding: 60px 0;
}

.featured-listings h2, .categories h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
}

.listings-grid, .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 30px;
}

.listing-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.listing-card:hover {
    transform: translateY(-5px);
}

.listing-card img {
    width: 100%;
    height: 200px; /* Fixed height */
    object-fit: cover; /* Fill while preserving aspect ratio */
}

.listing-card h3 {
    font-size: 1.3em;
    margin: 15px 15px 5px 15px;
}

.listing-card .location,
.listing-card .price {
    margin: 0 15px 10px 15px;
    color: #555;
}

.listing-card .price {
    font-weight: bold;
    color: #e74c3c; /* Price color */
    font-size: 1.1em;
}

.listing-card .btn {
    display: inline-block;
    background-color: #2ecc71; /* Green Button */
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    margin: 10px 15px 15px 15px; /* Leave space below */
    transition: background-color 0.3s ease;
    margin-top: auto; /* Pushes the button to the bottom of the card */
}

.listing-card .btn:hover {
    background-color: #27ae60;
    text-decoration: none;
}

/* Categories */
.category-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.category-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-card a {
    font-size: 1.3em;
    color: #333;
    font-weight: bold;
}

.category-card a:hover {
    color: #3498db;
    text-decoration: none;
}

/* Footer */
footer {
    background-color: #2c3e50; /* Dark Blue Tone */
    color: #ecf0f1; /* Light Gray Text */
    padding: 30px 0;
    margin-top: 50px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Stack vertically on small screens */
}

footer p {
    margin: 0;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* Stack vertically on small screens */
}

footer ul li {
    margin-left: 15px;
    margin-top: 10px; /* Space on small screens */
}

footer ul li a {
    color: #ecf0f1;
}

footer ul li a:hover {
    text-decoration: underline;
}

/* Responsive Design Settings */

/* Tablet and Small Desktop */
@media (max-width: 992px) {
    .container {
        width: 95%;
    }
    .listings-grid, .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .hero h1 {
        font-size: 2.4em;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-links {
        margin-top: 15px;
        flex-direction: column;
        width: 100%;
    }
    .nav-links li {
        margin: 10px 0;
        text-align: center; /* Center mobile menu */
        width: 100%;
        background-color: #f8f9fa; /* Light background */
        padding: 8px 0;
        border-radius: 4px;
    }
    .nav-links li:first-child {
        margin-top: 0;
    }
    .hero {
        padding: 60px 0;
    }
    .hero h1 {
        font-size: 2em;
    }
    .hero p {
        font-size: 1em;
    }
    .search-bar {
        flex-direction: column;
    }
    .search-bar input[type="text"],
    .search-bar button {
        border-radius: 5px; /* Adjust corners */
        margin-bottom: 10px;
    }
    .search-bar button {
        width: 100%;
    }
    .listings-grid, .category-grid {
        grid-template-columns: 1fr; /* Single column */
    }
    footer .container {
        flex-direction: column;
        text-align: center;
    }
    footer ul {
        margin-top: 15px;
        justify-content: center;
    }
    footer ul li {
        margin: 5px 10px;
    }
}

/* Smaller Mobile Devices */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8em;
    }
    .listing-card h3 {
        font-size: 1.1em;
    }
}

/* --- Mobile Navigation --- */

.mobile-nav-toggle {
    display: none; /* Hide hamburger by default on larger screens */
    background: none;
    border: none;
    font-size: 1.5rem; /* Adjust size as needed */
    color: #333; /* Match your theme */
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001; /* Ensure it's above other elements */
}

/* Media Query for mobile view (e.g., below 768px) */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide normal links */
        position: absolute; /* Position it absolutely */
        top: 60px; /* Adjust based on header height */
        left: 0;
        right: 0;
        background-color: #fff; /* Or your desired background */
        flex-direction: column; /* Stack links vertically */
        padding: 1rem 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 1000; /* Ensure it's above content below */
        text-align: center; /* Center links */
    }

    .nav-links.active {
        display: flex; /* Show menu when active class is added */
    }

    .nav-links li {
        margin: 0; /* Remove horizontal margins */
        padding: 0.8rem 0; /* Add vertical spacing */
        width: 100%; /* Make list items full width */
        border-bottom: 1px solid #eee; /* Optional separator */
    }

    .nav-links li:last-child {
        border-bottom: none; /* Remove border from last item */
    }

    .nav-links a {
        display: block; /* Make links take full width of li */
        width: 100%;
    }

    .mobile-nav-toggle {
        display: block; /* Show hamburger button */
        order: 1; /* Optional: move it to the right if needed via flex order */
        margin-left: auto; /* Push it to the right */
    }

    /* Optional: Style for close icon when menu is active */
    .mobile-nav-toggle.active i::before {
         content: "\\f00d"; /* Font Awesome close icon (X) */
         /* Ensure Font Awesome is linked for this to work */
    }
}

/* Optional: Prevent scrolling when mobile menu is open */
body.mobile-nav-active {
    overflow: hidden;
} 