/* ==========================================================================
   Riviera Theme — Cote d'Azur Chic Real Estate
   Ocean blue, coral accents, pill buttons, serif elegance
   ========================================================================== */

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

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

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

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

::selection {
    background: rgba(232, 146, 124, 0.25);
    color: var(--agency-primary);
}

/* ---- Navbar ---- */
.agency-navbar {
    background: var(--agency-primary);
    padding: 0 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(27, 73, 101, 0.15);
}

.agency-navbar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 1.1rem 1rem !important;
    transition: var(--agency-transition);
    border-bottom: 3px solid transparent;
    letter-spacing: 0.02em;
}

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

.agency-navbar-brand {
    font-family: var(--agency-font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: -0.01em;
    font-style: italic;
}

.agency-navbar-brand span {
    color: var(--agency-secondary);
}

.agency-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.agency-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* ---- Top Header ---- */
.agency-top-header {
    background: var(--agency-primary-dark, #133548);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    padding: 0.4rem 0;
}

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

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

/* ---- Hero Section ---- */
.agency-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--agency-bg-light);
}

.agency-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.agency-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(27, 73, 101, 0.6) 0%, rgba(27, 73, 101, 0.85) 100%);
}

.agency-hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 4rem 2rem;
    margin: 0 auto;
    text-align: center;
}

.agency-hero-content h1 {
    color: #fff;
    font-family: var(--agency-font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-style: italic;
}

.agency-hero-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
}

/* ---- Hero Subtitle ---- */
.agency-hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
}

/* ---- Search Bar ---- */
.agency-search-bar {
    display: flex;
    gap: 0;
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(27, 73, 101, 0.2);
}

.agency-search-bar .form-select {
    border: none;
    border-radius: 0;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    border-right: 1px solid var(--agency-border);
    background-color: #fff;
    color: var(--agency-text);
}

.agency-search-bar .form-select:focus {
    box-shadow: none;
    outline: none;
}

.agency-search-bar .btn-search {
    background: var(--agency-secondary);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
    transition: var(--agency-transition);
    border-radius: 0 50px 50px 0;
}

.agency-search-bar .btn-search:hover {
    background: var(--agency-secondary-dark, #D47A64);
}

/* ---- Hero Search (enhanced) ---- */
.agency-hero-search {
    max-width: 640px;
    margin: 0 auto;
}

.agency-hero-search .agency-search-row {
    display: flex;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(27, 73, 101, 0.25);
}

.agency-hero-search .agency-search-field {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 0 1.25rem;
    border-right: 1px solid var(--agency-border);
    gap: 0.5rem;
}

.agency-hero-search .agency-search-field i {
    color: var(--agency-secondary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.agency-hero-search .agency-search-field select {
    border: none;
    background: transparent;
    height: 60px;
    font-size: 0.9375rem;
    color: var(--agency-text);
    width: 100%;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none;
    padding-right: 1.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23718096' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

.agency-hero-search .agency-search-field select:focus {
    outline: none;
    box-shadow: none;
}

.agency-hero-search .agency-search-submit {
    height: 60px;
    padding: 0 2.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
    border: none;
    border-radius: 0 50px 50px 0;
    background: var(--agency-secondary);
    color: #fff;
    cursor: pointer;
    transition: var(--agency-transition);
    display: flex;
    align-items: center;
    letter-spacing: 0.02em;
}

.agency-hero-search .agency-search-submit:hover {
    background: var(--agency-secondary-dark, #D47A64);
}

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

.agency-section-title {
    text-align: center;
    font-family: var(--agency-font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.agency-section-subtitle {
    text-align: center;
    color: var(--agency-text-light);
    font-size: 1.0625rem;
    font-weight: 400;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.agency-blue-bar,
.agency-accent-line {
    width: 48px;
    height: 4px;
    background: var(--agency-secondary);
    margin: 0.75rem auto 2rem;
    border-radius: 50px;
}

/* ---- Section Backgrounds ---- */
.agency-section-light {
    background: linear-gradient(180deg, #FEFCFA 0%, #F7F3EE 100%);
}

.agency-section-alt {
    background: linear-gradient(180deg, #FEFCFA 0%, #F7F3EE 100%);
}

/* ---- Property Cards ---- */
.agency-property-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
    transition: var(--agency-transition);
    height: 100%;
}

.agency-property-card:hover {
    box-shadow: 0 8px 32px rgba(27, 73, 101, 0.15);
    transform: translateY(-4px);
}

.agency-property-card .card-img-wrapper {
    position: relative;
    padding-top: 66%;
    overflow: hidden;
}

.agency-property-card .card-img-wrapper img {
    position: absolute;
    inset: 0;
    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: 12px;
    left: 12px;
    background: rgba(232, 146, 124, 0.15);
    color: var(--agency-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.agency-property-card .card-body {
    padding: 1.25rem;
}

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

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

.agency-property-card .card-location i {
    color: var(--agency-secondary);
    margin-right: 0.25rem;
}

.agency-property-card .card-features {
    display: flex;
    gap: 1.25rem;
    font-size: 0.8125rem;
    color: var(--agency-text-light);
}

.agency-property-card .card-features i {
    color: var(--agency-secondary);
    margin-right: 0.25rem;
}

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

/* Neuf mode: taller image */
.agency-property-card .card-img-tall {
    padding-top: 75%;
}

/* Neuf card: slightly different styling */
.agency-property-card.card-neuf .card-body {
    padding: 1.5rem;
}

/* ---- Property Card Extras ---- */
.agency-property-card .card-badge-exclu {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc3545;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.agency-property-card .btn-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    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;
    box-shadow: 0 2px 8px rgba(27, 73, 101, 0.1);
}

.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";
}

/* When exclusive badge and favorite both present */
.agency-property-card .card-badge-exclu ~ .btn-favorite,
.agency-property-card .btn-favorite:has(~ .card-badge-exclu) {
    top: auto;
    bottom: 12px;
    right: 12px;
}

/* ---- Statistics ---- */
.agency-stats {
    background: var(--agency-gradient-primary, var(--agency-primary));
    padding: 5rem 0;
}

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

.agency-stat-icon {
    font-size: 2rem;
    color: var(--agency-secondary);
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.agency-stat-number {
    font-family: var(--agency-font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.agency-stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
}

/* ---- Team Cards ---- */
.agency-team-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding: 2rem 1.5rem;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
    transition: var(--agency-transition);
    height: 100%;
}

.agency-team-card:hover {
    box-shadow: 0 8px 32px rgba(27, 73, 101, 0.15);
    transform: translateY(-4px);
}

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

.agency-team-card h5 {
    font-family: var(--agency-font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--agency-primary);
}

.agency-team-card p {
    color: var(--agency-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

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

/* ---- 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;
}

/* ---- Team Cards V2 (enriched) ---- */
.agency-team-card-v2 {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
    transition: var(--agency-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.agency-team-card-v2:hover {
    box-shadow: 0 8px 32px rgba(27, 73, 101, 0.15);
    transform: translateY(-6px);
}

.agency-team-card-v2 .agent-photo-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 4px solid var(--agency-primary);
    box-shadow: 0 4px 16px rgba(27, 73, 101, 0.12);
}

.agency-team-card-v2 .agent-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.agency-team-card-v2:hover .agent-photo-wrapper img {
    transform: scale(1.08);
}

.agency-team-card-v2 .agent-info {
    flex: 1;
    margin-bottom: 1rem;
}

.agency-team-card-v2 .agent-info h5 {
    font-family: var(--agency-font-heading);
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--agency-primary);
}

.agency-team-card-v2 .agent-function {
    display: block;
    color: var(--agency-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

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

.agency-team-card-v2 .agent-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.agency-team-card-v2 .agent-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--agency-bg-light);
    color: var(--agency-primary);
    font-size: 1rem;
    transition: var(--agency-transition);
}

.agency-team-card-v2 .agent-action-btn:hover {
    background: var(--agency-secondary);
    color: #fff;
}

/* ---- Neighborhood Cards ---- */
.agency-neighborhood-card {
    background: var(--agency-bg-light);
    border: 1px solid var(--agency-border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    transition: var(--agency-transition);
}

.agency-neighborhood-card:hover {
    border-color: var(--agency-secondary);
    background: #fff;
    box-shadow: 0 8px 32px rgba(27, 73, 101, 0.12);
    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;
    font-size: 0.8125rem;
}

/* ---- About Preview ---- */
.agency-about-preview {
    background: linear-gradient(180deg, #FEFCFA 0%, #F7F3EE 100%);
}

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

/* ---- About Logo ---- */
.agency-about-logo {
    background: var(--agency-bg-light);
    border-radius: var(--agency-radius-lg);
    padding: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--agency-shadow);
}

.agency-about-logo img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
}

/* ---- Buttons — Pill Shape ---- */
.btn-agency-primary {
    background: var(--agency-secondary);
    color: #fff;
    border: none;
    padding: 0.85rem 2.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 50px;
    transition: var(--agency-transition);
    box-shadow: 0 2px 12px rgba(232, 146, 124, 0.3);
}

.btn-agency-primary:hover {
    background: var(--agency-secondary-dark, #D47A64);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 146, 124, 0.4);
}

.btn-agency-outline {
    background: transparent;
    color: var(--agency-primary);
    border: 2px solid var(--agency-primary);
    padding: 0.75rem 2.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 50px;
    transition: var(--agency-transition);
    display: inline-block;
}

.btn-agency-outline:hover {
    background: var(--agency-primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(27, 73, 101, 0.2);
}

.btn-agency-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    border-radius: 50px;
}

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

.btn-agency-lg {
    padding: 1rem 3rem;
    font-size: 1rem;
}

/* ---- CTA Section ---- */
.agency-cta {
    background: var(--agency-gradient-cta, linear-gradient(135deg, var(--agency-primary) 0%, #2A6A8E 100%));
    color: #fff;
    text-align: center;
    padding: 5rem 0;
}

.agency-cta h2 {
    color: #fff;
    font-family: var(--agency-font-heading);
    margin-bottom: 1rem;
    font-style: italic;
}

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

/* ---- CTA Buttons (enhanced) ---- */
.btn-agency-cta-primary {
    background: #fff;
    color: var(--agency-primary);
    border: 2px solid #fff;
    padding: 0.9rem 2.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--agency-transition);
    display: inline-flex;
    align-items: center;
}

.btn-agency-cta-primary:hover {
    background: transparent;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.btn-agency-cta-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.9rem 2.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--agency-transition);
    display: inline-flex;
    align-items: center;
}

.btn-agency-cta-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

/* ---- Footer ---- */
.agency-footer {
    background: #122A3E;
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
    font-size: 0.875rem;
    border-top: 2px solid var(--agency-secondary);
}

.agency-footer h6 {
    color: #fff;
    font-family: var(--agency-font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
}

.agency-footer a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--agency-transition);
}

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

.agency-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    margin-top: 3rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8125rem;
}

/* ---- Project Card (Neuf) ---- */
.agency-project-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
    transition: var(--agency-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.agency-project-card:hover {
    box-shadow: 0 8px 32px rgba(27, 73, 101, 0.15);
    transform: translateY(-4px);
}

.project-card-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.project-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

.project-card-title {
    font-family: var(--agency-font-heading);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--agency-primary);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.project-card-title a {
    color: var(--agency-primary);
}

.project-card-title a:hover {
    color: var(--agency-secondary);
}

.project-units-list {
    display: flex;
    flex-direction: column;
}

.project-unit-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    font-size: 0.8125rem;
    color: var(--agency-text);
    border-bottom: 1px solid var(--agency-border);
    transition: var(--agency-transition);
}

.project-unit-line:last-child {
    border-bottom: none;
}

.project-unit-line:hover {
    background: var(--agency-bg-light);
    color: var(--agency-secondary);
}

.project-unit-line i {
    opacity: 0;
    transition: opacity 0.2s;
}

.project-unit-line:hover i {
    opacity: 1;
}

.project-unit-more {
    padding: 0.4rem 0.6rem;
    font-weight: 600;
}

/* ---- Detail Page: Project Units Table ---- */
.agency-project-units-table {
    border: 1px solid var(--agency-border);
    border-radius: 10px;
    overflow: hidden;
}

.project-unit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    color: var(--agency-text);
    border-bottom: 1px solid var(--agency-border);
    transition: var(--agency-transition);
}

.project-unit-row:last-child {
    border-bottom: none;
}

a.project-unit-row:hover {
    background: var(--agency-bg-light);
    color: var(--agency-secondary);
}

.project-unit-row .project-unit-arrow {
    opacity: 0;
    margin-left: 0.75rem;
    color: var(--agency-secondary);
    transition: opacity 0.2s;
}

a.project-unit-row:hover .project-unit-arrow {
    opacity: 1;
}

.project-unit-current {
    background: var(--agency-bg-light);
    font-weight: 500;
}

/* ---- Detail Page: Price Display ---- */
.agency-price-display {
    border-bottom: 2px solid var(--agency-border);
    padding-bottom: 1rem;
}

.agency-price-display .price-main {
    font-family: var(--agency-font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--agency-primary);
    line-height: 1.2;
}

.agency-price-display .price-conversions {
    color: var(--agency-text-light);
    font-size: 0.9rem;
    margin-left: 0.75rem;
    font-weight: 400;
}

/* ---- Detail Page: Agent Card (sidebar) ---- */
.agency-detail-agent-card {
    background: var(--agency-bg-light);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
}

.agency-detail-agent-card .agent-photo-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--agency-primary);
    box-shadow: 0 4px 16px rgba(27, 73, 101, 0.12);
}

.agency-detail-agent-card .agent-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Detail Page: Features Grid ---- */
.agency-feature-item {
    background: var(--agency-bg-light);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--agency-transition);
}

.agency-feature-item:hover {
    box-shadow: 0 3px 12px rgba(27, 73, 101, 0.08);
}

.agency-feature-item i {
    color: var(--agency-secondary);
    font-size: 1.25rem;
}

/* ---- Filter Bar ---- */
.agency-filter-bar {
    background: #fff;
    border-bottom: 1px solid var(--agency-border);
    padding: 0.75rem 0;
    box-shadow: 0 2px 12px rgba(27, 73, 101, 0.06);
}

.agency-filter-bar .filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.agency-filter-bar .filter-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--agency-text);
    background: var(--agency-bg-light);
    border: 1px solid var(--agency-border);
    border-radius: 50px;
    text-decoration: none;
    transition: var(--agency-transition);
    cursor: pointer;
    white-space: nowrap;
}

.agency-filter-bar .filter-tab:hover {
    border-color: var(--agency-secondary);
    color: var(--agency-secondary);
    background: rgba(232, 146, 124, 0.08);
}

.agency-filter-bar .filter-tab.active {
    background: var(--agency-secondary);
    color: #fff;
    border-color: var(--agency-secondary);
}

.agency-filter-bar .filter-dropdown {
    position: relative;
}

.agency-filter-bar .filter-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--agency-text);
    background: var(--agency-bg-light);
    border: 1px solid var(--agency-border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--agency-transition);
    white-space: nowrap;
}

.agency-filter-bar .filter-dropdown-toggle:hover {
    border-color: var(--agency-secondary);
    color: var(--agency-secondary);
}

.agency-filter-bar .filter-dropdown-toggle.active {
    background: var(--agency-secondary);
    color: #fff;
    border-color: var(--agency-secondary);
}

.agency-filter-bar .filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--agency-border);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(27, 73, 101, 0.12);
    z-index: 100;
    padding: 0.5rem 0;
    display: none;
}

.agency-filter-bar .filter-dropdown-menu.show {
    display: block;
}

.agency-filter-bar .filter-dropdown-item {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--agency-text);
    transition: var(--agency-transition);
    cursor: pointer;
}

.agency-filter-bar .filter-dropdown-item:hover {
    background: var(--agency-bg-light);
    color: var(--agency-secondary);
}

.agency-filter-bar .filter-dropdown-item.active {
    color: var(--agency-secondary);
    font-weight: 600;
}

.agency-filter-bar .btn-filter-alert {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--agency-accent);
    color: var(--agency-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--agency-transition);
}

.agency-filter-bar .btn-filter-alert:hover {
    background: var(--agency-secondary);
    color: #fff;
}

.agency-filter-bar .filter-sort,
.agency-filter-bar .filter-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: var(--agency-text-light);
    background: transparent;
    border: 1px solid var(--agency-border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--agency-transition);
}

.agency-filter-bar .filter-sort:hover,
.agency-filter-bar .filter-view-toggle:hover {
    border-color: var(--agency-secondary);
    color: var(--agency-secondary);
}

/* ---- Listings Map View ---- */
.listings-map-view .listings-panel {
    max-height: 75vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--agency-secondary) var(--agency-bg-light);
}

.listings-map-view .listings-panel::-webkit-scrollbar {
    width: 4px;
}

.listings-map-view .listings-panel::-webkit-scrollbar-track {
    background: var(--agency-bg-light);
}

.listings-map-view .listings-panel::-webkit-scrollbar-thumb {
    background: var(--agency-secondary);
    border-radius: 50px;
}

/* ---- Contact Form ---- */
.agency-contact-form {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
}

.agency-contact-form .form-control,
.agency-contact-form .form-select {
    border: 1px solid var(--agency-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--agency-text);
    transition: var(--agency-transition);
}

.agency-contact-form .form-control:focus,
.agency-contact-form .form-select:focus {
    border-color: var(--agency-secondary);
    box-shadow: 0 0 0 3px rgba(232, 146, 124, 0.15);
}

.agency-contact-form .form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--agency-primary);
    margin-bottom: 0.4rem;
}

/* ---- Auth / Login Page ---- */
.agency-login-card {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
    max-width: 480px;
    margin: 0 auto;
}

.agency-login-card h3 {
    font-family: var(--agency-font-heading);
    color: var(--agency-primary);
    font-style: italic;
}

.agency-login-card .btn-google,
.agency-login-card .btn-facebook {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid var(--agency-border);
    background: #fff;
    color: var(--agency-text);
    transition: var(--agency-transition);
}

.agency-login-card .btn-google:hover {
    background: #f8f8f8;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.agency-login-card .btn-facebook {
    background: #1877F2;
    color: #fff;
    border-color: #1877F2;
}

.agency-login-card .btn-facebook:hover {
    background: #166FE5;
}

/* ---- Alert Pages ---- */
.agency-alert-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
    transition: var(--agency-transition);
    border-left: 4px solid var(--agency-secondary);
}

.agency-alert-card:hover {
    box-shadow: 0 8px 32px rgba(27, 73, 101, 0.12);
}

.agency-alert-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    background: rgba(232, 146, 124, 0.15);
    color: var(--agency-secondary);
}

/* ---- Breadcrumbs ---- */
.agency-breadcrumb {
    background: transparent;
    padding: 1rem 0;
    font-size: 0.8125rem;
}

.agency-breadcrumb a {
    color: var(--agency-text-light);
}

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

.agency-breadcrumb .separator {
    color: var(--agency-border);
    margin: 0 0.5rem;
}

.agency-breadcrumb .current {
    color: var(--agency-primary);
    font-weight: 500;
}

/* ---- Pagination ---- */
.agency-pagination .page-link {
    border: 1px solid var(--agency-border);
    border-radius: 50px;
    color: var(--agency-text);
    padding: 0.5rem 1rem;
    margin: 0 0.15rem;
    font-size: 0.875rem;
    transition: var(--agency-transition);
}

.agency-pagination .page-link:hover {
    background: var(--agency-bg-light);
    border-color: var(--agency-secondary);
    color: var(--agency-secondary);
}

.agency-pagination .page-item.active .page-link {
    background: var(--agency-secondary);
    border-color: var(--agency-secondary);
    color: #fff;
}

/* ---- Photo Gallery / Lightbox ---- */
.agency-gallery-main {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
}

.agency-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.agency-gallery-thumbs img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--agency-transition);
    border: 2px solid transparent;
}

.agency-gallery-thumbs img:hover,
.agency-gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--agency-secondary);
}

/* ---- Share Buttons ---- */
.agency-share-buttons {
    display: flex;
    gap: 0.5rem;
}

.agency-share-buttons .btn-share {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--agency-bg-light);
    color: var(--agency-primary);
    font-size: 1rem;
    transition: var(--agency-transition);
    border: none;
}

.agency-share-buttons .btn-share:hover {
    background: var(--agency-secondary);
    color: #fff;
    transform: translateY(-2px);
}

/* ---- Favorites Page ---- */
.agency-favorites-empty {
    text-align: center;
    padding: 5rem 2rem;
}

.agency-favorites-empty i {
    font-size: 4rem;
    color: var(--agency-border);
    margin-bottom: 1.5rem;
}

.agency-favorites-empty h3 {
    font-family: var(--agency-font-heading);
    color: var(--agency-primary);
}

.agency-favorites-empty p {
    color: var(--agency-text-light);
    max-width: 400px;
    margin: 0 auto 2rem;
}

/* ---- Mandat Pages ---- */
.agency-mandat-section {
    background: linear-gradient(180deg, #FEFCFA 0%, #F7F3EE 100%);
    padding: 5rem 0;
}

.agency-mandat-card {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
}

.agency-mandat-card h4 {
    font-family: var(--agency-font-heading);
    color: var(--agency-primary);
    font-style: italic;
}

/* ---- Amenities Grid ---- */
.agency-amenity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--agency-text);
}

.agency-amenity-item i {
    color: var(--agency-secondary);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ---- WhatsApp Float ---- */
.agency-whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
}

.agency-whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-size: 1.75rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    transition: var(--agency-transition);
}

.agency-whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

/* ---- Load More Button ---- */
.agency-load-more {
    text-align: center;
    padding: 2rem 0;
}

.agency-load-more .btn-load-more {
    background: var(--agency-bg-light);
    color: var(--agency-primary);
    border: 2px solid var(--agency-border);
    padding: 0.85rem 2.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--agency-transition);
}

.agency-load-more .btn-load-more:hover {
    background: var(--agency-secondary);
    color: #fff;
    border-color: var(--agency-secondary);
}

/* ---- Listings Count / Results Header ---- */
.agency-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--agency-text-light);
}

.agency-results-count {
    font-weight: 600;
    color: var(--agency-primary);
}

.agency-results-count span {
    color: var(--agency-secondary);
}

/* ---- Map Widget ---- */
.agency-map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
}

.agency-map-container .mapboxgl-canvas {
    border-radius: inherit;
}

/* ---- Sidebar Sticky ---- */
.agency-sidebar-sticky {
    position: sticky;
    top: 112px;
}

/* ---- Detail Page: Description ---- */
.agency-description {
    color: var(--agency-text);
    line-height: 1.9;
    font-size: 1rem;
}

.agency-description p {
    margin-bottom: 1rem;
}

/* ---- Detail Page: Similar Properties ---- */
.agency-similar-section {
    background: linear-gradient(180deg, #FEFCFA 0%, #F7F3EE 100%);
    padding: 4rem 0;
}

.agency-similar-section .agency-section-title {
    font-style: italic;
}

/* ---- Agent Profile Page ---- */
.agency-agent-profile {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 3px 16px rgba(27, 73, 101, 0.08);
}

.agency-agent-profile .agent-photo-lg {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--agency-primary);
    box-shadow: 0 4px 20px rgba(27, 73, 101, 0.15);
}

.agency-agent-profile h2 {
    font-family: var(--agency-font-heading);
    font-style: italic;
}

.agency-agent-profile .agent-contact-btn {
    border-radius: 50px;
}

/* ---- 404 Page ---- */
.agency-404 {
    text-align: center;
    padding: 8rem 2rem;
}

.agency-404 h1 {
    font-family: var(--agency-font-heading);
    font-size: 6rem;
    color: var(--agency-secondary);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
}

.agency-404 h2 {
    font-family: var(--agency-font-heading);
    color: var(--agency-primary);
    font-style: italic;
}

.agency-404 p {
    color: var(--agency-text-light);
    max-width: 480px;
    margin: 0 auto 2rem;
}

/* ---- Forms (general) ---- */
.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid var(--agency-border);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: var(--agency-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--agency-secondary);
    box-shadow: 0 0 0 3px rgba(232, 146, 124, 0.15);
}

/* ---- Badges (generic) ---- */
.agency-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    background: rgba(232, 146, 124, 0.15);
    color: var(--agency-secondary);
}

.agency-badge-primary {
    background: rgba(27, 73, 101, 0.1);
    color: var(--agency-primary);
}

.agency-badge-accent {
    background: rgba(201, 185, 154, 0.2);
    color: var(--agency-accent);
}

/* ---- Dividers ---- */
.agency-divider {
    width: 48px;
    height: 3px;
    background: var(--agency-secondary);
    border-radius: 50px;
}

.agency-divider-center {
    margin: 1rem auto;
}

/* ---- Card Links ---- */
.agency-card-link {
    color: var(--agency-secondary);
    font-weight: 600;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--agency-transition);
}

.agency-card-link:hover {
    color: var(--agency-primary);
    gap: 0.6rem;
}

/* ---- Infinite Scroll Spinner ---- */
.agency-scroll-loader {
    text-align: center;
    padding: 2rem 0;
}

.agency-scroll-loader .spinner-border {
    color: var(--agency-secondary);
    width: 2rem;
    height: 2rem;
}

/* ---- View Toggle (grid/map) ---- */
.agency-view-toggle .btn {
    border-radius: 50px;
    border: 1px solid var(--agency-border);
    color: var(--agency-text-light);
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
}

.agency-view-toggle .btn.active {
    background: var(--agency-secondary);
    border-color: var(--agency-secondary);
    color: #fff;
}

/* ---- Logo (navbar & footer) ---- */
.agency-logo-img {
    max-height: 44px;
    width: auto;
    object-fit: contain;
}

.agency-footer .agency-logo-img {
    max-height: 56px;
    margin-bottom: 1rem;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .agency-hero-search .agency-search-row {
        flex-direction: column;
        border-radius: var(--agency-radius);
    }

    .agency-hero-search .agency-search-field {
        border-right: none;
        border-bottom: 1px solid var(--agency-border);
    }

    .agency-hero-search .agency-search-submit {
        border-radius: 0 0 var(--agency-radius) var(--agency-radius);
        justify-content: center;
    }

    .agency-hero {
        min-height: 70vh;
    }

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

    .agency-search-bar {
        flex-direction: column;
        border-radius: var(--agency-radius);
    }

    .agency-search-bar .form-select {
        border-right: none;
        border-bottom: 1px solid var(--agency-border);
    }

    .agency-search-bar .btn-search {
        border-radius: 0 0 var(--agency-radius) var(--agency-radius);
    }

    .agency-filter-bar .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .agency-filter-bar .filter-tabs::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .agency-section {
        padding: 3rem 0;
    }

    .agency-hero {
        min-height: 60vh;
    }

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

    .agency-property-card .card-price {
        font-size: 1.2rem;
    }

    .agency-footer {
        padding: 3rem 0 1.5rem;
    }

    .agency-contact-form {
        padding: 1.5rem;
    }

    .agency-mandat-card {
        padding: 1.5rem;
    }

    .agency-agent-profile {
        padding: 1.5rem;
    }

    .agency-agent-profile .agent-photo-lg {
        width: 120px;
        height: 120px;
    }

    .agency-404 h1 {
        font-size: 4rem;
    }
}

@media (max-width: 575.98px) {
    .agency-hero-content {
        padding: 3rem 1rem;
    }

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

    .agency-hero-subtitle {
        font-size: 1rem;
    }

    .btn-agency-primary,
    .btn-agency-outline {
        padding: 0.75rem 1.75rem;
        font-size: 0.8125rem;
    }

    .agency-section-title {
        font-size: 1.5rem;
    }

    .agency-login-card {
        padding: 1.5rem;
    }
}
