/* Modern Real Estate Website Theme */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.logo .subtitle {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Page Header */
.page-header-section {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header-section h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-gray);
    font-size: 1.125rem;
}

/* Filters */
.filters-section {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.btn-filter {
    padding: 0.625rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-filter:hover {
    background: var(--primary-dark);
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.listing-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.listing-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.listing-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.listing-card:hover .listing-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    background: var(--bg-light);
}

.listing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.listing-content {
    padding: 1.5rem;
}

.listing-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.listing-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.listing-location svg {
    width: 16px;
    height: 16px;
}

.listing-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.detail-item {
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    border-radius: 4px;
}

.listing-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Listing Single Page */
.listing-single-page {
    padding: 2rem 0;
}

.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.listing-detail {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.listing-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.listing-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.listing-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
}

.price-highlight {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.listing-gallery {
    position: relative;
}

.main-gallery-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: var(--bg-light);
}

.main-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    background: var(--bg-white);
}

.thumb {
    width: 100px;
    height: 100px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumb.active {
    border-color: var(--primary-color);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.listing-main-content {
    min-width: 0;
}

.listing-excerpt {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.listing-description {
    margin-bottom: 2rem;
}

.listing-description h2,
.listing-description h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.listing-features {
    margin-top: 2rem;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    list-style: none;
    margin-top: 1rem;
}

.features-list li {
    padding: 0.5rem;
    background: var(--bg-light);
    border-radius: 4px;
    position: relative;
    padding-left: 1.5rem;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0.5rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.listing-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card,
.contact-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.info-card h3,
.contact-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item dt {
    font-weight: 500;
    color: var(--text-gray);
}

.info-item dd {
    font-weight: 600;
    color: var(--text-dark);
}

.price-item .price-value {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.btn-whatsapp {
    display: block;
    width: 100%;
    padding: 0.875rem;
    background: #25d366;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background 0.2s;
    margin-top: 1rem;
}

.btn-whatsapp:hover {
    background: #20ba5a;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.blog-excerpt {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-meta {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.blog-single-page {
    padding: 2rem 0;
}

.blog-detail {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.blog-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.blog-featured-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-excerpt {
    font-size: 1.25rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-style: italic;
}

.blog-content {
    line-height: 1.8;
    color: var(--text-dark);
}

.blog-content h2,
.blog-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.blog-content p {
    margin-bottom: 1.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-link {
    padding: 0.625rem 1.25rem;
    background: var(--bg-white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background 0.2s;
}

.pagination-link:hover {
    background: var(--bg-light);
}

.pagination-info {
    color: var(--text-gray);
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
}

/* Error Page */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-primary {
    background: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .listings-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .listing-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .page-header-section h1 {
        font-size: 2rem;
    }
    
    .listing-header h1 {
        font-size: 1.5rem;
    }
    
    .blog-header h1 {
        font-size: 1.75rem;
    }
}

