:root {
    --navy-deep: #0d1429;
    --navy: #14213d;
    --navy-2: #1c2947;
    --gold: #c9a44f;
    --bg: #f7f9fa;
    --border: #e5e8f0;
    --muted: #808594;
    --muted-2: #596173;
}

* { box-sizing: border-box; }

html { direction: rtl; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--navy);
    font-family: 'Inter', 'Vazirmatn', sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .heading {
    font-family: 'Vazirmatn', sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; }

.container {
    max-width: 1512px;
    margin: 0 auto;
}

/* Promo strip */
.promo-strip {
    background: var(--gold);
    color: var(--navy-deep);
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
}

/* Navbar */
.navbar {
    background: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}

.nav-left .login-link {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.cta-btn {
    background: var(--gold);
    color: var(--navy-deep);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.cta-btn .plus { font-weight: 800; font-size: 14px; }

.nav-links {
    display: flex;
    gap: 32px;
    font-size: 13px;
    font-weight: 500;
    color: #ccd1de;
    flex-wrap: wrap;
}

.nav-links .active { color: var(--gold); font-weight: 600; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
}

.brand-col .brand-name {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 900;
    font-size: 18px;
    color: #fff;
}

.brand-col .brand-sub {
    color: var(--gold);
    font-size: 9px;
}

.brand-crest {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-crest img {
    width: 48px;
    height: 48px;
}

/* Hero search */
.hero-search {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 40px 32px 48px;
    text-align: center;
}

.hero-search h1 {
    font-weight: 900;
    font-size: 26px;
    color: #fff;
    margin: 0;
}

.search-bar {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(201, 164, 79, 0.3);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.search-select {
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path d="M0 0l5 6 5-6z" fill="%23808594"/></svg>') no-repeat left 14px center;
    height: 48px;
    width: 180px;
    border-radius: 10px;
    padding: 0 30px 0 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--navy);
    border: none;
    appearance: none;
    font-family: inherit;
    text-align: right;
    cursor: pointer;
}

.search-caret { color: var(--muted); font-size: 10px; }

.search-advanced {
    background: none;
    color: #d9dbe5;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.search-advanced:hover { color: #fff; }

.search-btn {
    background: var(--gold);
    height: 48px;
    width: 140px;
    border-radius: 10px;
    color: var(--navy-deep);
    font-size: 14px;
    font-weight: 600;
}

/* Listings */
.listings-header {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 48px 32px 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.listings-header h2 {
    font-weight: 900;
    font-size: 26px;
    color: var(--navy);
    margin: 0;
}

.sort-by {
    color: var(--muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-by select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--navy);
    font-family: inherit;
    background: #fff;
}

.search-advanced-panel[hidden] { display: none; }

.search-advanced-panel {
    width: 100%;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 4px;
}

.search-advanced-panel input {
    height: 44px;
    width: 200px;
    border-radius: 10px;
    border: 1px solid rgba(201, 164, 79, 0.3);
    background: rgba(255, 255, 255, 0.9);
    padding: 0 14px;
    font-size: 13px;
    text-align: right;
    font-family: inherit;
    color: var(--navy);
}

.listings-grid {
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    padding: 0 32px 48px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 24px 0 rgba(128, 102, 38, 0.08);
    width: 472px;
    max-width: 100%;
    overflow: hidden;
}

.card-image {
    height: 230px;
    background-color: #2e3d5c;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px;
    position: relative;
    transition: transform 0.3s ease;
}

.card:hover .card-image { transform: scale(1.02); }
.card { transition: box-shadow 0.2s ease; }
.card:hover { box-shadow: 0 16px 32px 0 rgba(128, 102, 38, 0.16); }

.card-tag {
    background: var(--gold);
    color: var(--navy);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
}

.card-price {
    color: #fff;
    font-weight: 700;
    font-size: 19px;
}

.card-body {
    padding: 18px;
    padding-top: 18px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.card-title {
    color: var(--navy);
    font-size: 15px;
    font-weight: 600;
}

.spec-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.spec {
    background: #f5f7fa;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
}

.card-divider {
    height: 1px;
    width: 100%;
    background: #edf0f5;
}

.loc-row {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.loc-row .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}

.card-agent-row {
    border-top: 1px solid #edf0f5;
    margin-top: 4px;
    padding-top: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.card-agent-label { color: var(--muted); }

.card-agent-link {
    color: var(--muted-2);
    font-weight: 600;
}

.card-agent-link:hover { color: var(--gold); text-decoration: underline; }

/* Agent public profile page — identity block (photo+name) as a compact,
   natively-RTL profile header, matching the rest of the site (sidebar/text
   on the right, content flowing right-to-left). No forced direction here:
   .agent-hero-top is a plain RTL row, so the photo (first child) lands on
   the right and the namebox (second child) sits immediately to its left.
   .agent-hero-top is ONLY the photo + name/badges, so align-items:center
   there centers the name against the photo itself, not against the whole
   (much taller) contact/bio/stats block below it — that block is a
   separate row (.agent-hero-below) that flows under the top row instead,
   inset from the right by the photo's width so it continues the name
   column rather than floating under the photo. */
.agent-hero {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.agent-hero-top {
    display: flex;
    align-items: center;
    gap: 20px;
}

.agent-hero-photo {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: rgba(201, 164, 79, 0.15);
    border: 3px solid var(--gold);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 6px rgba(201, 164, 79, 0.1);
    color: var(--gold);
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 900;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.agent-hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.agent-hero-namebox {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agent-hero-namebox h1 { color: #fff; font-weight: 900; font-size: 26px; margin: 0; }

.agent-hero-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-start; }
.agent-hero-badges .role {
    color: var(--navy-deep);
    background: var(--gold);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}
.agent-hero-badges .office { color: #ccd1de; font-size: 13px; }

.agent-hero-below {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-right: 152px; /* photo width (132px) + its gap (20px) — continues under the name column */
}

.agent-contact-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }

.agent-contact-btn {
    background: var(--gold);
    color: var(--navy-deep);
    padding: 11px 26px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    direction: ltr;
    display: inline-block;
    box-shadow: 0 6px 16px rgba(201, 164, 79, 0.25);
}

.agent-hero-bio {
    color: #b2b8c4;
    font-size: 13px;
    line-height: 2;
    max-width: 560px;
    margin: 0;
}

.agent-stats-row { display: flex; gap: 16px; justify-content: flex-start; }
.agent-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 164, 79, 0.25);
    border-radius: 14px;
    padding: 14px 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.agent-stat .value { color: #fff; font-weight: 800; font-size: 22px; }
.agent-stat .label { color: var(--gold); font-size: 11px; }

.agent-listings-header {
    padding: 40px 32px 20px;
    background: #fff;
    text-align: center;
}
.agent-listings-header h2 { font-weight: 900; font-size: 22px; color: var(--navy); margin: 0; }
.agent-empty { padding: 0 32px 48px; color: #808594; font-size: 13px; background: #fff; text-align: center; }

/* Why Surin */
.why-surin {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 36px;
    padding: 56px 32px;
}

.why-surin h2 {
    font-weight: 900;
    font-size: 24px;
    color: var(--navy);
    margin: 0;
}

.feat-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
}

.feat-card {
    background: #fff;
    border: 1px solid #ebedf2;
    border-radius: 14px;
    padding: 24px 22px;
    width: 300px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(201, 164, 79, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feat-icon .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
}

.feat-card h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--navy);
    margin: 0;
}

.feat-card p {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
    line-height: 1.7;
    text-align: right;
}

/* Footer */
.footer {
    background: var(--navy-deep);
    padding: 48px 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.foot-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.foot-links {
    display: flex;
    gap: 28px;
    color: #b2b8c4;
    font-size: 12px;
    flex-wrap: wrap;
}

.foot-links a { color: #b2b8c4; }
.foot-links a:hover { color: var(--gold); }
.nav-links a:hover { color: #fff; }

.stub-page {
    min-height: 50vh;
    padding: 80px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: #fff;
}

.stub-page h1 {
    font-weight: 900;
    font-size: 28px;
    color: var(--navy);
    margin: 0;
}

.stub-page p {
    max-width: 640px;
    color: var(--muted-2);
    font-size: 14px;
    line-height: 2;
    margin: 0;
}

.f-btn-blue-link {
    background: var(--gold);
    color: var(--navy-deep);
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

.foot-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.foot-brand-crest {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.foot-brand-crest img {
    width: 40px;
    height: 40px;
}

.foot-brand-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.foot-brand .brand-name {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 900;
    font-size: 18px;
    color: var(--gold);
}

.foot-brand .brand-sub {
    color: #b2b8c4;
    font-size: 10px;
}

.foot-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.copyright {
    color: #8c91a1;
    font-size: 11px;
    text-align: center;
    margin: 0;
}

/* Tablet: the card's fixed 472px width leaves no room for a second column
   once the viewport drops below ~1030px (2 * 472px + gap + side padding),
   so it was falling straight from 3-4 columns to a single very wide column.
   Shrink to a percentage-based width so two cards keep fitting per row. */
@media (max-width: 1040px) {
    .card { width: calc(50% - 12px); }
}

@media (max-width: 640px) {
    .navbar, .hero-search, .listings-header, .listings-grid, .why-surin, .footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .card { width: 100%; }
    .agent-hero { padding: 32px 16px; gap: 16px; }
    .agent-hero-below { margin-right: 0; }
}

.card-image { text-decoration: none; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--gold); }

/* ---------- Property detail page ---------- */

.pd-gallery {
    position: relative;
    width: 100%;
    height: 480px;
    background: #1c2947;
    overflow: hidden;
}
.pd-gallery-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.pd-gallery-slide.active { opacity: 1; }
.pd-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(20,33,61,0.4);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
}
.pd-gallery-arrow.prev { right: 24px; }
.pd-gallery-arrow.next { left: 24px; }
.pd-gallery-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20,33,61,0.6);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2;
}

.pd-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 40px 60px;
}

.pd-top { margin-bottom: 8px; }
.pd-top-icons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 12px;
}
.pd-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--navy);
    font-size: 16px;
    cursor: pointer;
}
.pd-icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.pd-icon-btn.is-fav { color: #c0392b; border-color: #c0392b; }
.pd-top-price { color: var(--navy); font-size: 26px; font-weight: 800; }
.pd-title { color: var(--navy); font-size: 22px; font-weight: 700; margin: 6px 0; }
.pd-address { color: var(--muted); font-size: 13px; }

.pd-grid {
    display: grid;
    grid-template-columns: 2.1fr 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .pd-grid { grid-template-columns: 1fr; }
}

.pd-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pd-sidebar { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.pd-badge {
    display: inline-block;
    align-self: flex-start;
    background: #fbf6ea;
    color: #8a6d1d;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
}

.pd-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 10px 24px 0 rgba(128, 102, 38, 0.06);
}
.pd-card h2 { color: var(--navy); font-size: 16px; font-weight: 700; margin: 0 0 14px; }

.pd-overview-list { margin: 0; padding-inline-start: 20px; color: #3b4256; font-size: 13px; line-height: 2; }

.pd-agent-card { display: flex; flex-direction: column; gap: 10px; }
.pd-agent-info { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.pd-agent-label { color: var(--muted); }
.pd-agent-name { color: var(--navy); font-weight: 700; text-decoration: none; }
.pd-agent-name:hover { color: var(--gold); }
.pd-agent-phone-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #3b4256; }
.pd-reveal-btn {
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.pd-details-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--border);
}
.pd-detail-cell {
    display: flex;
    justify-content: space-between;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.pd-detail-cell:nth-child(odd) { padding-inline-end: 16px; }
.pd-detail-cell .k { color: var(--muted); }
.pd-detail-cell .v { color: var(--navy); font-weight: 600; }

.pd-amenities { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.pd-amenity { color: #1a7a4c; font-size: 13px; font-weight: 600; }

.pd-recent-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}
.pd-recent-item:last-child { border-bottom: none; }
.pd-recent-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: #2e3d5c;
    flex-shrink: 0;
}
.pd-recent-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pd-recent-title { color: var(--navy); font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-recent-price { color: var(--gold); font-size: 12px; font-weight: 700; }

.pd-message-form { display: flex; flex-direction: column; gap: 10px; }
.pd-message-form input, .pd-message-form textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
}
.pd-message-submit {
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-weight: 700;
    cursor: pointer;
}
.pd-message-submit:hover { background: var(--gold); color: var(--navy); }
.pd-sent-ok { color: #1a7a4c; font-size: 13px; }

/* ---------- Submit listing page ---------- */

.sl-header { margin-bottom: 20px; }
.sl-header h1 { color: var(--navy); font-size: 24px; margin: 0 0 8px; }
.sl-header p { color: var(--muted); font-size: 13px; margin: 0; }

.sl-error {
    background: #fdecea;
    color: #a32020;
    border: 1px solid #f3c2bd;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

.sl-success {
    background: #eaf7ef;
    border: 1px solid #bfe6cc;
    border-radius: 16px;
    padding: 28px;
}
.sl-success h2 { color: #1a7a4c; margin: 0 0 10px; }
.sl-success p { color: #3b4256; font-size: 13px; line-height: 1.9; margin: 0; }
.sl-success a { color: var(--gold); }

.sl-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
}
.sl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 700px) { .sl-grid { grid-template-columns: 1fr; } }
.sl-field { display: flex; flex-direction: column; gap: 6px; }
.sl-field-wide { grid-column: 1 / -1; }
.sl-field label { color: var(--navy); font-size: 12px; font-weight: 600; }
.sl-field input, .sl-field select, .sl-field textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
}
.sl-owner-row { display: flex; gap: 10px; }
.sl-owner-row input { flex: 1; }
.sl-features { display: flex; flex-wrap: wrap; gap: 10px; }
.sl-feature-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f7fa;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}
.sl-submit {
    margin-top: 22px;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
}
.sl-submit:hover { opacity: 0.9; }

/* ---------- Footer branch map ---------- */

.foot-branches {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.foot-branches-title {
    color: var(--gold);
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.foot-branches-body {
    display: flex;
    gap: 24px;
    align-items: stretch;
    flex-wrap: wrap;
}

.foot-branches-map {
    flex: 1 1 360px;
    min-width: 260px;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(201, 164, 79, 0.35);
    background: var(--navy);
}

.foot-branches-map .leaflet-tile-pane {
    filter: grayscale(0.15) brightness(0.95);
}

.foot-branches-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    min-width: 180px;
}

.foot-branches-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
}

.foot-branches-list .fb-name {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.foot-branches-list .fb-link {
    color: var(--gold);
    font-size: 12px;
    text-decoration: none;
    width: fit-content;
}

.foot-branches-list .fb-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .foot-branches-body {
        flex-direction: column;
    }
    .foot-branches-map {
        height: 220px;
        min-width: 0;
    }
}

/* ---------- Listings pagination ---------- */
.pagination {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 32px 24px;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.page-link:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.page-link.page-nav {
    font-weight: 500;
    padding: 0 16px;
}

.page-link.is-current {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-deep);
    cursor: default;
}

.page-link.is-disabled {
    color: #c3c7d3;
    border-color: var(--border);
    cursor: default;
    pointer-events: none;
}

.page-ellipsis {
    color: var(--muted);
    font-size: 13px;
    padding: 0 4px;
}

.pagination-summary {
    background: #fff;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: 0;
    padding: 0 32px 32px;
}

.infinite-scroll-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    padding: 24px 0;
}
.infinite-scroll-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: infiniteScrollSpin 0.7s linear infinite;
}
@keyframes infiniteScrollSpin { to { transform: rotate(360deg); } }
.infinite-scroll-sentinel { height: 1px; background: #fff; }

/* ---------- Agents directory page (/agents) ---------- */
.ag-breadcrumb {
    background: #fff;
    padding: 18px 32px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}
.ag-breadcrumb a { color: var(--muted); }
.ag-breadcrumb a:hover { color: var(--gold); }
.ag-breadcrumb .sep { color: #c3c7d3; }
.ag-breadcrumb .current { color: var(--navy); font-weight: 600; }

.ag-toolbar {
    background: #fff;
    padding: 14px 32px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.ag-toolbar h1 { font-weight: 900; font-size: 26px; color: var(--navy); margin: 0; }

.ag-toolbar-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.ag-view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    background: #fff;
}
.ag-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--muted);
}
.ag-view-btn:hover { color: var(--navy); }
.ag-view-btn.is-active { background: var(--navy); color: #fff; }

.ag-wrap {
    max-width: 1512px;
    margin: 0 auto;
    background: #fff;
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding: 0 32px 56px;
}

.ag-main { flex: 1 1 auto; min-width: 0; }

.agents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 8px;
}

.agent-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 10px 24px 0 rgba(128, 102, 38, 0.06);
    transition: box-shadow 0.2s ease;
}
.agent-card:hover { box-shadow: 0 16px 32px 0 rgba(128, 102, 38, 0.14); }

.ac-photo {
    position: relative;
    width: 92px;
    height: 92px;
    flex-shrink: 0;
}
.ac-photo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(20, 33, 61, 0.06);
    border: 2px solid rgba(201, 164, 79, 0.4);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ac-photo img { width: 100%; height: 100%; object-fit: cover; }

.ac-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--navy-deep);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(201, 164, 79, 0.35);
}

.ac-body { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; }
.ac-name { font-weight: 800; font-size: 16px; color: var(--navy); margin: 0; }
.ac-role {
    color: var(--muted-2);
    font-size: 11px;
    background: #f5f7fa;
    padding: 3px 10px;
    border-radius: 6px;
}

.ac-phone-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted-2);
    direction: ltr;
}
.ac-reveal-btn {
    background: var(--gold);
    color: var(--navy-deep);
    border: none;
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    direction: rtl;
}
.ac-reveal-btn:hover { filter: brightness(1.05); }

.ac-email-row { color: var(--muted); font-size: 11px; direction: ltr; }

.ac-link {
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}
.ac-link:hover { text-decoration: underline; }

/* List view: each card becomes a horizontal row */
.agents-grid.is-list { grid-template-columns: 1fr; }
.agents-grid.is-list .agent-card {
    flex-direction: row;
    text-align: right;
    align-items: center;
    gap: 20px;
    padding: 16px 22px;
}
.agents-grid.is-list .ac-body { align-items: flex-start; margin-top: 0; }
.agents-grid.is-list .ac-link { margin-top: 4px; }

.ag-main .pagination,
.ag-main .pagination-summary {
    background: transparent;
    padding-left: 0;
    padding-right: 0;
}

.ag-sidebar {
    flex: 0 0 300px;
    background: #fbfbfc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    position: sticky;
    top: 20px;
}
.ag-sidebar h3 { font-weight: 800; font-size: 15px; color: var(--navy); margin: 0 0 14px; }
.ag-sidebar-empty { color: var(--muted); font-size: 12px; margin: 0; }

.ag-recent-list { display: flex; flex-direction: column; gap: 12px; }
.ag-recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ag-recent-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background-color: #e5e8f0;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.ag-recent-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ag-recent-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ag-recent-price { font-size: 11px; color: var(--gold); font-weight: 700; }
.ag-recent-item:hover .ag-recent-title { color: var(--gold); }

@media (max-width: 900px) {
    .ag-wrap { flex-direction: column; }
    .ag-sidebar { flex: 1 1 auto; width: 100%; position: static; }
    .agents-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ag-breadcrumb, .ag-toolbar, .ag-wrap { padding-left: 16px; padding-right: 16px; }
    .agents-grid.is-list .agent-card { flex-direction: column; text-align: center; }
    .agents-grid.is-list .ac-body { align-items: center; }
}

/* ---------- About page (/about) ---------- */

.ab-page-hero {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    padding: 44px 32px;
    text-align: center;
}
.ab-page-hero h1 { color: #fff; font-weight: 900; font-size: 26px; margin: 0; }

.ab-section { padding: 56px 32px; background: #fff; }
.ab-section.is-alt { background: var(--bg); }
.ab-section-inner { max-width: 1140px; margin: 0 auto; }
.ab-section h2 { font-weight: 900; font-size: 22px; color: var(--navy); margin: 0 0 28px; text-align: center; }

/* Top consultants carousel */
.ab-consultants-viewport { position: relative; min-height: 320px; }
.ab-consultant-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.ab-consultant-slide.active { opacity: 1; pointer-events: auto; position: relative; }
.ab-consultant-photo {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    overflow: hidden;
    background: rgba(201, 164, 79, 0.12);
    box-shadow: 0 10px 24px rgba(128, 102, 38, 0.18);
}
.ab-consultant-photo img { width: 100%; height: 100%; object-fit: cover; }
.ab-consultant-stars { color: var(--gold); font-size: 16px; letter-spacing: 2px; }
.ab-consultant-quote { max-width: 620px; color: var(--muted-2); font-size: 14px; line-height: 2; margin: 0; }
.ab-consultant-name { color: var(--navy); font-weight: 700; font-size: 14px; }
.ab-consultant-phone { color: var(--gold); font-weight: 700; direction: ltr; font-size: 13px; }
.ab-consultant-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.ab-consultant-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    padding: 0;
}
.ab-consultant-dot.active { background: var(--gold); }

/* Vision */
.ab-vision-row { display: flex; align-items: center; gap: 40px; }
.ab-vision-illustration {
    flex: 0 0 220px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(201, 164, 79, 0.28), rgba(20, 33, 61, 0.05));
    border: 1px solid rgba(201, 164, 79, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ab-vision-illustration svg { width: 96px; height: 96px; }
.ab-vision-text { flex: 1 1 auto; min-width: 0; }
.ab-vision-text h2 { text-align: right; margin-bottom: 16px; }
.ab-vision-text p { color: var(--muted-2); font-size: 14px; line-height: 2.1; margin: 0; }

@media (max-width: 760px) {
    .ab-vision-row { flex-direction: column; text-align: center; }
    .ab-vision-text h2 { text-align: center; }
    .ab-vision-illustration { flex-basis: auto; }
}

/* Gold CTA band */
.ab-cta-band {
    background: linear-gradient(120deg, var(--gold) 0%, #d9b862 100%);
    padding: 44px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    text-align: center;
}
.ab-cta-band h2 { color: var(--navy-deep); font-size: 20px; font-weight: 800; margin: 0; max-width: 640px; }
.ab-cta-band .ab-cta-btn {
    background: var(--navy-deep);
    color: #fff;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.ab-cta-band .ab-cta-btn:hover { background: var(--navy); }

/* ---------- Blog (/blog) ---------- */

.blog-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.blog-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 24px 0 rgba(128, 102, 38, 0.08);
    width: 360px;
    max-width: 100%;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.blog-card:hover { box-shadow: 0 16px 32px 0 rgba(128, 102, 38, 0.16); }

.blog-card-image {
    height: 200px;
    background-color: var(--navy-2);
    background-size: cover;
    background-position: center;
}

.blog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.blog-tag {
    background: rgba(201, 164, 79, 0.14);
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
}

.blog-card-title { color: var(--navy); font-size: 16px; font-weight: 800; margin: 0; line-height: 1.6; }
.blog-card-excerpt { color: var(--muted-2); font-size: 13px; line-height: 1.9; margin: 0; }
.blog-card-date { color: var(--muted); font-size: 12px; }

.blog-card-readmore {
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}
.blog-card-readmore:hover { color: var(--navy); }

/* Single article */
.blog-article { max-width: 760px; margin: 0 auto; }

.blog-article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }

.blog-article-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 10px 24px 0 rgba(128, 102, 38, 0.08);
}
.blog-article-image img, .blog-article-image video { display: block; width: 100%; height: auto; }

.blog-article-body { color: var(--navy); font-size: 15px; line-height: 2.1; }
.blog-article-body p { margin: 0 0 18px; }
.blog-article-body ul { margin: 0 0 18px; padding-inline-start: 22px; list-style: disc; display: flex; flex-direction: column; gap: 6px; }
.blog-article-body strong { color: var(--navy-deep); }

.blog-back-link { display: inline-block; margin-top: 32px; color: var(--gold); font-weight: 700; font-size: 14px; }
.blog-back-link:hover { color: var(--navy); }

@media (max-width: 480px) {
    .blog-article-meta { justify-content: center; }
}

/* About Surin company text */
.ab-company p { max-width: 860px; margin: 0 auto; color: var(--muted-2); font-size: 14px; line-height: 2.2; text-align: center; }

/* Certificates */
.ab-cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.ab-cert-grid img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(128, 102, 38, 0.08);
}
@media (max-width: 900px) { .ab-cert-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ab-cert-grid { grid-template-columns: 1fr; } }

/* Branches (About page — bigger version of the footer's branch map) */
.ab-branch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.ab-branch-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px 0 rgba(128, 102, 38, 0.08);
}
.ab-branch-map { height: 220px; background: var(--navy); }
.ab-branch-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.ab-branch-name { color: var(--navy); font-weight: 800; font-size: 15px; }
.ab-branch-line { display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 13px; }
.ab-branch-line .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.ab-branch-line.phone { direction: ltr; justify-content: flex-end; font-weight: 700; color: var(--navy); }
@media (max-width: 760px) { .ab-branch-grid { grid-template-columns: 1fr; } }

/* ---------- Contact page (/contact) ---------- */

.ct-page-hero {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    padding: 44px 32px;
    text-align: center;
}
.ct-page-hero h1 { color: #fff; font-weight: 900; font-size: 26px; margin: 0; }

.ct-maps-section { padding: 40px 32px 0; background: #fff; }
.ct-maps-inner { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.ct-map-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.ct-map-card h3 { margin: 0; padding: 14px 18px; background: var(--navy-deep); color: #fff; font-size: 14px; }
.ct-map { height: 220px; background: var(--navy); }
@media (max-width: 760px) { .ct-maps-inner { grid-template-columns: 1fr; } }

.ct-body-section { padding: 40px 32px 60px; background: #fff; }
.ct-body-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 900px) { .ct-body-inner { grid-template-columns: 1fr; } }

.ct-info-panel {
    background: linear-gradient(135deg, var(--gold) 0%, #d9b862 100%);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.ct-info-panel h2 { color: var(--navy-deep); font-size: 18px; font-weight: 800; margin: 0; }
.ct-info-branch { display: flex; flex-direction: column; gap: 6px; }
.ct-info-line { display: flex; align-items: flex-start; gap: 8px; color: var(--navy-deep); font-size: 13px; line-height: 1.8; }
.ct-info-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--navy-deep); margin-top: 6px; flex-shrink: 0; }
.ct-info-line.phone { direction: ltr; font-weight: 700; }
.ct-info-divider { height: 1px; background: rgba(20, 33, 61, 0.25); }
.ct-instagram { color: var(--navy-deep); font-weight: 700; font-size: 13px; text-decoration: underline; direction: ltr; text-align: right; }

.ct-form-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 24px 0 rgba(128, 102, 38, 0.08);
}
.ct-form-panel h2 { color: var(--navy); font-size: 18px; font-weight: 800; margin: 0 0 20px; }
.ct-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .ct-form-grid { grid-template-columns: 1fr; } }
.ct-field { display: flex; flex-direction: column; gap: 6px; }
.ct-field.wide { grid-column: 1 / -1; }
.ct-field label { color: var(--navy); font-size: 12px; font-weight: 600; }
.ct-field input, .ct-field textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
}
.ct-field textarea { resize: vertical; min-height: 110px; }
.ct-submit {
    margin-top: 18px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 30px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}
.ct-submit:hover { background: var(--gold); color: var(--navy); }
.ct-error {
    background: #fdecea;
    color: #a32020;
    border: 1px solid #f3c2bd;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}
.ct-success {
    background: #eaf7ef;
    border: 1px solid #bfe6cc;
    color: #1a7a4c;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

/* Profile-completion popup (account_profile_modal_if_needed()) — dismissible,
   reappears next login until name+email are both filled in. */
.pc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 22, 45, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.pc-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 400px;
    width: 100%;
    text-align: right;
}
.pc-modal h2 { margin: 0 0 8px; font-size: 18px; font-weight: 900; color: var(--navy); }
.pc-modal p { margin: 0 0 18px; font-size: 13px; color: #666; line-height: 1.8; }
.pc-modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.pc-modal-actions .sl-submit { flex: 1; margin: 0; }
.pc-modal-later {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #808594;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0 8px;
}
