:root {
    --zillow-primary: #006aff;
    --zillow-primary-hover: #0054cc;
    --zillow-text-dark: #2a2a33;
    --zillow-text-light: #54545a;
    --zillow-border: #d1d1d5;
    --zillow-bg-light: #f8f8f9;
    --white: #ffffff;
    --luxury-gold: #c5a880;
    --font-stack: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    color: var(--zillow-text-dark);
    background-color: var(--white);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    border-bottom: 1px solid var(--zillow-border);
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: var(--zillow-text-dark);
}

.nav-links a:hover {
    color: var(--zillow-primary);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--zillow-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-accent {
    color: var(--luxury-gold);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.btn-signin {
    background-color: transparent;
    color: var(--zillow-text-dark);
}

.btn-signin:hover {
    color: var(--zillow-primary);
}

.btn-primary {
    background-color: var(--zillow-primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--zillow-primary-hover);
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 0 1rem;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Search Bar */
.search-container {
    background: var(--white);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-input {
    flex-grow: 1;
    border: none;
    padding: 12px 16px;
    font-size: 1.1rem;
    border-radius: 4px;
    outline: none;
    color: var(--zillow-text-dark);
}

.search-btn {
    background-color: var(--zillow-primary);
    color: var(--white);
    border: none;
    padding: 0 24px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
}

.search-btn:hover {
    background-color: var(--zillow-primary-hover);
}

.search-btn i {
    margin-right: 8px;
}

/* Services */
.services-section {
    padding: 4rem 2rem;
    background-color: var(--zillow-bg-light);
    text-align: center;
}

.services-section h2 {
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: var(--zillow-text-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--zillow-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--zillow-primary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--zillow-text-light);
    margin-bottom: 1.5rem;
}

.service-card .btn-outline {
    background: transparent;
    color: var(--zillow-primary);
    border: 1px solid var(--zillow-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

.service-card .btn-outline:hover {
    background: var(--zillow-bg-light);
}

/* Footer */
footer {
    background-color: #2a2a33;
    color: var(--white);
    padding: 4rem 2rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: left;
    margin-bottom: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: #a4a4a8;
}

.footer-column ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #4a4a52;
    padding-top: 2rem;
    color: #a4a4a8;
    font-size: 0.9rem;
}

/* Listings Page specific styles */
.listings-header {
    background-color: var(--white);
    padding: 2rem;
    border-bottom: 1px solid var(--zillow-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.filter-container select {
    padding: 10px 16px;
    font-size: 1rem;
    border: 1px solid var(--zillow-border);
    border-radius: 4px;
    background-color: var(--white);
    outline: none;
    cursor: pointer;
    color: var(--zillow-text-dark);
    min-width: 200px;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--zillow-bg-light);
}

.property-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid var(--zillow-border);
    transition: box-shadow 0.3s ease;
    cursor: pointer;
}

.property-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.property-img {
    height: 220px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.property-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--white);
    color: var(--zillow-text-dark);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.property-info {
    padding: 1.2rem;
}

.property-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--zillow-text-dark);
    margin-bottom: 0.5rem;
}

.property-details {
    display: flex;
    gap: 1rem;
    font-size: 1rem;
    color: var(--zillow-text-dark);
    margin-bottom: 0.5rem;
}

.property-details span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.property-address {
    color: var(--zillow-text-light);
    font-size: 0.95rem;
}

.property-agency {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--zillow-border);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--luxury-gold);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--zillow-text-light);
    font-size: 1.2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #006aff;
}

#modal-body {
    display: flex;
    flex-direction: column;
}

.modal-gallery {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    scrollbar-width: thin;
}

.modal-gallery img {
    height: 400px;
    border-radius: 8px;
    object-fit: cover;
}

.modal-info {
    padding: 40px;
}

.modal-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2a2a33;
}

.modal-details {
    font-size: 1.2rem;
    color: #54545a;
    margin: 10px 0;
}

.modal-address {
    font-size: 1.1rem;
    color: #2a2a33;
}

.modal-description {
    line-height: 1.8;
    color: #444;
    font-size: 1.05rem;
    white-space: pre-line;
}

.modal-description h3 {
    margin-bottom: 15px;
    color: #2a2a33;
}

/* Mobile Responsive Adjustments */
@media (max-width: 1024px) {
    .navbar {
        padding: 1rem;
        flex-wrap: wrap;
    }
    .nav-links {
        display: flex;
        gap: 1rem;
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        padding-top: 0.5rem;
        border-top: 1px solid #eee;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }

    .nav-links {
        gap: 0.8rem;
        font-size: 0.9rem;
    }

    .auth-buttons {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

    .hero {
        height: 500px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .search-container {
        flex-direction: column;
        gap: 10px;
        background: transparent;
        box-shadow: none;
    }

    .search-input {
        width: 100%;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    .search-btn {
        width: 100%;
        padding: 12px;
        border-radius: 8px;
    }

    .listings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .filter-container {
        width: 100%;
    }

    .filter-container select {
        width: 100%;
    }

    .listings-grid {
        padding: 1rem;
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }

    .mobile-cta {
        display: block !important;
    }
}
