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

:root {
    --primary-color: #d4a574;
    --primary-dark: #b8894f;
    --secondary-color: #2c3e50;
    --accent-color: #e67e22;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    /* Enable hardware acceleration for smoother scrolling */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

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

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

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

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

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

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

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

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95) 0%, rgba(184, 137, 79, 0.85) 100%),
                url('/images/2023-06-04_completehome.webp') center/cover no-repeat;
    background-attachment: fixed;
    color: var(--bg-white);
    text-align: center;
    padding: 4rem 2rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

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

/* ===========================
   Section Styles
   =========================== */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.subsection-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

/* ===========================
   Services Section
   =========================== */
.services {
    background: var(--bg-light);
}

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

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    content-visibility: auto;
    contain-intrinsic-size: 280px 220px;
}

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

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
}

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

.service-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* ===========================
   Portfolio Section
   =========================== */
.portfolio {
    background:
        radial-gradient(circle at top right, rgba(212, 165, 116, 0.14), transparent 32%),
        linear-gradient(180deg, #fefcf9 0%, #ffffff 100%);
}

.featured-projects {
    margin-bottom: 4rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.4rem;
    margin-bottom: 3rem;
}

.portfolio-grid.featured {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(44, 62, 80, 0.08);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 45px rgba(44, 62, 80, 0.09);
    transition: all 0.3s ease;
    /* Hardware acceleration for smooth animations */
    will-change: transform, opacity;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    content-visibility: auto;
    contain-intrinsic-size: 320px 260px;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #d9ddd8;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    /* Hardware acceleration for smooth zoom */
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(15, 24, 34, 0.92) 0%, rgba(20, 34, 45, 0.48) 52%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(-4px);
}

.portfolio-info {
    color: var(--bg-white);
}

.portfolio-info h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.portfolio-category {
    display: inline-block;
    background: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.portfolio-header-card {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.8rem 2rem;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(44, 62, 80, 0.96), rgba(24, 39, 53, 0.96)),
        radial-gradient(circle at top right, rgba(212, 165, 116, 0.26), transparent 32%);
    box-shadow: 0 28px 55px rgba(44, 62, 80, 0.12);
}

.portfolio-header-card .section-title,
.portfolio-header-card .eyebrow,
.portfolio-header-card .featured-showcase-copy {
    color: var(--bg-white);
}

.portfolio-floating-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--secondary-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ===========================
   Featured Property Showcase
   =========================== */
.featured-showcase {
    background:
        radial-gradient(circle at top left, rgba(212, 165, 116, 0.18), transparent 40%),
        linear-gradient(180deg, #f4efe9 0%, #ffffff 100%);
}

.featured-showcase-header,
.project-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.section-title-left {
    text-align: left;
    margin-bottom: 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.featured-showcase-copy {
    max-width: 520px;
    color: var(--text-light);
    font-size: 1.05rem;
}

.featured-showcase-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: -0.5rem 0 2rem;
}

.featured-showcase-ribbon span {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(184, 137, 79, 0.24);
    color: var(--secondary-color);
    box-shadow: 0 12px 30px rgba(44, 62, 80, 0.06);
    font-weight: 600;
}

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

.featured-project-card {
    display: block;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(184, 137, 79, 0.18);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(44, 62, 80, 0.09);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    content-visibility: auto;
    contain-intrinsic-size: 360px 420px;
}

.featured-project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(44, 62, 80, 0.16);
    border-color: rgba(184, 137, 79, 0.35);
}

.featured-project-media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
}

.featured-project-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 34, 45, 0.44), transparent 45%);
    pointer-events: none;
    z-index: 1;
}

.featured-project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.featured-project-card:hover .featured-project-media img {
    transform: scale(1.05);
}

.gallery-rotation-image {
    transition: opacity 0.35s ease, transform 0.45s ease;
}

.gallery-rotation-image.is-swapping {
    opacity: 0.35;
}

.featured-project-badge {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(29, 75, 58, 0.92);
    color: var(--bg-white);
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 6;
}

.featured-project-sold-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.featured-project-sold-ribbon::before {
    content: 'SOLD';
    position: absolute;
    top: 36px;
    left: -50px;
    width: 200px;
    padding: 11px 0;
    background: #c0392b;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(-45deg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.project-summary-image {
    position: relative;
    overflow: hidden;
}

.project-summary-sold-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.project-summary-sold-ribbon::before {
    content: 'SOLD';
    position: absolute;
    top: 44px;
    left: -58px;
    width: 230px;
    padding: 14px 0;
    background: #c0392b;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(-45deg);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.project-status-sold {
    color: #c0392b !important;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.featured-project-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-project-meta,
.local-project-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.featured-project-meta span,
.featured-project-stats span,
.local-project-card-meta span {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(44, 62, 80, 0.06);
}

.featured-project-body h3 {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    color: var(--secondary-color);
}

.featured-project-subtitle {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.featured-project-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.featured-project-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}

.featured-project-link,
.project-back-link {
    font-weight: 700;
    color: var(--secondary-color);
}

.featured-project-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.featured-projects-empty,
.local-project-empty {
    padding: 2rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px dashed rgba(184, 137, 79, 0.45);
}

/* ===========================
   Project Detail
   =========================== */
.btn-dark {
    color: var(--secondary-color);
    border-color: rgba(44, 62, 80, 0.25);
}

.btn-dark:hover {
    background: var(--secondary-color);
    color: var(--bg-white);
    border-color: var(--secondary-color);
}

.btn-small {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: #9f3a2f;
    color: var(--bg-white);
}

.btn-danger:hover {
    background: #7d2d25;
}

.project-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(44, 62, 80, 0.96), rgba(22, 31, 40, 0.96)),
        radial-gradient(circle at top right, rgba(212, 165, 116, 0.24), transparent 40%);
    color: var(--bg-white);
}

.project-hero,
.project-matterport-section,
.project-gallery-section,
.project-story-section,
.related-projects-section {
    padding: 3.4rem 0;
    overflow-x: hidden;
}

.project-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(212, 165, 116, 0.18), transparent 24%),
        radial-gradient(circle at 78% 82%, rgba(255, 255, 255, 0.07), transparent 24%);
    pointer-events: none;
}

.project-hero .container {
    position: relative;
    z-index: 1;
}

.project-back-link {
    display: inline-flex;
    margin-bottom: 1.15rem;
    opacity: 0.85;
}

.project-hero-grid,
.project-story-grid,
.local-manager-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
    gap: 1.4rem;
}

.project-hero-copy h1 {
    font-size: clamp(2.6rem, 4vw, 4.5rem);
    margin-bottom: 1rem;
}

.project-hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

.project-hero-description {
    font-size: 1.1rem;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.project-hero-statbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.35rem;
}

.project-hero-statbar span {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--bg-white);
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.project-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-summary-card,
.project-story-card,
.project-sidebar-card,
.local-manager-panel {
    background: var(--bg-white);
    border-radius: 22px;
    box-shadow: 0 24px 50px rgba(44, 62, 80, 0.08);
    overflow: hidden;
}

.project-summary-card {
    color: var(--text-dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-summary-image {
    aspect-ratio: 5 / 4;
    background: #d9ddd8;
}

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

.project-summary-content {
    padding: 1.2rem;
}

.project-summary-content h2 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.project-summary-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.project-summary-facts div {
    padding: 0.75rem;
    border-radius: 16px;
    background: var(--bg-light);
}

.project-summary-facts span,
.project-detail-row span {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.project-address {
    margin-top: 0.8rem;
    color: var(--text-light);
}

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

.address-link:hover,
.address-link:focus-visible {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.contact-card .address-link,
.footer-section .address-link,
.project-address .address-link {
    display: block;
    color: inherit;
}

.project-section-heading {
    margin-bottom: 1.45rem;
}

.project-gallery-section {
    background:
        radial-gradient(circle at top right, rgba(212, 165, 116, 0.14), transparent 28%),
        linear-gradient(180deg, #f7f3ee 0%, #fefcf8 100%);
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.9rem;
}

.project-gallery-item {
    grid-column: span 4;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(44, 62, 80, 0.08);
    box-shadow: 0 22px 45px rgba(44, 62, 80, 0.08);
    min-height: 220px;
    background: var(--bg-white);
    content-visibility: auto;
    contain-intrinsic-size: 360px 260px;
}

.project-gallery-item-large {
    grid-column: span 8;
    grid-row: span 2;
}

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

.project-gallery-item:hover img {
    transform: scale(1.04);
    filter: saturate(1.05);
}

.project-gallery-empty {
    padding: 2rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px dashed rgba(184, 137, 79, 0.45);
    text-align: center;
}

.project-matterport-section {
    background:
        radial-gradient(circle at top left, rgba(212, 165, 116, 0.16), transparent 28%),
        radial-gradient(circle at bottom right, rgba(29, 75, 58, 0.18), transparent 32%),
        linear-gradient(180deg, #14222d 0%, #1b2f3d 100%);
    color: var(--bg-white);
    overflow: clip;
}

.project-matterport-section .section-title,
.project-matterport-section .featured-showcase-copy,
.project-matterport-section .eyebrow,
.project-matterport-sidecard h3,
.project-matterport-sidecard p {
    color: var(--bg-white);
}

.project-matterport-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.8fr);
    gap: 1.1rem;
    align-items: stretch;
    max-width: 100%;
    min-width: 0;
}

.project-matterport-shell > * {
    min-width: 0;
    max-width: 100%;
}

.project-matterport-frame-wrap,
.project-matterport-sidecard,
.project-editor-preview-tour-card {
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.project-matterport-frame-wrap {
    aspect-ratio: 16 / 10;
    min-height: 500px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.22);
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.project-matterport-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #101820;
}

.project-matterport-placeholder {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: inherit;
    background: #101820;
}

.project-matterport-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(14, 25, 35, 0.08), rgba(14, 25, 35, 0.34));
    pointer-events: none;
}

.project-matterport-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.95) contrast(1.02);
}

.project-matterport-play {
    position: absolute;
    left: 50%;
    bottom: 1.2rem;
    transform: translateX(-50%);
    z-index: 2;
    width: min(100% - 2rem, 18rem);
    min-width: 0;
    box-shadow: 0 18px 36px rgba(14, 25, 35, 0.28);
}

.project-matterport-kicker {
    display: inline-flex;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    width: fit-content;
}

.project-matterport-sidecard {
    padding: 1.3rem;
    display: grid;
    align-content: start;
    gap: 0.85rem;
    min-width: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06)),
        rgba(255, 255, 255, 0.06);
}

.project-matterport-note {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
}

.project-matterport-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    width: 100%;
}

.project-matterport-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    min-width: 0;
    text-align: center;
    white-space: normal;
}

.project-matterport-actions button.btn:disabled {
    opacity: 0.72;
    cursor: default;
}

.project-story-section {
    background: linear-gradient(180deg, #ffffff 0%, #f9f7f3 100%);
}

.project-story-main,
.project-story-sidebar {
    display: grid;
    gap: 1rem;
}

.project-story-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-story-main > .project-story-card:first-child {
    grid-column: 1 / -1;
}

.project-story-card,
.project-sidebar-card {
    padding: 1.35rem;
    position: relative;
    border: 1px solid rgba(44, 62, 80, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 247, 243, 0.92));
    content-visibility: auto;
    contain-intrinsic-size: 360px 240px;
}

.project-story-card::before,
.project-sidebar-card::before {
    content: '';
    display: block;
    width: 58px;
    height: 4px;
    margin-bottom: 0.8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color), rgba(29, 75, 58, 0.95));
}

.project-story-card p:last-child,
.project-sidebar-card p:last-child {
    margin-bottom: 0;
}

.project-highlight-list {
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.project-highlight-list li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--text-dark);
}

.project-highlight-list li::before {
    content: '';
    position: absolute;
    top: 0.65rem;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
}

.project-detail-list {
    display: grid;
    gap: 0.75rem;
}

.project-detail-row {
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: var(--bg-light);
}

.project-sidebar-card-accent {
    background: linear-gradient(180deg, #1d4b3a 0%, #234d3e 100%);
    color: var(--bg-white);
}

.project-sidebar-card-accent .eyebrow,
.project-sidebar-card-accent p,
.project-sidebar-card-accent h3,
.project-sidebar-card-accent .project-mls-source {
    color: var(--bg-white);
}

.project-mls-source {
    font-size: 0.9rem;
    opacity: 0.78;
    margin-top: 1rem;
}

.related-projects-section {
    background: var(--bg-white);
}

.project-disclaimer-section {
    background: #f4efe9;
    padding-top: 0;
    padding-bottom: 2.2rem;
}

.project-disclaimer-card {
    padding: 1.35rem 1.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(44, 62, 80, 0.12);
    color: var(--text-light);
    box-shadow: 0 18px 40px rgba(44, 62, 80, 0.08);
}

.project-disclaimer-card p {
    margin: 0;
}

.project-disclaimer-card a {
    color: var(--secondary-color);
    font-weight: 600;
    word-break: break-word;
}

/* ===========================
   Local Manager
   =========================== */
.local-manager-page {
    background: linear-gradient(180deg, #eef1f4 0%, #f8f6f2 100%);
    min-height: 100vh;
}

.local-manager {
    padding: 3rem 0;
}

.local-manager-header,
.local-manager-panel-header,
.local-project-card-top,
.project-import-box,
.project-admin-form-actions,
.local-project-card-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.local-manager-header {
    align-items: end;
    margin-bottom: 2rem;
}

.local-manager-header h1 {
    font-size: clamp(2.3rem, 4vw, 3.4rem);
    margin-bottom: 0.75rem;
}

.local-manager-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.local-manager-alert {
    padding: 1rem 1.2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    background: rgba(44, 62, 80, 0.06);
    color: var(--secondary-color);
}

.local-manager-alert-success {
    background: rgba(29, 75, 58, 0.1);
    color: #1d4b3a;
}

.local-manager-alert-error {
    background: rgba(159, 58, 47, 0.1);
    color: #7d2d25;
}

.local-manager-panel {
    padding: 1.5rem;
}

.local-manager-panel-header {
    align-items: start;
    margin-bottom: 1.5rem;
}

.project-admin-form {
    display: grid;
    gap: 1.1rem;
}

.project-admin-grid {
    display: grid;
    gap: 1rem;
}

.project-admin-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-admin-grid.three-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-admin-grid.four-column {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-admin-form label {
    display: grid;
    gap: 0.45rem;
}

.project-admin-form label span {
    font-weight: 600;
    color: var(--secondary-color);
}

.field-note {
    color: var(--text-light);
    font-size: 0.88rem;
}

.inline-helper-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.2rem;
}

.matterport-editor-block {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(20, 34, 45, 0.96), rgba(29, 75, 58, 0.9)),
        radial-gradient(circle at top right, rgba(212, 165, 116, 0.24), transparent 30%);
    box-shadow: 0 24px 45px rgba(20, 34, 45, 0.12);
}

.matterport-editor-copy h3,
.matterport-editor-copy p,
.matterport-editor-copy .eyebrow {
    color: var(--bg-white);
}

.matterport-editor-block .project-admin-grid {
    margin-top: 0.25rem;
}

.matterport-editor-block label span {
    color: var(--bg-white);
}

.matterport-editor-block input {
    background: rgba(255, 255, 255, 0.94);
}

.project-editor-preview {
    padding: 1.25rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(44, 62, 80, 0.05), rgba(212, 165, 116, 0.08));
    border: 1px solid rgba(44, 62, 80, 0.1);
}

.project-editor-preview-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.project-editor-preview-card {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.project-editor-preview-image-wrap {
    overflow: hidden;
    border-radius: 18px;
    min-height: 180px;
    background: rgba(255, 255, 255, 0.8);
}

.project-editor-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-editor-preview-copy {
    display: grid;
    align-content: start;
    gap: 0.85rem;
}

.project-editor-preview-pill {
    display: inline-flex;
    width: fit-content;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(29, 75, 58, 0.12);
    color: #1d4b3a;
    font-weight: 700;
    font-size: 0.82rem;
}

.project-editor-preview-copy h4 {
    font-size: 1.35rem;
    color: var(--secondary-color);
}

.project-editor-preview-copy p {
    color: var(--text-light);
}

.project-editor-preview-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.project-editor-preview-stats span {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.project-editor-preview-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.project-editor-preview-tour {
    margin-top: 1rem;
}

.project-editor-preview-tour-card {
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.85);
}

.project-editor-preview-tour.is-active .project-editor-preview-tour-card {
    background: linear-gradient(180deg, rgba(29, 75, 58, 0.12), rgba(44, 62, 80, 0.04));
    border-color: rgba(29, 75, 58, 0.28);
}

.project-editor-preview-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    min-height: 78px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid transparent;
}

.project-editor-preview-thumb.is-cover {
    border-color: rgba(184, 137, 79, 0.8);
}

.project-editor-preview-thumb.is-cover::after {
    content: 'Cover';
    position: absolute;
    left: 0.45rem;
    bottom: 0.45rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(29, 75, 58, 0.92);
    color: var(--bg-white);
    font-size: 0.7rem;
    font-weight: 700;
}

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

.project-admin-form input,
.project-admin-form textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(44, 62, 80, 0.15);
    border-radius: 14px;
    font: inherit;
    background: #fbfbfb;
    color: var(--text-dark);
}

.project-admin-form input:focus,
.project-admin-form textarea:focus {
    outline: none;
    border-color: rgba(184, 137, 79, 0.8);
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.14);
    background: var(--bg-white);
}

.project-admin-checkbox {
    display: flex !important;
    align-items: center;
    gap: 0.8rem;
}

.project-admin-checkbox input {
    width: 18px;
    height: 18px;
}

.project-import-box {
    align-items: end;
    padding: 1.2rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(212, 165, 116, 0.12), rgba(44, 62, 80, 0.02));
    border: 1px solid rgba(184, 137, 79, 0.2);
}

.project-import-box h3 {
    margin-bottom: 0.4rem;
}

.project-import-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    min-width: 320px;
}

.project-import-status {
    margin-top: 0.3rem;
    color: var(--text-light);
}

.project-import-status.success {
    color: #1d4b3a;
}

.project-import-status.error {
    color: #7d2d25;
}

.local-project-list {
    display: grid;
    gap: 1rem;
}

.local-project-card {
    padding: 1.15rem;
    border-radius: 18px;
    background: var(--bg-light);
}

.local-project-card h3 {
    margin-bottom: 0.4rem;
}

.local-project-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(29, 75, 58, 0.12);
    color: #1d4b3a;
    font-size: 0.82rem;
    font-weight: 700;
}

.local-project-pill-muted {
    background: rgba(44, 62, 80, 0.08);
    color: var(--text-light);
}

.local-project-card-actions {
    align-items: center;
    flex-wrap: wrap;
}

.local-delete-form {
    margin: 0;
}

/* ===========================
   Call to Action Section
   =========================== */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    padding: 5rem 2rem;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--bg-white);
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

/* ===========================
   Contact Section
   =========================== */
.contact {
    background: var(--bg-light);
}

.contact-grid {
    display: grid;
    gap: 2rem;
}

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

.contact-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.contact-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
}

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

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.contact-card p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.contact-card a {
    color: var(--primary-color);
    font-weight: 500;
}

.contact-card a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-name {
    font-weight: 600;
    color: var(--text-dark) !important;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--secondary-color);
    color: var(--bg-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 h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--bg-white);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #1877F2;
    border-radius: 5px;
    color: var(--bg-white) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link svg {
    flex-shrink: 0;
}

.social-link:hover {
    background: #0C63D4;
    transform: translateY(-2px);
}

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

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.website-credit {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.website-credit a {
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.website-credit a:hover {
    color: var(--bg-white);
    text-decoration: underline;
}

/* ===========================
   Error Pages
   =========================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.error-content {
    text-align: center;
    padding: 2rem;
}

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

.error-content h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-0.35rem);
        transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease, padding 0.2s ease;
    }

    .nav-menu.active {
        max-height: 400px;
        padding: 1rem 0;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem 2rem;
        border-radius: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .subsection-title {
        font-size: 1.5rem;
    }

    .portfolio-grid,
    .portfolio-grid.featured {
        grid-template-columns: 1fr;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.2rem;
    }

    .logo-img {
        height: 40px;
    }

    .hero {
        min-height: 500px;
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* ===========================
   Smooth Scrolling
   =========================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed header */
}

/* Enhanced smooth scrolling for better performance */
* {
    scroll-margin-top: 80px;
}

/* Optimize scrolling performance */
body {
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* ===========================
   Loading Animation
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-item,
.service-card,
.contact-card {
    animation: fadeIn 0.6s ease-out;
}

/* ===========================
   Scroll to Top Button
   =========================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

.scroll-to-top::before {
    content: '↑';
}
