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

:root {
    /* Professional Real Estate Colors */
    --primary-navy: #1a365d;
    --secondary-gold: #d4af37;
    --accent-green: #2d5f3f;
    --dedham-red: #8b2332;
    --light-gray: #f7fafc;
    --medium-gray: #718096;
    --dark-gray: #2d3748;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

body {
    font-family: 'Playfair Display', 'Georgia', serif;
    line-height: 1.6;
    color: var(--dark-gray);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

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

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--secondary-gold);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

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

.logo h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 0;
}

.tagline {
    font-size: 0.9rem;
    color: #7f8c8d;
}

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

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-gold);
    border-bottom: 2px solid var(--secondary-gold);
    padding-bottom: 2px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary-navy);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--accent-green) 100%);
    color: var(--white);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--white);
    transform: skewY(-2deg);
    transform-origin: left;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md);
}

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

.btn-primary:hover {
    background: var(--primary-navy);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 3px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-navy);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Page Headers */
.page-header {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--accent-green) 100%);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
}

/* Dedham Highlights Section */
.dedham-highlights {
    padding: 4rem 0;
    background: var(--light-gray);
}

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

.highlight-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s;
}

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

.highlight-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.highlight-card h3 {
    padding: 1rem 1.5rem 0.5rem;
    color: var(--primary-navy);
}

.highlight-card p {
    padding: 0 1.5rem 1.5rem;
    color: var(--medium-gray);
}

.market-stats {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 3rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.market-stats h3 {
    color: var(--primary-navy);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--medium-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Property Cards */
.featured,
.listings {
    padding: 4rem 0;
}

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

.property-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.property-image {
    position: relative;
    height: 200px;
    background: #f0f0f0;
}

.image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.property-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.property-details {
    padding: 1.5rem;
}

.property-details h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.price {
    font-size: 1.5rem;
    color: #e74c3c;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.location {
    color: #7f8c8d;
    font-style: italic;
}

/* Services */
.services {
    background: #f8f9fa;
    padding: 4rem 0;
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.service-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

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

.member-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.role {
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 1rem;
}

.member-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.member-stats span {
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid #e74c3c;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Property Listings Page */
.property-listing {
    display: flex;
    gap: 2rem;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.property-image-large {
    flex: 0 0 300px;
    height: 200px;
    position: relative;
}

.property-info {
    flex: 1;
}

.property-features {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.property-features span {
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
}

.listing-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Filters */
.filters {
    background: #f8f9fa;
    padding: 2rem 0;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

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

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.filter-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Case Studies */
.case-study-embed {
    margin: 3rem 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.embed-container {
    background: #f8f9fa;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.embed-container iframe {
    width: 100%;
    border: none;
}

.case-study-details {
    padding: 2rem;
}

.case-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.case-stats span {
    font-weight: 600;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

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

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.radio-group,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Contact Cards */
.contact-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.contact-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.contact-item {
    margin-bottom: 0.5rem;
}

.hours-list {
    display: grid;
    gap: 0.5rem;
}

.hours-item {
    display: flex;
    justify-content: space-between;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.social-link:hover {
    background: #e74c3c;
    color: white;
}

/* Map */
.map-container {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    margin: 2rem 0;
}

.map-placeholder {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn.active,
.page-btn:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

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

    .nav-menu li {
        padding: 0.5rem 2rem;
    }

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

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .property-grid,
    .services-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .property-listing {
        flex-direction: column;
    }

    .property-image-large {
        flex: none;
        width: 100%;
    }
}