/* Base Styles */
:root {
    --gold: #D4AF37;
    --dark: #252525;
    --light: #f8f8f8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

/* Header Styles */
header {
    background-color: var(--dark);
    color: var(--light);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo span {
    color: var(--gold);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--light);
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--gold);
}

/* Breadcrumb */
.breadcrumb {
    background-color: white;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumb ul {
    display: flex;
    list-style: none;
}

.breadcrumb ul li {
    font-size: 0.9rem;
    color: #777;
}

.breadcrumb ul li:not(:last-child):after {
    content: "/";
    margin: 0 0.5rem;
    color: #ccc;
}

.breadcrumb ul li a {
    color: #777;
    text-decoration: none;
}

.breadcrumb ul li a:hover {
    color: var(--gold);
}

/* Listings Page Layout */
.listings-page {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.listings-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar Styles */
.listings-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-widget {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.filter-title {
    background-color: var(--dark);
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    margin: 0;
}

.filter-content {
}

.filter-group {
    margin-bottom: 1.2rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range input {
    flex: 1;
}

.price-range span {
    color: #777;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 8px;
}

.filter-button {
    background-color: var(--gold);
    color: var(--dark);
    border: none;
    padding: 0.8rem 0;
    width: 100%;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.filter-reset {
    background-color: transparent;
    color: #777;
    border: 1px solid #ddd;
    padding: 0.8rem 0;
    width: 100%;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-button:hover {
    background-color: #c9a227;
}

.filter-reset:hover {
    background-color: #eee;
}

.featured-agent {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.featured-agent h3 {
    background-color: var(--dark);
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    margin: 0;
}

.featured-agent-content {
    padding: 1.5rem;
    text-align: center;
}

.featured-agent-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.featured-agent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-agent-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.featured-agent-content p {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.featured-agent-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.featured-agent-contact a {
    color: var(--gold);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.featured-agent-contact a:hover {
    color: var(--dark);
}

/* Listings Main Content */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 15px;
}

.listings-count h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.listings-count span {
    color: #777;
    font-size: 0.9rem;
}

.listings-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.listings-sort label {
    font-size: 0.9rem;
    color: #555;
}

.listings-sort select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.listings-view {
    display: flex;
    gap: 5px;
}

.view-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-button.active {
    background-color: var(--gold);
    color: white;
    border-color: var(--gold);
}

.view-button:hover:not(.active) {
    background-color: #f5f5f5;
}

/* Listings Grid View */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 2rem;
}

.listing-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.listing-card:hover {
    transform: translateY(-5px);
}

.listing-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.listing-card:hover .listing-image img {
    transform: scale(1.05);
}

.listing-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--gold);
    color: var(--dark);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 2;
}

.listing-badge.featured {
    background-color: var(--dark);
    color: var(--gold);
}

.listing-save {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2;
}

.listing-save:hover {
    background-color: var(--gold);
    color: white;
}

.listing-content {
    padding: 1.2rem;
}

.listing-price {
    color: var(--gold);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.listing-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-location {
    display: flex;
    align-items: center;
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-features {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    font-size: 0.9rem;
}

.listing-feature {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Listings List View */
.listings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 2rem;
}

.listings-list .listing-card {
    display: grid;
    grid-template-columns: 300px 1fr;
}

.listings-list .listing-image {
    height: 200px;
}

.listings-list .listing-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.listings-list .listing-title {
    font-size: 1.2rem;
    white-space: normal;
    margin-bottom: 0.8rem;
}

.listings-list .listing-location {
    margin-bottom: 1rem;
}

.listings-list .listing-description {
    margin-bottom: 1rem;
    color: #555;
    font-size: 0.9rem;
    display: block;
}

.listings-list .listing-features {
    margin-top: auto;
    padding-top: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.pagination-prev,
.pagination-next {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.pagination-numbers a,
.pagination-numbers span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.pagination-numbers a {
    background-color: white;
    color: var(--dark);
    border: 1px solid #ddd;
    text-decoration: none;
}

.pagination-numbers a.active {
    background-color: var(--gold);
    color: white;
    border-color: var(--gold);
}

.pagination-numbers a:hover:not(.active) {
    background-color: #f5f5f5;
}

.pagination-prev:hover,
.pagination-next:hover {
    background-color: #f5f5f5;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 3rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-col h3:after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--gold);
    margin-top: 10px;
}

.footer-col ul {
    list-style: none;
}

/* Mobile Filter Button & Modal */
.mobile-filter-button {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--gold);
    color: var(--dark);
    border: none;
    border-radius: 30px;
    padding: 12px 25px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 99;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-filter-button:hover {
    background-color: #c9a227;
}

.filter-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.filter-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background-color: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 1000;
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--dark);
    color: white;
    position: sticky;
    top: 0;
}

.filter-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.filter-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.filter-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.filter-modal-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background-color: #f8f8f8;
    position: sticky;
    bottom: 0;
}

.filter-modal-actions button {
    flex: 1;
    padding: 12px 0;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-modal-apply {
    background-color: var(--gold);
    color: var(--dark);
    border: none;
}

.filter-modal-reset {
    background-color: transparent;
    color: #777;
    border: 1px solid #ddd;
}

.filter-modal-apply:hover {
    background-color: #c9a227;
}

.filter-modal-reset:hover {
    background-color: #eee;
}

/* Media query for mobile filter */
@media (max-width: 900px) {
    .mobile-filter-button {
        display: block;
    }
    
    .listings-sidebar .filter-widget {
        display: none;
    }
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: #777;
    max-width: 1200px;
    margin: 2rem auto 0;
}

/* Media Queries */
@media (max-width: 1100px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .listings-container {
        grid-template-columns: 1fr;
    }
    
    .listings-sidebar {
        order: 2;
    }
    
    .listings-main {
        order: 1;
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        background-color: var(--dark);
        width: 100%;
        height: calc(100vh - 70px);
        transition: 0.3s;
        padding: 2rem;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 1rem 0;
    }
    
    .listings-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .listings-sort, 
    .listings-view {
        margin-top: 10px;
    }
    
    .listings-list .listing-card {
        grid-template-columns: 1fr;
    }
    
    .listings-list .listing-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .property-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}