/* ==========================================================================
   Compass Theme — Ultra-clean minimalist real estate
   ========================================================================== */

/* ---- Global ---- */
body {
    font-family: var(--agency-font-body);
    color: var(--agency-text);
    background-color: var(--agency-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--agency-font-heading);
    color: var(--agency-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
}

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

a:hover {
    color: var(--agency-secondary);
}

/* ---- Top Header ---- */
.agency-top-header {
    background: var(--agency-accent, #1a1a1a);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    padding: 0.4rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1031;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.agency-top-header-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.agency-top-header-link:hover {
    color: var(--agency-secondary);
}

/* ---- Navbar ---- */
/* ---- Navbar spacer ---- */
.agency-navbar-spacer {
    height: 104px; /* top-header (~32px) + navbar (~72px) */
}

.agency-navbar {
    padding: 1rem 0;
    transition: var(--agency-transition);
    background: var(--agency-primary);
    position: fixed;
    top: 32px; /* below top header */
    width: 100%;
    z-index: 1030;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.agency-navbar .nav-link {
    font-family: var(--agency-font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
    transition: var(--agency-transition);
}

.agency-navbar .nav-link:hover,
.agency-navbar .nav-link.active {
    color: var(--agency-secondary);
}

.agency-logo {
    max-height: 40px;
    filter: brightness(0) invert(1);
    transition: var(--agency-transition);
}

/* Scrolled state — only applied on hero pages via JS */
.agency-navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.agency-navbar.scrolled .nav-link {
    color: var(--agency-primary) !important;
}

.agency-navbar.scrolled .nav-link:hover,
.agency-navbar.scrolled .nav-link.active {
    color: var(--agency-secondary) !important;
}

/* Override inline color:#fff on logo and mobile toggle when scrolled */
.agency-navbar.scrolled span[style*="color"],
.agency-navbar.scrolled a span[style*="color"] {
    color: var(--agency-primary) !important;
}

.agency-navbar.scrolled .btn[style*="color"] {
    color: var(--agency-primary) !important;
}

.agency-navbar.scrolled .agency-logo {
    filter: none;
}

/* ---- Hero ---- */
/* Hero eats the spacer with negative margin */
.agency-hero {
    margin-top: -104px; /* negate spacer (top-header + navbar) */
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.agency-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
}

.agency-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.agency-hero h1 {
    font-size: 3.5rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.15;
}

.agency-hero p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

/* ---- Search Bar (hero) ---- */
.agency-search-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.25rem 1.5rem;
    border-radius: var(--agency-radius);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}

.agency-search-bar .form-select,
.agency-search-bar .form-control {
    border: 1px solid #e5e5e5;
    border-radius: var(--agency-radius);
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    font-family: var(--agency-font-body);
}

.agency-search-bar .btn-search {
    background: var(--agency-primary);
    color: #fff;
    border: none;
    padding: 0.625rem 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: var(--agency-transition);
}

.agency-search-bar .btn-search:hover {
    background: var(--agency-secondary);
    color: var(--agency-primary);
}

/* ---- Section Titles ---- */
.agency-section {
    padding: 5rem 0;
}

.agency-section-title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

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

.agency-gold-line,
.agency-accent-line {
    width: 60px;
    height: 2px;
    background: var(--agency-secondary);
    margin: 1rem auto 2.5rem;
}

/* ---- Property Cards ---- */
.agency-property-card {
    background: var(--agency-bg);
    border-radius: var(--agency-radius);
    overflow: hidden;
    box-shadow: var(--agency-shadow);
    transition: var(--agency-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.agency-property-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.agency-property-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.agency-property-card .card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--agency-primary);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
}

.agency-property-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.agency-property-card .card-price {
    font-family: var(--agency-font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--agency-primary);
    margin-bottom: 0.25rem;
}

.agency-property-card .card-location {
    color: var(--agency-text-light);
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}

.agency-property-card .card-features {
    display: flex;
    gap: 1.25rem;
    font-size: 0.8125rem;
    color: var(--agency-text-light);
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
    margin-top: auto;
}

.agency-property-card .card-features span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ---- Stats Section ---- */
.agency-stats {
    background: var(--agency-primary);
    color: #fff;
    padding: 4rem 0;
}

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

.agency-stat-number {
    font-family: var(--agency-font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--agency-secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.agency-stat-label {
    font-size: 0.8125rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* ---- Team ---- */
.agency-team-card {
    text-align: center;
    padding: 1.5rem;
}

.agency-team-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--agency-bg-light);
}

.agency-team-card h5 {
    font-family: var(--agency-font-heading);
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.agency-team-card p {
    color: var(--agency-text-light);
    font-size: 0.875rem;
}

/* ---- About Preview ---- */
.agency-about-preview {
    background: var(--agency-bg-light);
}

/* ---- Neighborhood Cards ---- */
.agency-neighborhood-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    padding: 1.25rem;
    text-align: center;
    transition: var(--agency-transition);
}

.agency-neighborhood-card:hover {
    border-color: var(--agency-secondary);
    box-shadow: var(--agency-shadow);
    transform: translateY(-2px);
}

.agency-neighborhood-card h6 {
    font-family: var(--agency-font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    color: var(--agency-primary);
}

.agency-neighborhood-card small {
    color: var(--agency-secondary);
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ---- Section Light bg ---- */
.agency-section-light {
    background: var(--agency-bg-light);
}

/* ---- Property Card Extras ---- */
.agency-property-card .card-badge-exclu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #dc3545;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
}

.agency-property-card .card-photo-count {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

.agency-property-card .btn-favorite {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--agency-text-light);
    transition: var(--agency-transition);
    z-index: 5;
}

.agency-property-card .btn-favorite:hover,
.agency-property-card .btn-favorite.is-favorite {
    color: #dc3545;
}

.agency-property-card .btn-favorite.is-favorite i::before {
    content: "\F415";
}

/* ---- Agent Card Extras ---- */
.agency-team-card .agent-function {
    color: var(--agency-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.agency-team-card .agent-listings-count {
    color: var(--agency-text-light);
    font-size: 0.75rem;
}

.agency-team-card .agent-phone {
    color: var(--agency-text-light);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

/* ---- About text ---- */
.agency-about-text {
    color: var(--agency-text-light);
    line-height: 1.9;
    font-size: 1.0625rem;
}

/* ---- CTA Outline Light ---- */
.btn-agency-outline-light {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

.btn-agency-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

/* ---- CTA ---- */
.agency-cta {
    background: var(--agency-primary);
    color: #fff;
    text-align: center;
    padding: 5rem 0;
}

.agency-cta h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.agency-cta p {
    opacity: 0.85;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-agency-primary {
    background: var(--agency-secondary);
    color: var(--agency-primary);
    border: none;
    padding: 0.75rem 2.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: var(--agency-transition);
}

.btn-agency-primary:hover {
    background: #fff;
    color: var(--agency-primary);
}

.btn-agency-outline {
    background: transparent;
    color: var(--agency-primary);
    border: 2px solid var(--agency-primary);
    padding: 0.75rem 2.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: var(--agency-transition);
}

.btn-agency-outline:hover {
    background: var(--agency-primary);
    color: #fff;
}

/* ---- Footer ---- */
.agency-footer {
    background: var(--agency-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 1.5rem;
    font-size: 0.875rem;
}

.agency-footer a {
    color: rgba(255, 255, 255, 0.7);
}

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

.agency-footer-logo {
    max-height: 30px;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}

.agency-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.8125rem;
    opacity: 0.6;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .agency-hero h1 {
        font-size: 2.5rem;
    }

    .agency-search-bar {
        flex-direction: column;
    }

    .agency-section {
        padding: 3rem 0;
    }
}

@media (max-width: 767.98px) {
    /* Hide top header on mobile — too crowded */
    .agency-top-header {
        display: none;
    }

    .agency-navbar {
        top: 0; /* no top header on mobile */
    }

    .agency-navbar-spacer {
        height: 72px; /* just navbar */
    }

    .agency-hero {
        margin-top: -72px;
    }
}

@media (max-width: 575.98px) {
    .agency-hero {
        min-height: 500px;
        margin-top: -72px;
    }

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

    .agency-stat-number {
        font-size: 2rem;
    }
}
