:root {
    --primary: #0b6b3a;
    --primary-dark: #084d2a;
    --gold: #c8932a;
    --bg: #f7f8f4;
    --card-bg: #ffffff;
    --text: #23291f;
    --muted: #6b7568;
    --border: #e2e5dc;
    --danger: #b02a2a;
    --success: #0b6b3a;
    --radius: 10px;
}
* { box-sizing: border-box; }
html {
    /* Prevents any accidentally-wide content (e.g. a data table on a
       narrow phone screen) from making the WHOLE page scroll sideways —
       which on mobile browsers can drag position:fixed elements like the
       floating Help tab along with it instead of keeping them pinned to
       the viewport. Wide content should scroll within its own container
       (see .table-scroll-wrap) rather than the whole document. */
    overflow-x: hidden;
    max-width: 100%;
}
body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    overflow-x: hidden;
    max-width: 100%;
}
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.free-banner {
    background: var(--gold);
    color: #1e1e1e;
}
.free-banner .container {
    padding: 8px 20px;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
}

.site-header { background: var(--primary-dark); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; flex-wrap: wrap; gap: 10px; position: relative; }
.logo {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-text { font-weight: 600; }
.logo-accent { font-weight: 800; color: var(--gold); }
.main-nav a { color: #eef3ec; margin-left: 18px; font-size: 15px; }
.main-nav a:hover { color: var(--gold); text-decoration: none; }
.btn-nav { background: var(--gold); color: #1e1e1e !important; padding: 8px 14px; border-radius: 6px; font-weight: 600; }

/* Multi-level admin dropdown nav */
.nav-dropdown { position: relative; display: inline-block; margin-left: 18px; }
.nav-dropdown-toggle {
    background: none; border: none; color: #eef3ec; font-size: 15px; cursor: pointer;
    padding: 0; font-family: inherit;
}
.nav-dropdown-toggle:hover { color: var(--gold); }
.nav-dropdown-toggle-user { display: inline-flex; align-items: center; max-width: 200px; }
.nav-username { display: inline-block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.nav-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0; margin-top: 10px;
    background: #fff; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    min-width: 190px; z-index: 60; padding: 6px 0;
}
.nav-dropdown-menu a { display: block; padding: 10px 16px; color: var(--text); font-size: 14px; margin-left: 0; }
.nav-dropdown-menu a:hover { background: #f0f2ec; text-decoration: none; }
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.currency-nav-dropdown .nav-dropdown-menu { min-width: 90px; }
.currency-nav-dropdown .nav-dropdown-toggle { letter-spacing: 0.3px; }
@media (min-width: 801px) {
    .nav-dropdown:hover .nav-dropdown-menu { display: block; }
}

/* Language toggle: compact EN/ML pill, always visible in the header */
.header-cta {
    margin-left: auto;
    margin-right: 12px;
    font-size: 13px;
    padding: 7px 12px;
    white-space: nowrap;
}
.header-cta-mobile-nav { display: none; }
@media (max-width: 800px) {
    .header-cta-top { display: none !important; }
    .header-cta-mobile-nav { display: block; text-align: center; margin-top: 8px; }
}
.lang-toggle {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 3px;
    cursor: pointer;
    margin-right: 14px;
}
.lang-option {
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 700;
    color: #d8e3da;
    border-radius: 16px;
    letter-spacing: 0.2px;
    transition: background 0.15s ease, color 0.15s ease;
}
.lang-option-ml { font-family: 'Manjari', 'Poppins', sans-serif; }
.lang-toggle[data-active="en"] .lang-option-en,
.lang-toggle[data-active="ml"] .lang-option-ml {
    background: var(--gold);
    color: #1e1e1e;
}

/* When Malayalam is active, every translated element gets the compact
   Manjari font — Malayalam script reads larger than Latin at the same
   font-size, so translated text also gets a modest, explicit size
   reduction (using fixed px values, not em, since the elements below
   already have their own explicit font-size rules that em would collide
   with rather than scale). */
html.lang-ml [data-i18n],
html.lang-ml [data-i18n-placeholder]::placeholder {
    font-family: 'Manjari', 'Poppins', 'Segoe UI', Arial, sans-serif;
}
html.lang-ml .hero h1[data-i18n] { font-size: 24px; }
html.lang-ml .hero p[data-i18n] { font-size: 13.5px; }
html.lang-ml .tag[data-i18n] { font-size: 10px; }
html.lang-ml .btn[data-i18n],
html.lang-ml button [data-i18n],
html.lang-ml a [data-i18n] { font-size: 13px; }
html.lang-ml label[data-i18n] { font-size: 13px; }
html.lang-ml option[data-i18n] { font-size: 13px; }
html.lang-ml h3[data-i18n] { font-size: 16px; }
html.lang-ml .contact-modal h2[data-i18n],
html.lang-ml .contact-modal h2 [data-i18n] { font-size: 19px; }
html.lang-ml th[data-i18n], html.lang-ml td[data-i18n],
html.lang-ml td span[data-i18n] { font-size: 12.5px; }
html.lang-ml .spec-list li span[data-i18n] { font-size: 12.5px; }
html.lang-ml .hint[data-i18n],
html.lang-ml .hint [data-i18n] { font-size: 11px; }
html.lang-ml .stat-box .label[data-i18n] { font-size: 11px; }
html.lang-ml .amenity-tag[data-i18n] { font-size: 11.5px; }
html.lang-ml .amenity-checkbox span[data-i18n] { font-size: 12.5px; }
html.lang-ml .upload-overlay-content h2[data-i18n] { font-size: 18px; }
html.lang-ml .upload-overlay-content p[data-i18n] { font-size: 12px; }
html.lang-ml .card > h1[data-i18n] { font-size: 24px; }

/* Hamburger toggle button - hidden on desktop, shown on mobile via media query below */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 20;
}
.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

.page-content { min-height: 70vh; padding: 30px 20px 50px; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e5f5ea; color: var(--success); border: 1px solid #b7e0c4; }
.alert-error { background: #fbeaea; color: var(--danger); border: 1px solid #f0c2c2; }
.alert-info { background: #eaf2fb; color: #1b5faa; border: 1px solid #c4dbf3; }

.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.form-narrow { max-width: 460px; margin: 20px auto; }

/* Legal / policy document prose */
.legal-doc { max-width: 780px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; }

.about-page { max-width: 900px; margin: 0 auto; }
.about-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 34px; margin-bottom: 22px; }
.about-section h2 { margin-top: 0; color: var(--primary-dark); font-size: 21px; }
.about-section p { line-height: 1.7; font-size: 15px; }
.about-feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 16px; }
.about-feature { background: var(--bg); border-radius: 10px; padding: 18px; }
.about-feature-icon { font-size: 26px; margin-bottom: 8px; }
.about-feature h3 { margin: 0 0 6px; font-size: 15.5px; color: var(--primary-dark); }
.about-feature p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.about-list { padding-left: 22px; }
.about-list li { line-height: 1.7; font-size: 15px; margin-bottom: 10px; }
.about-cta { text-align: center; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; }
.about-cta h2 { color: #fff; }
.about-cta p { color: #eef3ec; }
.about-cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.about-cta-buttons .btn-secondary { background: rgba(255,255,255,0.15); color: #fff; }
.about-cta-buttons .btn-secondary:hover { background: rgba(255,255,255,0.25); }
.legal-doc h1 { margin-top: 0; }
.legal-doc .updated-date { color: var(--muted); font-size: 14px; margin-top: -8px; margin-bottom: 28px; }
.legal-doc h2 { margin-top: 34px; font-size: 20px; color: var(--primary-dark); border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.legal-doc h3 { margin-top: 22px; font-size: 16px; }
.legal-doc p, .legal-doc li { line-height: 1.7; font-size: 15px; }
.legal-doc ul, .legal-doc ol { padding-left: 22px; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc .toc { background: #f7f8f4; border-radius: 8px; padding: 18px 24px; margin-bottom: 10px; }
.legal-doc .toc ol { margin: 0; padding-left: 20px; }
.legal-doc .toc li { margin-bottom: 4px; }
.legal-doc strong.emphasis { color: var(--danger); }

label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 14px; font-family: inherit; background: #fff;
}
textarea { resize: vertical; min-height: 100px; }
.form-row { display: flex; gap: 16px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 12px; }
.broker-photo-placeholder { width: 100%; display: flex; align-items: center; justify-content: center; font-size: 48px; background: #eef1ea; color: var(--muted); }
.broker-locations { font-size: 12.5px; }
.broker-card .body { display: flex; flex-direction: column; gap: 3px; }
.hot-deal-section { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 14px 16px; margin: 16px 0; }
.hot-deal-section #hotDealFields { margin-top: 10px; }
.free-listing-notice { background: #e5f5ea; border: 1px solid #b8e0c4; border-radius: 8px; padding: 14px 16px; margin: 14px 0; }
.free-listing-notice strong { display: block; color: var(--primary-dark); font-size: 15px; margin-bottom: 4px; }
.free-listing-notice p { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.free-listing-banner { background: #fff; border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.free-listing-banner strong { display: block; color: var(--primary-dark); font-size: 16px; margin-bottom: 3px; }
.free-listing-banner p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; max-width: 560px; }
.form-row > div { flex: 1; }
.price-words { display: block; margin-top: 4px; color: var(--primary-dark); font-style: italic; min-height: 15px; }
small.hint { color: var(--muted); font-size: 12px; }

.g-recaptcha { margin: 16px 0 4px; }
@media (max-width: 360px) {
    .g-recaptcha { transform: scale(0.88); transform-origin: 0 0; }
}

.btn { display: inline-block; background: var(--primary); color: #fff; border: none; padding: 11px 22px;
    border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 18px; }
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn-secondary { background: #6b7568; }
.btn-danger { background: var(--danger); }
.btn-gold { background: var(--gold); color: #1e1e1e; }
.btn-small { padding: 6px 12px; font-size: 13px; margin-top: 0; }

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    margin-top: 8px;
    box-sizing: border-box;
}
.btn-google:hover { background: #f7f7f7; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

.divider-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    margin: 18px 0;
}
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Homepage-only: the Kerala backwaters photo as a full page background,
   with a fading overlay so it reads clearly behind the header and hero
   text, then blends into the normal page background further down. */
body.page-hero-bg {
    background-color: var(--bg);
    background-image: linear-gradient(180deg, rgba(6,54,32,0.72) 0%, rgba(6,54,32,0.55) 40%, var(--bg) 620px),
                       url('../img/hero-bg.webp');
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% auto, cover;
    background-attachment: fixed;
}
@media (max-width: 800px) {
    body.page-hero-bg { background-attachment: scroll; }
}

.hero {
    background: rgba(6,54,32,0.35);
    color: #fff;
    padding: 26px 20px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: var(--radius);
    margin-bottom: 30px;
}
.hero h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.15; }
.hero p { margin: 0; opacity: 0.95; line-height: 1.35; font-size: 15px; }

/* Headings that sit below the search bar but still over the hero
   background image/gradient (before it fades to the normal page
   background) — white with a shadow so they stay legible against the
   photo regardless of which part of the image is behind them. */
.hero-heading { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.55); }

.search-bar { background: #fff; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); margin-top: -34px; position: relative; z-index: 2; display: flex; gap: 10px; flex-wrap: wrap; }
.search-bar select, .search-bar input { flex: 1; min-width: 140px; }

.advanced-filters {
    flex-basis: 100%; flex-wrap: wrap; gap: 12px;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
    display: none;
}
.advanced-filters:not([hidden]) { display: flex; }
.advanced-filters > div { flex: 1; min-width: 130px; }
.advanced-filters label { font-size: 12px; margin: 0 0 4px; }

.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin-top: 24px; }
.property-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.property-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.property-card img { width: 100%; height: 180px; object-fit: cover; display: block; background: #eee; }
.property-card .body { padding: 14px 16px; }
.property-card .price { font-size: 19px; font-weight: 700; color: var(--primary-dark); }
.property-card .price-unit { font-size: 12px; font-weight: 400; color: var(--muted); }
.property-card .price-suffix { font-size: 12px; font-weight: 400; color: var(--muted); font-style: italic; }
.property-card .title { font-weight: 600; margin: 4px 0; }
.property-card .meta { color: var(--muted); font-size: 13px; }
.property-card .card-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border);
    font-size: 11px; color: var(--muted);
}
.property-card .property-code { font-weight: 700; letter-spacing: 0.3px; }
.tag { display: inline-block; background: #eef3ec; color: var(--primary-dark); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: .4px; }
.tag-pending { background: #fbf3d9; color: #8a6d1a; }
.tag-approved { background: #e5f5ea; color: var(--success); }
.tag-rejected { background: #fbeaea; color: var(--danger); }
.tag-suspended { background: #f3e8d8; color: #9a5b13; }
.tag-expired { background: #ede9f5; color: #5b3ea0; }
.tag-sold { background: #e2e2e2; color: #3a3a3a; }
.tag-rented { background: #e2e2e2; color: #3a3a3a; }
.tag-owner { background: #eaf2fb; color: #1b5faa; }
.tag-broker { background: #fbf0ea; color: #a0521f; }
.tag-verified { background: #e5f5ea; color: var(--success); font-weight: 800; }
.tag-hot-deal { background: #dc2626; color: #fff; font-weight: 800; }
.hot-deal-price-card { background: #fff7ed; border: 1px solid #fed7aa; margin-top: 16px; }
.hot-deal-price-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hot-deal-market-value { font-size: 18px; font-weight: 700; color: var(--muted); text-decoration: line-through; }
.hot-deal-asking-price { font-size: 22px; font-weight: 800; color: #dc2626; }
.hot-deal-arrow { font-size: 20px; color: var(--muted); }
.hot-deals-subtitle { font-weight: 400; font-size: 14px; margin-top: 4px; opacity: 0.9; }

.pagination { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 30px 0; }
.recently-viewed-grid { margin-top: 14px; }

.amenities-display { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.amenity-tag { background: #f0f2ec; color: var(--text); font-size: 13px; padding: 6px 12px; border-radius: 20px; }

/* Social share buttons */
.share-row { display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.share-btn {
    width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; color: #fff; border: none; cursor: pointer; text-decoration: none;
    transition: transform 0.1s ease;
}
.share-btn:hover { transform: scale(1.08); text-decoration: none; }
.share-whatsapp { background: #25D366; }
.share-facebook { background: #1877F2; font-style: italic; font-family: Georgia, serif; }
.share-twitter { background: #000; }
.share-copy { background: var(--muted); }
.share-copy.copied { background: var(--primary); }

/* Location map embed */
.map-embed-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-top: 10px; }
.map-embed-wrap iframe { width: 100%; height: 280px; border: 0; display: block; }

/* EMI calculator */
.emi-calculator { margin-top: 10px; }
.emi-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; }
.emi-amount { font-size: 20px; font-weight: 800; color: var(--primary-dark); margin-top: 4px; }
.emi-amount-sm { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 4px; }

/* Similar properties */
.similar-properties-grid { margin-top: 14px; }

/* Report listing link */
.report-link { background: none; border: none; color: var(--danger); font-size: 13px; cursor: pointer; margin-top: 12px; padding: 0; text-decoration: underline; }
.report-link:hover { color: #8a1f1f; }

.favorite-btn { display: block; width: 100%; text-align: center; background: #fff; border: 1px solid var(--border); color: var(--text); margin-bottom: 14px; }
.favorite-btn:hover { background: #fdf0f0; text-decoration: none; }
.favorite-btn.favorited { background: #fdeaea; border-color: #f3c6c6; color: var(--danger); }

/* Analytics bar chart (pure CSS, no external library) */
.analytics-chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; width: max-content; min-width: 100%; }
.analytics-bar-wrap { flex: 0 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.analytics-bar { width: 100%; max-width: 26px; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 3px; transition: background 0.15s; }
.analytics-bar-wrap:hover .analytics-bar { background: var(--gold); }
.analytics-bar-label { font-size: 10px; color: var(--muted); margin-top: 6px; white-space: nowrap; }

/* Admin bulk approve/reject toolbar */
.bulk-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0; }

/* Theme settings color pickers */
.color-input-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.color-input-row input[type="color"] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.color-hex { font-family: monospace; font-size: 14px; color: var(--muted); text-transform: uppercase; }
.bulk-reason-input { flex: 1; min-width: 220px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }

.table-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 16px; }
.table-scroll-wrap table { margin-top: 0; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: #f0f2ec; font-weight: 700; }

.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gallery-thumbs img { width: 90px; height: 70px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* Lightbox gallery viewer */
.lightbox-overlay {
    position: fixed; inset: 0; background: rgba(10,15,10,0.92);
    align-items: center; justify-content: center;
    z-index: 200; opacity: 0; transition: opacity 0.2s ease;
    display: none;
}
.lightbox-overlay:not([hidden]) { display: flex; }
.lightbox-overlay.visible { opacity: 1; }

/* Contact-owner modal */
.contact-modal-overlay {
    position: fixed; inset: 0; background: rgba(10,15,10,0.6);
    align-items: center; justify-content: center;
    z-index: 250; opacity: 0; transition: opacity 0.2s ease;
    display: none;
}
.contact-modal-overlay:not([hidden]) { display: flex; }
.contact-modal-overlay.visible { opacity: 1; }
.contact-modal {
    background: #fff; border-radius: var(--radius); padding: 26px;
    max-width: 460px; width: 92%; max-height: 88vh; overflow-y: auto;
    position: relative;
}
.contact-modal-close {
    position: absolute; top: 12px; right: 14px; background: none; border: none;
    font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1;
}
.contact-modal-close:hover { color: var(--text); }
.lightbox-image { max-width: 90vw; max-height: 88vh; object-fit: contain; border-radius: 4px; }
.lightbox-close, .lightbox-nav {
    position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: none;
    cursor: pointer; border-radius: 50%; width: 44px; height: 44px; font-size: 24px;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 18px; right: 18px; font-size: 28px; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #eee; font-size: 13px; background: rgba(0,0,0,0.4); padding: 4px 12px; border-radius: 20px; }

/* Photo management: delete / set-as-primary controls on thumbnails (edit form, admin review) */
.photo-manage-grid { align-items: flex-start; }
.photo-manage-item { position: relative; }
.photo-manage-item img { display: block; }
.photo-action-btn {
    position: absolute; top: -6px; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
    text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,0.3); line-height: 1;
}
.photo-delete-btn { right: -6px; background: var(--danger); color: #fff; }
.photo-delete-btn:hover { background: #8a1f1f; text-decoration: none; }
.photo-set-primary-btn { left: -6px; background: var(--gold); color: #1e1e1e; font-size: 12px; }
.photo-set-primary-btn:hover { background: #b07f22; text-decoration: none; }
.photo-primary-badge { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); font-size: 9px; padding: 2px 6px; white-space: nowrap; }

.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 26px; }
.detail-grid img.main-photo { width: 100%; height: 380px; object-fit: cover; border-radius: var(--radius); background: #eee; }
.spec-list { list-style: none; padding: 0; margin: 14px 0; }
.spec-list li { padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 14px; display: flex; justify-content: space-between; }

/* Country code + phone number input pairing */
.phone-input-group { display: flex; gap: 8px; }
.country-code-select { flex: 0 0 auto; width: auto; min-width: 150px; }
.phone-input-group input[type=tel] { flex: 1; }

/* Amenities checklist */
.amenities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; margin: 10px 0 18px; }
.amenity-checkbox { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; margin: 0; }
.amenity-checkbox input { width: auto; margin: 0; }

/* Password field with show/hide toggle */
.password-field { position: relative; }
.password-field input { padding-right: 42px; }
.password-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 16px;
    padding: 6px 8px; color: var(--muted); line-height: 1;
}
.password-toggle:hover { color: var(--text); }

/* Contact block: call/WhatsApp buttons on touch devices, plain text everywhere else */
.contact-block { margin: 14px 0; }
.contact-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-call-btn { background: var(--primary); }
.contact-whatsapp-btn { background: #25D366; }
.contact-mobile-only { display: none; }
.contact-text-only { display: block; font-size: 14px; line-height: 1.6; }

@media (hover: none) and (pointer: coarse) {
    .contact-mobile-only { display: flex; }
    .contact-text-only { display: none; }
}

.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0; }
.stat-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat-box .num { font-size: 28px; font-weight: 800; color: var(--primary-dark); }
.stat-box .label { color: var(--muted); font-size: 13px; }

.site-footer { background: var(--primary-dark); color: #cfe0d4; padding: 20px; text-align: center; font-size: 13px; margin-top: 40px; }
.footer-links { margin-top: 6px; }
.footer-links a { color: #cfe0d4; }
.footer-links a:hover { color: var(--gold); }
.footer-district-links { margin-top: 10px; font-size: 12px; line-height: 1.8; opacity: 0.85; }
.footer-district-links a { color: #cfe0d4; }
.footer-district-links a:hover { color: var(--gold); }

.otp-boxes input { font-size: 26px; letter-spacing: 6px; text-align: center; }

.compression-status {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    background: #eef3ec;
    border-radius: 6px;
    padding: 8px 12px;
    display: inline-block;
}

/* Full-screen overlay shown while a property listing is submitting */
.upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(6,54,32,0.96) 0%, rgba(8,77,42,0.97) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.upload-overlay.visible { opacity: 1; }
.upload-overlay[hidden] { display: none; }

.upload-overlay-content {
    text-align: center;
    color: #fff;
    padding: 20px;
    max-width: 360px;
}
.upload-spinner {
    width: 84px;
    height: 84px;
    margin: 0 auto 24px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.25);
    border-top-color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: upload-spin 1.1s linear infinite;
}
.upload-spinner-icon { font-size: 32px; display: inline-block; animation: upload-bounce 1.4s ease-in-out infinite; }
@keyframes upload-spin { to { transform: rotate(360deg); } }
@keyframes upload-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.upload-overlay-content h2 { margin: 0 0 8px; font-size: 22px; font-family: 'Poppins', 'Segoe UI', Arial, sans-serif; }
.upload-overlay-content p { margin: 0 0 22px; font-size: 14px; opacity: 0.85; }

.upload-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    overflow: hidden;
}
.upload-progress-bar {
    height: 100%;
    width: 40%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), #f3d38a);
    animation: upload-progress-slide 1.6s ease-in-out infinite;
}
@keyframes upload-progress-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

@media (max-width: 800px) {
    .detail-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }

    .hero { min-height: 110px; padding: 20px 18px; }
    .hero h1 { font-size: 22px; line-height: 1.2; }
    .hero p { font-size: 13.5px; line-height: 1.35; }

    /* Always start collapsed on mobile, even if the server pre-opened it
       (e.g. arriving via a saved search link with filters already set) —
       only opens once the user explicitly taps "Advanced Filters". */
    .advanced-filters { display: none !important; }
    .advanced-filters.js-opened { display: flex !important; }

    .logo { font-size: 17px; }

    .nav-toggle { display: flex; }

    .main-nav {
        flex-basis: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease;
    }
    .main-nav.nav-open {
        max-height: 2000px;
        opacity: 1;
        margin-top: 14px;
    }
    .main-nav a {
        margin-left: 0;
        padding: 12px 4px;
        border-top: 1px solid rgba(255,255,255,0.12);
        font-size: 16px;
    }
    .main-nav a:first-child { border-top: none; }
    .btn-nav { display: inline-block; margin-top: 8px; text-align: center; }

    /* Dropdowns become static, always-expanded sub-lists on mobile */
    .nav-dropdown { margin-left: 0; display: block; width: 100%; }
    .nav-dropdown-toggle {
        display: block; width: 100%; text-align: left; padding: 12px 4px;
        border-top: 1px solid rgba(255,255,255,0.12); font-size: 16px; color: #eef3ec;
    }
    .nav-dropdown-menu {
        position: static; display: block; box-shadow: none; min-width: 0;
        background: rgba(255,255,255,0.06); border-radius: 6px; margin: 4px 0 4px 10px; padding: 2px 0;
    }
    .nav-dropdown-menu a { color: #eef3ec; padding: 10px 12px; border-top: none; font-size: 15px; }
    .nav-dropdown-menu a:hover { background: rgba(255,255,255,0.1); }

    .emi-result { grid-template-columns: 1fr; gap: 10px; text-align: left; }
}

/* Floating Help & FAQ tab */
.help-tab {
    position: fixed;
    right: 0;
    top: 45%;
    transform: translateY(-50%);
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 16px 10px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 150;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.18);
    transition: background 0.15s ease;
}
.help-tab:hover { background: var(--primary-dark); }

.help-panel-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 199; opacity: 0; visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.help-panel-overlay.open {
    opacity: 1; visibility: visible;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.help-panel {
    position: fixed; top: 0; right: -420px; width: 400px; max-width: 90vw; height: 100%;
    background: #fff; z-index: 200; box-shadow: -4px 0 24px rgba(0,0,0,0.2);
    transition: right 0.3s ease; overflow-y: auto; padding: 24px;
}
.help-panel.open { right: 0; }

.help-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.help-panel-header h2 { margin: 0; font-size: 20px; }
.help-panel-close { background: none; border: none; font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1; padding: 0 4px; }
.help-panel-close:hover { color: var(--text); }

.help-search-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; margin-bottom: 6px; }
.help-no-results { margin: 10px 0; }

.faq-category { margin-top: 22px; }
.faq-category h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary-dark); border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 6px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 8px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '+ '; color: var(--primary); font-weight: 800; }
.faq-item[open] summary::before { content: '– '; }
.faq-item p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; padding-left: 14px; }

.help-contact-footer { margin-top: 26px; padding-top: 16px; border-top: 2px solid var(--border); text-align: center; }

@media (max-width: 480px) {
    .help-tab { font-size: 12px; padding: 12px 8px; }
    .help-panel { width: 100%; max-width: 100%; }
}

/* Locality autocomplete on property_form.php */
.locality-autocomplete-wrap { position: relative; }
.locality-suggestions {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: #fff; border: 1px solid var(--border); border-top: none;
    border-radius: 0 0 8px 8px; max-height: 260px; overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.locality-suggestion-item { padding: 9px 12px; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.locality-suggestion-item:hover, .locality-suggestion-item.active { background: #f0f2ec; }
.locality-suggestion-name { font-size: 14px; font-weight: 600; }
.locality-suggestion-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
