/* CSS Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #2C3E50;
    --color-secondary: #8B7355;
    --color-accent: #C9A962;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg: #FDFBF7;
    --color-bg-alt: #F5F1EB;
    --color-white: #FFFFFF;
    --color-border: #E5DED3;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    color: var(--color-accent);
}

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

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h4 { font-size: 1.2rem; }

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

.section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
}

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

.btn-primary:hover {
    background: #b8983f;
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--color-white);
    padding: 20px;
    max-width: 800px;
}

.hero-tag {
    display: inline-block;
    padding: 8px 20px;
    background: var(--color-accent);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border-radius: 2px;
}

.hero h1 {
    color: var(--color-white);
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-style: italic;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 35px;
}

.price-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}

.price-amount {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
    color: var(--color-white);
    opacity: 0.7;
}

.hero-scroll span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--color-white);
    border-bottom: 2px solid var(--color-white);
    transform: rotate(45deg);
    margin: 0 auto;
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(10px) rotate(45deg); }
}

/* Navigation */
.main-nav {
    position: sticky;
    top: 0;
    background: var(--color-white);
    box-shadow: var(--shadow-soft);
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    overflow-x: auto;
}

.nav-link {
    padding: 20px 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--color-secondary);
    border-bottom-color: var(--color-accent);
}

@media (max-width: 768px) {
    .nav-container {
        justify-content: flex-start;
        gap: 5px;
    }
    
    .nav-link {
        padding: 15px 15px;
        font-size: 0.8rem;
    }
}

/* Section Titles */
.section-title {
    margin-bottom: 20px;
}

.section-title.centered {
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 50px;
}

.lead-text {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

/* Overview Section */
.overview {
    background: var(--color-white);
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    margin-bottom: 60px;
}

.overview-main p {
    margin-bottom: 20px;
}

.overview-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-content: start;
}

.stat-card {
    background: var(--color-bg);
    padding: 25px 20px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    margin-top: 8px;
}

@media (max-width: 900px) {
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .overview-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .overview-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* MLS Info */
.mls-info {
    background: var(--color-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.mls-info h3 {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-accent);
}

.mls-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

.mls-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    margin-bottom: 5px;
}

.mls-value {
    font-weight: 600;
    color: var(--color-primary);
}

@media (max-width: 900px) {
    .mls-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .mls-info {
        padding: 25px;
    }
    
    .mls-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Gallery Section */
.gallery {
    background: var(--color-bg-alt);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-soft);
}

.gallery-item-large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 500px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item-large {
        grid-column: span 1;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 3rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition);
    z-index: 1001;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-white);
    font-size: 3rem;
    padding: 20px 25px;
    cursor: pointer;
    opacity: 0.7;
    transition: all var(--transition);
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-white);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Features Section */
.features {
    background: var(--color-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-category {
    background: var(--color-bg);
    padding: 35px 30px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.feature-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-category h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-accent);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-secondary);
    font-weight: bold;
}

@media (max-width: 1000px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Neighborhood Section */
.neighborhood {
    background: var(--color-bg-alt);
}

.neighborhood-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.neighborhood-text .lead-text {
    margin-bottom: 15px;
}

.neighborhood-text > p {
    margin-bottom: 30px;
}

.neighborhood-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.highlight-item h4 {
    color: var(--color-secondary);
    margin-bottom: 8px;
}

.highlight-item p {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.neighborhood-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

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

@media (max-width: 900px) {
    .neighborhood-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .neighborhood-image {
        order: -1;
        max-height: 400px;
    }
}

@media (max-width: 600px) {
    .neighborhood-highlights {
        grid-template-columns: 1fr;
    }
}

/* Contact Section */
.contact {
    background: var(--color-primary);
    color: var(--color-white);
}

.contact .section-title {
    color: var(--color-white);
}

.contact .lead-text {
    color: rgba(255, 255, 255, 0.85);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.property-summary {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.property-summary h3 {
    color: var(--color-accent);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.property-summary ul {
    list-style: none;
}

.property-summary li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.property-summary li:last-child {
    border-bottom: none;
}

.property-summary strong {
    color: var(--color-white);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--color-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.contact-form h3 {
    margin-bottom: 25px;
    color: var(--color-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-secondary);
}

.form-disclaimer {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-align: center;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-form-wrapper {
        padding: 25px;
    }
}

/* Footer */
.footer {
    background: #1a252f;
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    max-width: 700px;
    margin: 0 auto;
}

.footer-property {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-white);
    margin-bottom: 15px;
}

.footer-disclaimer {
    font-size: 0.85rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.5;
}

/* Utility Classes */
.centered {
    text-align: center;
}

/* Animation on scroll */
@media (prefers-reduced-motion: no-preference) {
    .stat-card,
    .feature-category,
    .gallery-item {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }
    
    .stat-card:nth-child(1) { animation-delay: 0.1s; }
    .stat-card:nth-child(2) { animation-delay: 0.2s; }
    .stat-card:nth-child(3) { animation-delay: 0.3s; }
    .stat-card:nth-child(4) { animation-delay: 0.4s; }
    
    .feature-category:nth-child(1) { animation-delay: 0.1s; }
    .feature-category:nth-child(2) { animation-delay: 0.2s; }
    .feature-category:nth-child(3) { animation-delay: 0.3s; }
    .feature-category:nth-child(4) { animation-delay: 0.4s; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}