:root {
    --primary: #1d9e75;
    --primary-dark: #157a5c;
    --primary-light: #e8f7f1;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f8faf9;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --radius: 10px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-danger {
    background: #dc2626;
    color: var(--white);
}

.btn-danger:hover {
    background: #b91c1c;
    color: var(--white);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3.5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-bar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    box-shadow: var(--shadow);
    text-align: left;
}

.search-bar label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.search-bar .search-submit {
    display: flex;
    align-items: flex-end;
}

/* Forms */
.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.15);
}

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

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

.form-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.form-help {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* Messages */
.messages {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.message {
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.message-success {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary);
}

.message-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.message-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem 0;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* Listing grid */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.listing-card-featured {
    border: 2px solid var(--primary);
    box-shadow: 0 4px 16px rgba(29, 158, 117, 0.2);
}

.listing-card-premium {
    border: 2px solid #d97706;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.18);
}

.listing-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.35rem;
}

.listing-badge-featured {
    background: var(--primary);
    color: var(--white);
}

.listing-badge-sponsored {
    background: #f59e0b;
    color: #1f2937;
}

.listing-badge-premium {
    background: #d97706;
    color: var(--white);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: var(--primary);
}

.directory-intro {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.directory-section {
    margin-bottom: 2rem;
}

.directory-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.directory-section h2 {
    font-size: 1.15rem;
    margin: 0 0 0.75rem;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.65rem;
}

.directory-grid-full {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.directory-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.directory-link:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    color: var(--primary-dark);
}

.directory-link small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.directory-count {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.premium-plan-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.premium-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}

.premium-duration {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.payment-details {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.payment-details li {
    padding: 0.35rem 0;
}

.cred-badge.cred-premium {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.cred-badge.cred-agency {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.agency-profile-header {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    align-items: start;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.agency-profile-logo img,
.agency-logo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.agency-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--primary-light);
}

.agency-bio {
    color: var(--text-muted);
    margin: 0.5rem 0;
    line-height: 1.6;
}

.agency-contact {
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.account-type-radio {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-type-radio label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

@media (max-width: 600px) {
    .agency-profile-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .agency-profile-logo {
        display: flex;
        justify-content: center;
    }
}

.listing-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.listing-card-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius);
}

.listing-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.neighborhood-link {
    position: relative;
    z-index: 2;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.neighborhood-link:hover {
    text-decoration: underline;
}

a.neighborhood-link.badge {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

a.neighborhood-link.badge:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.listing-card:has(.listing-card-link:hover) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.listing-card-image {
    aspect-ratio: 16/10;
    background: var(--primary-light);
    overflow: hidden;
    position: relative;
}

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

.listing-card-image .no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--primary);
    font-size: 2.5rem;
}

.listing-card-body {
    padding: 1rem 1.25rem;
}

.listing-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.listing-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.listing-card-link:hover .listing-card-title {
    text-decoration: underline;
}

.listing-card-cta {
    display: inline-block;
    margin-top: 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}

.listing-card-link:hover .listing-card-cta {
    text-decoration: underline;
}

.listing-card-submeta {
    padding: 0 1.25rem 0.65rem;
    font-size: 0.85rem;
}

.listing-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-transaction {
    background: #dbeafe;
    color: #1e40af;
}

/* List page layout */
.list-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

.filter-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 80px;
}

.filter-sidebar h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-group legend,
.filter-group h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 180px;
    overflow-y: auto;
}

.filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Detail page */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
}

.carousel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--primary-light);
    aspect-ratio: 16/9;
}

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

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.carousel-nav.prev { left: 1rem; }
.carousel-nav.next { right: 1rem; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem;
    background: var(--white);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary);
}

.detail-info {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.detail-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.detail-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.spec-item {
    background: var(--bg);
    padding: 0.75rem;
    border-radius: 8px;
}

.spec-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.spec-item .value {
    font-weight: 600;
    font-size: 1rem;
}

.contact-box {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.contact-box h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.dashboard-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.dashboard-table tr:last-child td {
    border-bottom: none;
}

.status-active {
    color: var(--primary);
    font-weight: 600;
}

.status-inactive {
    color: var(--text-muted);
}

.actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Auth pages */
.auth-card {
    max-width: 440px;
    margin: 2rem auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer-signup {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* Form page */
.form-page {
    max-width: 720px;
    margin: 0 auto;
}

.form-page .form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

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

.existing-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.existing-photos img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
}

.pagination .current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination a:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Footer */
.site-footer {
    background: var(--text);
    color: #d1d5db;
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
    .list-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        position: static;
    }

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

    .dashboard-table {
        overflow-x: auto;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 2rem 0;
    }

    .search-bar {
        grid-template-columns: 1fr;
    }

    .detail-specs {
        grid-template-columns: 1fr;
    }
}

/* Language dropdown */
.lang-dropdown {
    position: relative;
    flex-shrink: 0;
}

.lang-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--text);
}

.lang-dropdown-toggle:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.lang-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.lang-caret {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 140px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 200;
    overflow: hidden;
}

.lang-dropdown-menu[hidden] {
    display: none !important;
}

[dir="rtl"] .lang-dropdown-menu {
    left: auto;
    right: 0;
}

.lang-dropdown.open .lang-dropdown-menu {
    display: block;
}

.lang-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.lang-dropdown-menu a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.platform-disclaimer {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.75rem 0 0;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    line-height: 1.5;
}

.site-footer .platform-disclaimer {
    color: rgba(255, 255, 255, 0.75);
}

/* Credibility badges */
.verification-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cred-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.cred-verified {
    background: var(--primary-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.account-meta {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.account-meta dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    margin: 0;
}

.account-meta dt {
    font-weight: 600;
    color: var(--text);
}

.account-meta dd {
    margin: 0;
}

.cred-unverified {
    background: #f3f4f6;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.bookmark-btn {
    margin-top: 1rem;
}

/* Footer */
.footer-columns {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-col h3 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--white);
    margin: 0 0 0.75rem;
}

.footer-col a {
    display: block;
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
    color: var(--white);
}

.footer-tagline,
.footer-location {
    font-size: 0.88rem;
    color: #9ca3af;
    margin: 0 0 0.35rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.75rem 0 0;
}

.footer-cndp {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 2px solid var(--primary);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    z-index: 1000;
    padding: 1rem;
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cookie-banner-text {
    flex: 1;
    min-width: 260px;
}

.cookie-banner-text p {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cookie-learn {
    background: transparent;
    color: var(--text-muted);
    border: none;
}

/* Legal pages */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.legal-content h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.legal-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal-content section {
    margin-bottom: 1.75rem;
}

.legal-content h2 {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--primary-light);
}

.legal-content h3 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
}

.legal-content ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.legal-content li {
    margin-bottom: 0.35rem;
}

/* Arabic / RTL */
.lang-ar,
[dir="rtl"] {
    font-family: 'Noto Sans Arabic', 'Segoe UI', system-ui, sans-serif;
}

[dir="rtl"] .header-inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .legal-content ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

[dir="rtl"] .filter-checkboxes label {
    flex-direction: row-reverse;
}

[dir="rtl"] .stat-card,
[dir="rtl"] .listing-card-body,
[dir="rtl"] .detail-info {
    text-align: right;
}

[dir="rtl"] .carousel-nav.prev {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .carousel-nav.next {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .directory-table th,
[dir="rtl"] .directory-table td {
    text-align: right;
}

[dir="rtl"] .directory-table-actions {
    text-align: left;
}

[dir="rtl"] .cookie-banner-inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-banner-text {
    text-align: right;
}

/* Mobile navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text);
}

@media (max-width: 900px) {
    .mobile-nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.25rem;
        gap: 0.5rem;
        z-index: 150;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a,
    .nav-links .btn {
        width: 100%;
        text-align: center;
        padding: 0.65rem;
    }

    .header-inner {
        position: relative;
    }

    .search-bar {
        grid-template-columns: 1fr;
    }

    .hero-quick-links {
        flex-direction: column;
    }

    .find-agent-layout {
        grid-template-columns: 1fr;
    }

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

    .list-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        position: static;
    }
}

/* Transaction ribbons */
.listing-card-image {
    position: relative;
}

.tx-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: center;
    color: var(--white);
}

.tx-ribbon-sale { background: #dc2626; }
.tx-ribbon-rent { background: #2563eb; }
.tx-ribbon-lcd { background: #7c3aed; }

.badge-sale, .hero-quick-sale { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.badge-rent, .hero-quick-rent { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }
.badge-lcd { background: #f5f3ff; color: #5b21b6; border: 1px solid #c4b5fd; }

.detail-tx-banner {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 1.25rem;
    color: var(--white);
}

.detail-tx-banner-sale { background: linear-gradient(90deg, #dc2626, #b91c1c); }
.detail-tx-banner-rent { background: linear-gradient(90deg, #2563eb, #1d4ed8); }
.detail-tx-banner-lcd { background: linear-gradient(90deg, #7c3aed, #6d28d9); }

.detail-price small,
.listing-card-price small {
    font-size: 0.65em;
    font-weight: 500;
    opacity: 0.85;
}

.listing-card-agency {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Hero search expand */
.search-expand-wrap {
    grid-column: 1 / -1;
}

.search-expand-toggle {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.search-expand-panel {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border);
}

.search-expand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.search-advanced-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.hero-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.hero-quick-link {
    padding: 0.45rem 1rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.35);
}

.hero-quick-link:hover {
    background: rgba(255,255,255,0.3);
    color: var(--white);
}

.home-sections-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Agency directory */
.agency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.agency-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.agency-card-link {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    color: inherit;
    flex: 1;
}

.agency-card-link:hover {
    color: inherit;
}

.agency-card-logo img,
.agency-card-logo .agency-logo-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.agency-card-body h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.agency-card-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.agency-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.agency-card-tags .badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}

.agency-card-commission,
.agency-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.agency-card-cta {
    margin: 0 1rem 1rem;
    text-align: center;
}

.find-agent-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 1.5rem;
    align-items: start;
}

.page-hero-compact {
    margin-bottom: 1.5rem;
}

.page-hero-compact .btn {
    margin-top: 0.75rem;
}

.agency-commission-box {
    background: var(--primary-light);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}

.agency-services-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0;
}

.agency-contact-box {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
}

/* Agency profile layout */
.agency-profile-layout {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 340px);
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 2rem;
}

.agency-profile-name {
    font-size: 1.65rem;
    margin: 0.35rem 0 0.5rem;
    color: var(--text);
}

.agency-profile-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-top: 1rem;
    box-shadow: var(--shadow);
}

.agency-profile-section h2 {
    font-size: 1rem;
    margin: 0 0 0.75rem;
    color: var(--text);
}

.agency-profile-sidebar {
    position: sticky;
    top: 1rem;
}

.agency-contact-panel {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 1.35rem;
    box-shadow: var(--shadow);
}

.agency-contact-panel h2 {
    font-size: 1.15rem;
    margin: 0 0 0.35rem;
    color: var(--text);
}

.agency-contact-lead {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.agency-contact-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.agency-contact-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg);
    transition: border-color 0.15s, background 0.15s;
}

.agency-contact-btn strong {
    display: block;
    font-size: 0.92rem;
    color: var(--primary-dark);
}

.agency-contact-btn small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
}

.agency-contact-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.agency-contact-whatsapp {
    border-color: #25d366;
    background: #f0fdf4;
}

.agency-contact-whatsapp:hover {
    background: #dcfce7;
    border-color: #16a34a;
}

.agency-contact-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
}

.agency-contact-stat {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.agency-contact-stat strong {
    display: block;
    font-size: 1.75rem;
    color: var(--primary);
}

.agency-contact-stat span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.agency-contact-empty {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.agency-listings-header {
    margin-top: 0.5rem;
    scroll-margin-top: 5rem;
}

.agency-listings-hint {
    margin: -0.5rem 0 1.25rem;
}

.agency-contact-stat-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.agency-contact-stat-link:hover {
    background: var(--primary-light);
    border-radius: 8px;
}

.agency-contact-stat-action {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}

.similar-section {
    margin-top: 2.5rem;
}

.similar-section-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: -0.5rem 0 1rem;
}

@media (max-width: 900px) {
    .agency-profile-layout {
        grid-template-columns: 1fr;
    }

    .agency-profile-sidebar {
        position: static;
        order: -1;
    }
}

.agency-specialty {
    font-size: 0.88rem;
    margin: 0.35rem 0;
}

.tx-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Agency templates */
.agency-template-modern .agency-profile-header {
    border-left: 4px solid #2563eb;
}

.agency-template-pro .agency-profile-header {
    background: linear-gradient(135deg, #0f2922 0%, #1a3d32 100%);
    color: var(--white);
}

.agency-template-pro .agency-profile-header .agency-bio,
.agency-template-pro .agency-profile-header .agency-contact,
.agency-template-pro .agency-profile-header .form-help {
    color: rgba(255,255,255,0.85);
}

/* Neighborhood hub */
.neighborhood-hub {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.neighborhood-hub-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.neighborhood-hub-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

.neighborhood-hub-count {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0.75rem;
}

.neighborhood-hub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* SEO guide */
.seo-section {
    margin-bottom: 2.5rem;
}

.seo-section h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.seo-tx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.seo-tx-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    box-shadow: var(--shadow);
}

.seo-tx-sale { border-left: 3px solid #b91c1c; }
.seo-tx-rent { border-left: 3px solid #1d4ed8; }

/* Agency dashboard helpers */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.compact-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.35rem;
    font-size: 0.88rem;
}

.neighborhood-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.agency-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.agency-stats .stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.agency-stats .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.agency-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

/* Directory & SEO pages */
.directory-page-header {
    margin-bottom: 1.75rem;
}

.directory-page-header h1 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.directory-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 52rem;
    line-height: 1.55;
}

.directory-stats-line {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.directory-table-wrap {
    overflow-x: auto;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.directory-table th,
.directory-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.directory-table th {
    background: var(--bg);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

.directory-table-name {
    font-weight: 600;
    color: var(--text);
}

.count-link {
    font-weight: 600;
    text-decoration: none;
}

.count-sale { color: #dc2626; }
.count-rent { color: #2563eb; }
.count-zero { color: #d1d5db; }

.directory-table-actions {
    text-align: right;
    white-space: nowrap;
}

.directory-page-aside {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.directory-page-aside h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.seo-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    padding: 0.75rem 0 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.seo-stats-bar strong {
    color: var(--primary);
    font-size: 1.1rem;
}

.seo-neighborhood-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.seo-neighborhood-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    background: var(--white);
}

.seo-neighborhood-item:hover {
    border-color: var(--primary);
}

.seo-neighborhood-name {
    font-weight: 600;
    color: var(--primary-dark);
}

.seo-neighborhood-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.seo-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Find agent */
.find-agent-sidebar {
    position: sticky;
    top: 1rem;
}

.find-agent-form {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.find-agent-form h2 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.find-agent-field {
    margin-bottom: 1rem;
}

.find-agent-field h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.find-agent-checks {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.find-agent-checks label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
}

.find-agent-checks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
}

.find-agent-neighborhoods {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.find-agent-intro-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.find-agent-steps {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
    line-height: 1.6;
}

.shortlist-panel {
    margin-top: 1rem;
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 1rem;
}

.shortlist-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.shortlist-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
}

.btn-link-danger {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.25rem;
}

.agency-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agency-result-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.agency-result-main {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.agency-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.match-reasons {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.match-reasons li {
    margin-bottom: 0.2rem;
}

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

    .find-agent-layout {
        grid-template-columns: 1fr;
    }

    .find-agent-sidebar {
        position: static;
    }
}

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

/* Listing gallery */
.gallery-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    aspect-ratio: 4/3;
}

.gallery-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-slide[hidden] {
    display: none;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2;
}

.gallery-prev { left: 0.75rem; }
.gallery-next { right: 0.75rem; }

.gallery-counter {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.gallery-thumb {
    flex: 0 0 72px;
    height: 54px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    background: var(--bg);
}

.gallery-thumb.active {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-agency-name a {
    font-weight: 700;
    color: var(--primary-dark);
}

/* Listing card agency link (outside main link) */
.listing-card-agency {
    position: relative;
    z-index: 2;
    display: block;
    padding: 0 1rem 0.85rem;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.listing-card-agency:hover {
    text-decoration: underline;
}

.photo-count-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
}

/* Pagination */
.pagination-info {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 0 0.5rem;
    white-space: nowrap;
}

.pagination-edge {
    font-weight: 700;
}

/* Guide articles */
.guide-category-block {
    margin-bottom: 1.5rem;
}

.guide-category-block h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.guide-article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-article-list li {
    border-bottom: 1px solid var(--border);
}

.guide-article-list a {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.65rem 0;
    text-decoration: none;
}

.guide-article-list a strong {
    color: var(--primary-dark);
}

.guide-article-list a span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.guide-article-body {
    line-height: 1.7;
    max-width: 48rem;
}

.guide-article-footer {
    margin-top: 2rem;
}

.seo-section-compact {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Agency team & agents */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.team-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.team-card {
    display: flex;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.team-card-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.team-card-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    font-size: 1.75rem;
}

.team-card-role {
    font-size: 0.85rem;
    color: var(--primary);
    margin: 0.15rem 0;
}

.team-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.2rem 0;
}

.agent-card {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.agent-card-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.agent-card-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    font-size: 1.4rem;
}

.agent-card-body h4 {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
}

.agent-card-body h4 a {
    color: var(--text);
    text-decoration: none;
}

.agent-card-body h4 a:hover {
    color: var(--primary);
}

.agent-card-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.agent-card-contact {
    font-size: 0.8rem;
    margin: 0.15rem 0 0;
}

.listing-agents-box {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--radius);
}

.listing-agents-box h3 {
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
}

.listing-agents-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.agent-public-header {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

.agent-public-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-public-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    font-size: 2.5rem;
}

.agent-public-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .agent-public-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .agent-public-photo {
        margin: 0 auto;
    }
}