/* ===== CSS Variables ===== */
:root {
    --primary-color: #1e2a78;
    --primary-dark: #141c52;
    --primary-light: #3949ab;
    --secondary-color: #5c6bc0;
    --secondary-light: #9fa8da;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f8f6f3;
    --bg-white: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.3s ease;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul {
    list-style: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

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

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

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

/* ===== Header & Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
}

@media (max-width: 768px) {
    .logo-img {
        height: 40px;
    }
}

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

.nav-menu a {
    font-weight: 500;
    color: var(--text-color);
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a {
        display: block;
        padding: 1rem 0;
    }
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(rgba(30, 42, 120, 0.75), rgba(20, 28, 82, 0.85)),
                url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 70px;
}

/* Disable parallax on mobile for better performance */
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
}

.hero-content h1 {
    color: white;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-content .btn {
    margin: 0.5rem;
}

/* ===== Section Title ===== */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 1rem auto 0;
}

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

/* ===== Property Card ===== */
.property-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.property-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.property-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.875rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
}

.property-status.sold {
    background-color: #c0392b;
}

.property-status.pending {
    background-color: #e67e22;
}

.property-content {
    padding: 1.5rem;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.property-mls {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
}

.property-address {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.property-features {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.property-feature span:first-child {
    font-size: 1rem;
}

/* ===== Services Section ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-light);
}

/* ===== CTA Section ===== */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.cta h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.cta p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3, .footer h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer p, .footer a {
    color: rgba(255,255,255,0.8);
}

.footer a:hover {
    color: var(--secondary-light);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
}

.footer-logos img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    font-size: 0.875rem;
}

/* ===== Page Header ===== */
.page-header {
    background: linear-gradient(rgba(30, 42, 120, 0.85), rgba(20, 28, 82, 0.9)),
                url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    background-attachment: fixed;
    padding: 8rem 0 4rem;
    text-align: center;
    color: white;
}

@media (max-width: 768px) {
    .page-header {
        background-attachment: scroll;
    }
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
}

/* ===== Filters ===== */
.filters {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.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;
    background-color: white;
}

/* ===== Property Detail Page ===== */
.property-detail {
    padding-top: 90px;
}

.property-gallery {
    height: 400px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.property-info {
    padding: 2rem 0;
}

.property-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .property-info-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.property-main h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.property-main .property-address {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.property-main .property-price {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

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

.property-description h3 {
    margin-bottom: 1rem;
}

.property-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.spec-value {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Contact Sidebar */
.contact-sidebar {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 90px;
}

.contact-sidebar h3 {
    margin-bottom: 1rem;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Honeypot for spam protection */
.ohnohoney {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* ===== Contact Page ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.contact-info-item h4 {
    margin-bottom: 0.25rem;
}

.contact-info-item p,
.contact-info-item a {
    color: var(--text-light);
}

/* ===== About Page ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-text h2 {
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* ===== Utilities ===== */
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ===== Loading State ===== */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* ===== No Results ===== */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* ===== Success/Error Messages ===== */
.message {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
