:root {
  --ink: #17201d;
  --muted: #66736e;
  --line: #dfe7e1;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --teal: #087d76;
  --coral: #de6b55;
  --green: #6d9b61;
  --gold: #c7963b;
  --shadow: 0 18px 60px rgba(23, 32, 29, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 246, 0.92);
  border-bottom: 1px solid rgba(223, 231, 225, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 8px 22px rgba(23, 32, 29, 0.12);
}

.nav-links {
  display: flex;
  gap: clamp(12px, 2vw, 26px);
  color: var(--muted);
  font-weight: 650;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links .active {
  color: var(--teal);
}

.post-button,
.search-panel button,
.post-form button,
.auth-form button,
.admin-filter button,
.admin-form button {
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(8, 125, 118, 0.2);
}

.post-button {
  padding: 10px 18px;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.auth-name {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.auth-button,
.secondary-button,
.danger-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.auth-button {
  padding: 10px 14px;
}

.hero {
  position: relative;
  min-height: min(720px, calc(100vh - 72px));
  overflow: hidden;
  display: grid;
  align-items: center;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(251, 250, 246, 0.94), rgba(251, 250, 246, 0.58) 42%, rgba(251, 250, 246, 0.08));
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 96px);
  padding: 58px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6.8rem);
  line-height: 0.95;
  max-width: 750px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 12px;
  max-width: 860px;
  margin-top: 34px;
  padding: 12px;
  border: 1px solid rgba(223, 231, 225, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.search-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-panel input,
.post-form input,
.post-form select,
.post-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
}

.search-panel button {
  align-self: end;
  padding: 14px 20px;
}

.listing-card p,
.post-section p {
  color: var(--muted);
}

.section-wrap,
.split-band,
.search-results,
.auth-section,
.my-posts,
.post-section,
footer,
.page-hero,
.content-shell {
  padding-inline: clamp(18px, 5vw, 72px);
}

.section-wrap {
  padding-block: 82px;
}

.search-results {
  padding-block: 72px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.auth-section,
.my-posts {
  padding-block: 72px;
  border-bottom: 1px solid var(--line);
}

.auth-section {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 32px;
  align-items: start;
  background: #fff;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.auth-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.auth-form h3 {
  margin: 0;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
}

.form-status {
  grid-column: 2;
  margin: 0;
  min-height: 1.4em;
  color: var(--coral);
  font-weight: 800;
}

.auth-form .form-status,
.admin-login-form .form-status {
  grid-column: auto;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card,
.listing-card,
.side-panel,
.post-form,
.admin-filter,
.admin-form,
.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.category-card {
  min-height: 300px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card .icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-size: 1.4rem;
}

.category-card.services .icon { background: var(--coral); }
.category-card.housing .icon { background: var(--green); }
.category-card.market .icon { background: var(--gold); }

.category-card h3,
.listing-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.category-card strong {
  margin-top: auto;
  color: var(--teal);
}

.split-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.6fr;
  gap: 28px;
  padding-block: 72px;
  background: #eef3ee;
  border-block: 1px solid var(--line);
}

.listing-row,
.listing-grid {
  display: grid;
  gap: 14px;
}

.listing-row {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.listing-card {
  padding: 18px;
  min-height: 286px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(23, 32, 29, 0.05);
}

.listing-top,
.listing-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.listing-top span {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--teal);
  font-weight: 850;
  font-size: 0.82rem;
  line-height: 1.15;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listing-top strong {
  flex: 0 1 42%;
  min-width: 0;
  color: var(--coral);
  max-width: 42%;
  line-height: 1.15;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-card h3 {
  line-height: 1.15;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listing-summary {
  margin: 0;
  line-height: 1.25;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.listing-contact-list {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.listing-contact-list:empty {
  display: block;
}

.listing-contact-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.15;
  text-decoration: none;
}

.listing-contact-item span {
  color: var(--teal);
  font-weight: 850;
}

.listing-contact-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-bottom {
  color: var(--muted);
  font-weight: 700;
}

.listing-bottom span {
  min-width: 0;
  line-height: 1.18;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listing-bottom button,
.filter-bar button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.listing-bottom button {
  flex: 0 0 auto;
  padding: 8px 12px;
}

.listing-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.danger-button {
  color: #9f2f1f;
}

.post-section {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 32px;
  align-items: start;
  padding-block: 82px;
}

.post-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.post-form textarea {
  min-height: 130px;
  resize: vertical;
}

.post-form button {
  padding: 14px 18px;
}

.post-form [disabled] {
  cursor: not-allowed;
  opacity: 0.62;
}

.post-actions {
  display: flex;
  gap: 10px;
}

.post-actions button {
  flex: 1;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
  color: var(--teal);
}

.submitted {
  outline: 3px solid rgba(8, 125, 118, 0.24);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer span {
  color: var(--ink);
  font-weight: 850;
}

footer nav {
  display: flex;
  gap: 18px;
}

.maintenance-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(251, 250, 246, 0.96), rgba(251, 250, 246, 0.78) 42%, rgba(251, 250, 246, 0.22)),
    url("assets/indian-community-hero-fixed.png") center / cover no-repeat;
}

.maintenance-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: clamp(24px, 7vw, 96px);
}

.maintenance-panel {
  max-width: 660px;
  display: grid;
  gap: 18px;
}

.maintenance-panel h1 {
  font-size: clamp(2.4rem, 6vw, 5.8rem);
}

.maintenance-panel p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.admin-shell {
  padding: clamp(18px, 5vw, 72px);
}

.admin-login {
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 460px);
  gap: 32px;
  align-items: center;
}

.admin-login h1,
.admin-dashboard h1 {
  font-size: clamp(2.4rem, 5vw, 5.2rem);
}

.admin-login-form h2 {
  font-size: 1.35rem;
}

.admin-dashboard {
  display: grid;
  gap: 22px;
}

.admin-dashboard-head,
.admin-results-head,
.admin-session,
.admin-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-session span {
  color: var(--muted);
  font-weight: 800;
}

.admin-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 220px) auto auto;
  gap: 12px;
  padding: 14px;
  align-items: center;
}

.admin-filter input,
.admin-filter select,
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
}

.admin-filter button,
.admin-form button {
  padding: 13px 18px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.admin-editor {
  padding-block: 18px 6px;
}

.admin-editor .section-heading {
  margin-bottom: 16px;
}

.admin-editor h2,
.admin-results-head h2 {
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  padding: 18px;
}

.admin-form textarea {
  grid-column: 1 / -1;
  min-height: 170px;
  resize: vertical;
}

.admin-form .checkbox-row,
.admin-form .admin-form-actions,
.admin-form .form-status {
  grid-column: 1 / -1;
}

.admin-form .secondary-button {
  color: var(--teal);
}

.admin-results-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-table td:first-child {
  width: 38%;
}

.admin-table td strong,
.admin-table td span {
  display: block;
}

.admin-table td span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.category-page {
  min-height: calc(100vh - 67px);
}

.page-hero {
  padding-block: 58px 28px;
  background: linear-gradient(135deg, #ffffff, #eef3ee);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 940px;
  font-size: clamp(2.3rem, 5vw, 5.4rem);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.filter-bar button {
  padding: 10px 14px;
  font-weight: 800;
}

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

.content-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  padding-block: 28px 70px;
}

.side-panel {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.side-panel h2 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.side-panel a {
  color: var(--muted);
  font-weight: 700;
}

.listing-grid {
  grid-template-columns: repeat(3, 1fr);
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .search-panel,
  .split-band,
  .auth-section,
  .post-section,
  .content-shell,
  .admin-login,
  .admin-filter,
  .admin-form {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .auth-grid,
  .listing-row,
  .listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-status {
    grid-column: auto;
  }

  .side-panel {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .side-panel h2 {
    min-width: max-content;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 12px;
  }

  .nav-links {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .post-button {
    padding: 9px 13px;
  }

  .hero {
    min-height: 700px;
  }

  .hero::after {
    background: rgba(251, 250, 246, 0.88);
  }

  .hero-overlay {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }

  h1 {
    font-size: clamp(2.45rem, 14vw, 4rem);
  }

  .category-grid,
  .auth-grid,
  .listing-row,
  .listing-grid {
    grid-template-columns: 1fr;
  }

  footer,
  footer nav {
    flex-direction: column;
  }
}
