:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-soft: #ccfbf1;
    --accent: #f59e0b;
    --danger: #b91c1c;
    --ink: #17211f;
    --muted: #667572;
    --line: #dce6e3;
    --surface: #ffffff;
    --background: #f3f6f5;
    --shadow: 0 12px 36px rgba(15, 72, 66, .09);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font: 15px/1.55 Inter, "Noto Sans Sinhala", "Noto Sans Tamil", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.narrow { max-width: 720px; }
.narrow-wide { max-width: 980px; }
.section { padding: 52px 0; }
.surface-section { background: #e9f1ef; }

.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.nav-wrap { min-height: 70px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--primary-dark); font-weight: 800; font-size: 17px; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.main-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; font-weight: 650; }
.main-nav a:hover, .link-button:hover { color: var(--primary); }
.post-link { color: var(--primary) !important; }
.inline-form { display: inline; }
.link-button { border: 0; background: none; padding: 0; color: inherit; }
.language-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.language-switch a { min-width: 29px; padding: 4px 6px; border-radius: 7px; text-align: center; font-size: 12px; font-weight: 800; }
.language-switch a.active { color: white; background: var(--primary); }
.nav-toggle { display: none; margin-left: auto; border: 0; background: none; font-size: 24px; }

.hero {
    padding: 76px 0;
    background:
        radial-gradient(circle at 12% 30%, rgba(15,118,110,.16), transparent 28%),
        linear-gradient(135deg, #f0fdfa, #ffffff 55%, #fff7e5);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.hero h1 { max-width: 650px; margin: 8px 0 12px; font-size: clamp(38px, 5vw, 66px); line-height: 1.05; letter-spacing: -.04em; }
.hero-copy p { color: var(--muted); font-size: 18px; }
.eyebrow { color: var(--primary); font-size: 13px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.search-panel, .form-card, .contact-panel, .wallet-card, .status-card {
    padding: 26px;
    border: 1px solid rgba(15,118,110,.12);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.intent-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.intent-row label, .choice-tabs label { padding: 8px 12px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 750; }
.search-input { width: 100%; font-size: 18px; }
.location-row, .two-col, .three-col { display: grid; gap: 14px; }
.location-row, .three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }

input, select, textarea {
    width: 100%;
    min-height: 46px;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #cbd9d6;
    border-radius: 11px;
    color: var(--ink);
    background: white;
    outline: none;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
input[type="radio"], input[type="checkbox"] { width: auto; min-height: auto; margin: 0; accent-color: var(--primary); }
label { display: block; color: #3a4744; font-weight: 650; }
fieldset { margin: 16px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
legend { padding: 0 8px; font-weight: 800; }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.check-grid label { font-weight: 500; }
.form-card > label, .form-card > div, .form-card > h2 { margin-bottom: 17px; }
.form-card h2 { margin-top: 28px; }
.field-help, .pricing-note { color: var(--muted); }
.pricing-note { padding: 12px 14px; border-radius: 10px; background: #f0fdfa; }

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-weight: 800;
}
.button.primary { color: white; background: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { color: var(--primary-dark); border-color: #8fc3bd; background: white; }
.button.ghost { color: var(--primary); border-color: var(--line); background: transparent; }
.button.accent { color: #4b3000; background: #fbbf24; }
.button.danger { color: var(--danger); border-color: #fecaca; background: #fff7f7; }
.button.wide { width: 100%; }
.button.small { min-height: 35px; padding: 6px 11px; font-size: 13px; }
.button:disabled { opacity: .6; cursor: wait; }
.button.busy::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 27px; }
.section-heading > a { color: var(--primary); font-weight: 800; }
.type-grid, .action-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.type-grid a, .action-grid a {
    display: flex;
    min-height: 108px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    box-shadow: 0 5px 18px rgba(15,72,66,.05);
    font-weight: 750;
}
.type-grid span, .action-grid a:first-child { color: var(--primary); font-size: 28px; }
.type-grid a:hover, .action-grid a:hover { border-color: var(--primary); transform: translateY(-2px); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.property-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 7px 24px rgba(15,72,66,.06); }
.property-card { position: relative; }
.card-select { display: flex; align-items: center; gap: 7px; padding: 9px 13px; color: var(--primary-dark); background: var(--primary-soft); }
.collection-tools { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.property-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-photo { position: relative; display: block; height: 210px; background: #dfeae7; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder, .detail-placeholder { display: grid; height: 100%; place-items: center; color: #7b9e99; font-size: 54px; }
.featured-badge { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 99px; color: #503100; background: var(--accent); font-size: 11px; font-weight: 900; }
.card-body { padding: 17px; }
.card-body h3 { margin: 0 0 7px; font-size: 17px; }
.price { color: var(--primary-dark); font-size: 18px; font-weight: 900; }
.price.large { font-size: 26px; }
.location, .facts { color: var(--muted); }
.facts { display: flex; gap: 14px; margin-top: 11px; font-size: 13px; }

.page-hero { padding: 42px 0; color: white; background: linear-gradient(130deg, var(--primary-dark), var(--primary)); }
.page-hero h1 { margin: 4px 0; font-size: 36px; }
.page-hero p { margin-bottom: 0; }
.search-layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: 90px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.filters h2 { margin-top: 0; }
.filters input, .filters select { margin: 0 0 11px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pagination a { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; }
.pagination a.active { color: white; background: var(--primary); }
.empty-state, .loading-state { grid-column: 1/-1; padding: 38px; border: 1px dashed #b8cbc7; border-radius: 15px; color: var(--muted); text-align: center; background: white; }

.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; min-height: 430px; margin-bottom: 28px; overflow: hidden; border-radius: var(--radius); }
.gallery img { width: 100%; height: 210px; object-fit: cover; }
.gallery img:first-child { grid-row: span 2; height: 430px; }
.detail-grid { display: grid; grid-template-columns: 1fr 330px; gap: 32px; align-items: start; }
.detail-title-row { display: flex; justify-content: space-between; gap: 20px; }
.detail-title-row h1 { margin: 0; }
.fact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.fact-cards span { display: flex; flex-direction: column; padding: 14px; border-radius: 13px; background: #e9f3f1; color: var(--muted); }
.fact-cards strong { color: var(--ink); font-size: 20px; }
.amenity-list { display: flex; flex-wrap: wrap; gap: 9px; }
.amenity-list span { padding: 8px 11px; border-radius: 9px; background: white; border: 1px solid var(--line); }
.contact-panel { position: sticky; top: 92px; }
.contact-panel .button { margin-top: 10px; }
.verified { display: inline-block; padding: 6px 10px; border-radius: 99px; color: #166534; background: #dcfce7; font-weight: 800; }

.wallet-card { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.wallet-card div { display: flex; flex-direction: column; color: var(--muted); }
.wallet-card strong { color: var(--primary-dark); font-size: 30px; }
.action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.action-grid a { min-height: 130px; }
.auth-page { min-height: 70vh; display: grid; padding: 50px 16px; place-items: center; background: linear-gradient(150deg, #dff7f2, #fff); }
.auth-card { width: min(440px, 100%); padding: 34px; border-radius: 22px; background: white; box-shadow: var(--shadow); }
.auth-card h1 { margin: 6px 0; }
.auth-card .button { margin-top: 16px; }
.password-link { display: block; margin-top: 22px; color: var(--primary); text-align: center; font-weight: 750; }
.choice-tabs { display: flex; gap: 10px; }
.status-card { margin-bottom: 20px; }
.status-verified { border-color: #86efac; background: #f0fdf4; }
.status-pending { border-color: #fde68a; background: #fffbeb; }
.status-rejected { border-color: #fecaca; background: #fef2f2; }
.action-message { min-height: 22px; margin-top: 13px; font-weight: 700; }
.action-message.error { color: var(--danger); }
.action-message.success { color: #15803d; }
.list-panel, .saved-cards { display: grid; gap: 12px; }
.list-row, .saved-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.saved-card div { display: flex; flex-direction: column; }
.saved-card span { color: var(--muted); }
.payment-overlay {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    padding: 18px;
    place-items: center;
    background: rgba(9, 31, 28, .65);
}
.payment-sheet {
    width: min(460px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 26px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 28px 80px rgba(0,0,0,.25);
}
.payment-sheet h2 { margin-top: 0; }
.payment-sheet .button { margin-top: 10px; }
.payment-card { width: 100%; margin-bottom: 9px; text-align: left; cursor: pointer; }
.android-listing-form { display: grid; gap: 16px; }
.android-form-card {
    padding: 22px;
    border: 1px solid rgba(15,118,110,.12);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.android-form-card h2 { margin: 0 0 15px; font-size: 20px; }
.android-form-card > label, .android-form-card > div:not(:last-child) { margin-bottom: 13px; }
.android-listing-form .wallet-card { margin-bottom: 0; background: var(--primary-soft); }
.android-listing-form .wallet-card span { color: var(--primary-dark); font-weight: 750; }
.android-listing-form .wallet-card strong { font-size: 27px; }
.photo-actions { margin-top: 12px; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.photo-preview { position: relative; min-height: 120px; margin: 0; overflow: hidden; border-radius: 13px; background: #dfeae7; }
.photo-preview img { width: 100%; height: 120px; object-fit: cover; }
.photo-preview button {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: white;
    background: rgba(23,33,31,.78);
    font-size: 20px;
    line-height: 1;
}
.duration-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.duration-chip {
    min-width: 58px;
    padding: 8px 13px;
    border: 1px solid #8fc3bd;
    border-radius: 99px;
    color: var(--primary-dark);
    background: white;
    font-weight: 800;
}
.duration-chip.selected { color: white; border-color: var(--primary); background: var(--primary); }
.fee-total { margin: 13px 0 0; color: var(--primary-dark); font-weight: 800; }
.android-publish-button { min-height: 56px; }
.pending-review-note { margin: -5px 0 0; color: var(--muted); text-align: center; }
.kyc-post-gate { max-width: 620px; margin-inline: auto; text-align: center; }
.kyc-post-gate h2 { margin-top: 0; }
.kyc-post-gate.status-pending { border-color: #fde68a; background: #fffbeb; }
.kyc-post-gate.status-rejected { border-color: #fecaca; background: #fef2f2; }
.collection-notice { margin-bottom: 18px; padding: 14px 17px; border: 1px solid #86efac; border-radius: 12px; color: #166534; background: #f0fdf4; font-weight: 750; }
.service-strip { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.site-footer { padding-top: 42px; color: #dce7e5; background: #153a36; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h3 { color: white; }
.copyright { margin-top: 30px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.13); }

[hidden] { display: none !important; }

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 70px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
    .main-nav.open { display: flex; }
    .language-switch { margin-left: 0; }
    .hero-grid, .detail-grid { grid-template-columns: 1fr; }
    .contact-panel { position: static; }
    .type-grid { grid-template-columns: repeat(3, 1fr); }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .action-grid { grid-template-columns: repeat(3, 1fr); }
    .search-layout { grid-template-columns: 1fr; }
    .filters { position: static; }
}

@media (max-width: 600px) {
    .container { width: min(100% - 22px, 1180px); }
    .section { padding: 34px 0; }
    .hero { padding: 48px 0; }
    .hero-grid { gap: 28px; }
    .hero h1 { font-size: 40px; }
    .language-switch { order: 2; }
    .location-row, .two-col, .three-col, .card-grid, .footer-grid { grid-template-columns: 1fr; }
    .type-grid, .action-grid { grid-template-columns: repeat(2, 1fr); }
    .card-photo { height: 230px; }
    .gallery { display: flex; min-height: 280px; overflow-x: auto; scroll-snap-type: x mandatory; }
    .gallery img, .gallery img:first-child { min-width: 90%; height: 280px; scroll-snap-align: start; }
    .detail-title-row, .service-strip, .wallet-card { align-items: flex-start; flex-direction: column; }
    .fact-cards { grid-template-columns: 1fr; }
    .check-grid { grid-template-columns: repeat(2, 1fr); }
    .photo-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-hero h1 { font-size: 29px; }
}
