/* ============================================================================
   THANE PROPERTY HUB — DESIGN SYSTEM
   A property-marketplace visual language inspired by MagicBricks' confident,
   search-first, trust-driven layout — reinterpreted with its own palette,
   type pairing, and motion rather than a direct copy.
   ============================================================================ */

/* ---------- Local fonts (no external CDN dependency) ---------- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-latin-700-normal.woff2') format('woff2');
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand: a deep, premium cardinal red — warmer and less "alert" than a
     pure stop-sign red, paired with a warm gold for featured/trust accents. */
  --tph-primary: #B3282D;
  --tph-primary-dark: #7E1B1F;
  --tph-primary-light: #E85A54;
  --tph-primary-tint: #FBEAEA;

  --tph-gold: #C89B3C;
  --tph-gold-dark: #A67D28;
  --tph-gold-tint: #FBF3E1;

  --tph-navy: #1B2A4A;
  --tph-trust-blue: #2A5C8A;

  --tph-ink: #1A1D29;
  --tph-slate: #5B6478;
  --tph-slate-light: #8A93A6;

  --tph-surface: #FFFFFF;
  --tph-surface-warm: #FAF8F5;
  --tph-surface-sunk: #F3F1EC;
  --tph-border: #E9E4DC;

  --tph-success: #2F8F5B;

  --tph-font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tph-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --tph-radius-sm: 8px;
  --tph-radius-md: 14px;
  --tph-radius-lg: 20px;
  --tph-radius-pill: 999px;

  --tph-shadow-sm: 0 1px 3px rgba(26, 29, 41, 0.08);
  --tph-shadow-md: 0 8px 24px rgba(26, 29, 41, 0.08);
  --tph-shadow-lg: 0 16px 40px rgba(26, 29, 41, 0.14);
  --tph-shadow-primary: 0 10px 28px rgba(179, 40, 45, 0.24);

  --tph-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tph-fast: 180ms;
  --tph-med: 320ms;
}

/* ---------- Base ---------- */
body {
  font-family: var(--tph-font-body);
  color: var(--tph-ink);
  background: var(--tph-surface-warm);
}

h1, h2, h3, h4, h5, h6, .tph-display {
  font-family: var(--tph-font-display);
  color: var(--tph-ink);
  letter-spacing: -0.01em;
}

/* ---------- Scroll-reveal animation utility ----------
   Elements start slightly lower + transparent, then rise into place as
   they enter the viewport. JS toggles the .tph-in class (see theme.js). */
.tph-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--tph-ease), transform 600ms var(--tph-ease);
}
.tph-reveal.tph-in {
  opacity: 1;
  transform: translateY(0);
}
.tph-reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms var(--tph-ease), transform 500ms var(--tph-ease);
}
.tph-reveal-stagger.tph-in > * {
  opacity: 1;
  transform: translateY(0);
}
.tph-reveal-stagger.tph-in > *:nth-child(1) { transition-delay: 0ms; }
.tph-reveal-stagger.tph-in > *:nth-child(2) { transition-delay: 60ms; }
.tph-reveal-stagger.tph-in > *:nth-child(3) { transition-delay: 120ms; }
.tph-reveal-stagger.tph-in > *:nth-child(4) { transition-delay: 180ms; }
.tph-reveal-stagger.tph-in > *:nth-child(5) { transition-delay: 240ms; }
.tph-reveal-stagger.tph-in > *:nth-child(6) { transition-delay: 300ms; }
.tph-reveal-stagger.tph-in > *:nth-child(7) { transition-delay: 360ms; }
.tph-reveal-stagger.tph-in > *:nth-child(8) { transition-delay: 420ms; }

@keyframes tph-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes tph-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes tph-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---------- Header ---------- */
.site-header {
  background: var(--tph-surface);
  border-bottom: 1px solid var(--tph-border);
}
.brand {
  font-family: var(--tph-font-display);
  font-weight: 800;
  color: var(--tph-primary);
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--tph-radius-sm);
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark));
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: var(--tph-shadow-primary);
}

/* ---------- Hero / search ---------- */
.tph-hero {
  position: relative;
  background: linear-gradient(160deg, var(--tph-navy) 0%, #0F1830 100%);
  padding: 28px 20px 64px;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
}
.tph-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,155,60,0.25) 0%, rgba(200,155,60,0) 70%);
}
.tph-hero::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(179,40,45,0.30) 0%, rgba(179,40,45,0) 70%);
}
.tph-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tph-gold);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tph-hero-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 8px 0 4px;
  position: relative;
  z-index: 1;
}
.tph-hero-title span {
  color: var(--tph-gold);
}
.tph-hero-sub {
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.tph-search-card {
  background: var(--tph-surface);
  border-radius: var(--tph-radius-lg);
  box-shadow: var(--tph-shadow-lg);
  padding: 8px;
  position: relative;
  z-index: 1;
}
.tph-search-card input {
  border: none;
  background: transparent;
  font-family: var(--tph-font-body);
  font-size: 0.92rem;
}
.tph-search-card input:focus {
  outline: none;
  box-shadow: none;
}
.tph-search-btn {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--tph-radius-md);
  font-weight: 700;
  font-family: var(--tph-font-display);
  transition: transform var(--tph-fast) var(--tph-ease), box-shadow var(--tph-fast) var(--tph-ease);
  box-shadow: var(--tph-shadow-primary);
}
.tph-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(179, 40, 45, 0.32);
  color: #fff;
}
.tph-search-btn:active {
  transform: translateY(0);
}

.tph-trust-row {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.tph-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  font-size: 0.76rem;
  font-weight: 600;
}
.tph-trust-item i {
  color: var(--tph-gold);
}

/* ---------- Category grid ---------- */
.tph-category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform var(--tph-fast) var(--tph-ease);
}
.tph-category-tile:hover {
  transform: translateY(-4px);
}
.tph-category-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--tph-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tph-surface);
  color: var(--tph-primary);
  font-size: 1.35rem;
  box-shadow: var(--tph-shadow-sm);
  border: 1px solid var(--tph-border);
  transition: box-shadow var(--tph-fast) var(--tph-ease), border-color var(--tph-fast) var(--tph-ease), color var(--tph-fast) var(--tph-ease);
}
.tph-category-tile:hover .tph-category-icon {
  box-shadow: var(--tph-shadow-primary);
  border-color: var(--tph-primary);
  color: var(--tph-primary);
}
.tph-category-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--tph-ink);
  text-align: center;
}

/* ---------- Section headers ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--tph-font-display);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--tph-ink);
  letter-spacing: 0.01em;
  position: relative;
  padding-left: 14px;
  margin: 0;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: var(--tph-radius-pill);
  background: linear-gradient(180deg, var(--tph-primary), var(--tph-gold));
}
.view-all {
  font-family: var(--tph-font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tph-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--tph-fast) var(--tph-ease);
}
.view-all:hover {
  gap: 8px;
  color: var(--tph-primary-dark);
}

/* ---------- Property cards ----------
   Featured Properties is a horizontal slider always (not just on mobile) —
   this class is homepage-only, so no other page is affected by this. */
.property-scroll-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 14px;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--tph-border) transparent;
}
.property-scroll-container::-webkit-scrollbar {
  height: 6px;
}
.property-scroll-container::-webkit-scrollbar-thumb {
  background: var(--tph-border);
  border-radius: var(--tph-radius-pill);
}
.property-scroll-container > a {
  flex: 0 0 240px;
  scroll-snap-align: start;
}
@media (max-width: 560px) {
  .property-scroll-container {
    gap: 12px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
  }
  .property-scroll-container > a {
    flex: 0 0 78%;
  }
}

.property-card {
  background: var(--tph-surface);
  border-radius: var(--tph-radius-md);
  overflow: hidden;
  border: 1px solid var(--tph-border);
  box-shadow: var(--tph-shadow-sm);
  transition: transform var(--tph-med) var(--tph-ease), box-shadow var(--tph-med) var(--tph-ease), border-color var(--tph-med) var(--tph-ease);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--tph-shadow-lg);
  border-color: transparent;
}

.property-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--tph-surface-sunk);
}
.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--tph-ease);
}
.property-card:hover .property-image img {
  transform: scale(1.08);
}
.property-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.property-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
  flex-wrap: wrap;
}
.property-badge span {
  background: rgba(255,255,255,0.94);
  color: var(--tph-ink);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--tph-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
}
.property-badge span:first-child {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark));
  color: #fff;
}

.property-content {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.property-price {
  font-family: var(--tph-font-display);
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--tph-primary-dark);
}
.property-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--tph-ink);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}
.property-address {
  font-size: 0.76rem;
  color: var(--tph-slate);
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.property-address i {
  color: var(--tph-gold-dark);
}
.property-details {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--tph-border);
  font-size: 0.74rem;
  color: var(--tph-slate);
}
.property-details i {
  color: var(--tph-primary);
  margin-right: 3px;
}
.project-description {
  font-size: 0.76rem;
  color: var(--tph-slate);
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---------- Loading / error states ---------- */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
.loading-spinner .spinner-border {
  color: var(--tph-primary);
}
.tph-skeleton {
  border-radius: var(--tph-radius-md);
  background: linear-gradient(90deg, var(--tph-surface-sunk) 0%, #EDEAE3 50%, var(--tph-surface-sunk) 100%);
  background-size: 800px 100%;
  animation: tph-shimmer 1.6s linear infinite;
}
.error-message {
  text-align: center;
  padding: 32px 16px;
  color: var(--tph-slate);
}
.retry-btn {
  background: var(--tph-primary);
  color: #fff;
  border: none;
  border-radius: var(--tph-radius-pill);
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.82rem;
  margin-top: 10px;
  transition: background var(--tph-fast) var(--tph-ease), transform var(--tph-fast) var(--tph-ease);
}
.retry-btn:hover {
  background: var(--tph-primary-dark);
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--tph-navy);
  color: rgba(255,255,255,0.78);
  border-radius: 28px 28px 0 0;
  margin-top: 32px;
}
.site-footer .footer-title {
  color: #fff;
  font-family: var(--tph-font-display);
  font-weight: 700;
  font-size: 0.92rem;
  position: relative;
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.site-footer .footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  border-radius: var(--tph-radius-pill);
  background: var(--tph-gold);
}
.site-footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer .footer-links li {
  margin-bottom: 8px;
}
.site-footer .footer-links a {
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  font-size: 0.84rem;
  transition: color var(--tph-fast) var(--tph-ease), padding-left var(--tph-fast) var(--tph-ease);
}
.site-footer .footer-links a:hover {
  color: var(--tph-gold);
  padding-left: 4px;
}

/* ---------- Buttons ---------- */
.btn-post-property {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark));
  color: #fff !important;
  border: none;
  border-radius: var(--tph-radius-pill);
  font-family: var(--tph-font-display);
  font-weight: 700;
  box-shadow: var(--tph-shadow-primary);
  transition: transform var(--tph-fast) var(--tph-ease), box-shadow var(--tph-fast) var(--tph-ease);
}
.btn-post-property:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 32px rgba(179, 40, 45, 0.32);
}

/* ---------- Testimonials ---------- */
.tph-testimonial-card {
  background: var(--tph-surface);
  border-radius: var(--tph-radius-md);
  padding: 18px;
  box-shadow: var(--tph-shadow-sm);
  border: 1px solid var(--tph-border);
  position: relative;
  transition: box-shadow var(--tph-med) var(--tph-ease), transform var(--tph-med) var(--tph-ease);
}
.tph-testimonial-card:hover {
  box-shadow: var(--tph-shadow-md);
  transform: translateY(-3px);
}
.tph-testimonial-card .fa-quote-right {
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--tph-gold-tint);
  font-size: 1.6rem;
}
.tph-stars {
  color: var(--tph-gold);
  font-size: 0.78rem;
  margin-bottom: 8px;
}

/* ---------- Small notice / promo ---------- */
.tph-promo-card {
  border-radius: var(--tph-radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--tph-shadow-sm);
  transition: transform var(--tph-med) var(--tph-ease), box-shadow var(--tph-med) var(--tph-ease);
}
.tph-promo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tph-shadow-md);
}

/* ============================================================================
   Overrides for the homepage's existing hand-rolled classes — these give
   the current markup the new look without requiring HTML restructuring.
   Loaded last, so these win the cascade over the page's inline <style>.
   ============================================================================ */

.search-container {
  background: linear-gradient(160deg, var(--tph-navy) 0%, #0F1830 100%);
  border-bottom: none;
  padding: 18px 20px 26px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
}
.search-container::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,155,60,0.22) 0%, rgba(200,155,60,0) 70%);
  pointer-events: none;
}

.search-bar {
  border-radius: var(--tph-radius-lg);
  box-shadow: var(--tph-shadow-lg);
  border: none;
  padding: 10px 18px;
  position: relative;
  z-index: 1;
  transition: transform var(--tph-fast) var(--tph-ease);
}
.search-bar:hover {
  transform: translateY(-2px);
}
.search-input {
  font-family: var(--tph-font-body);
  font-size: 0.9rem;
}

.location-filter {
  background: linear-gradient(135deg, var(--tph-gold), var(--tph-gold-dark));
  font-family: var(--tph-font-display);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(200,155,60,0.35);
}
.location-filter:hover {
  background: linear-gradient(135deg, var(--tph-gold-dark), var(--tph-gold-dark));
}

.cat-grid {
  padding: 18px 12px 8px;
}
.cat-card {
  border-radius: var(--tph-radius-md);
  background: var(--tph-surface);
  box-shadow: var(--tph-shadow-sm);
  border: 1px solid var(--tph-border);
  transition: transform var(--tph-med) var(--tph-ease), box-shadow var(--tph-med) var(--tph-ease), border-color var(--tph-med) var(--tph-ease);
}
.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--tph-shadow-md);
  border-color: var(--tph-primary);
}
.cat-thumb {
  background: var(--tph-surface-sunk);
  height: 88px;
}
.cat-thumb img {
  transition: transform 500ms var(--tph-ease);
}
.cat-card:hover .cat-thumb img {
  transform: scale(1.12);
}
.cat-label {
  font-family: var(--tph-font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--tph-ink);
  padding: 8px 6px;
}

.nav-badge {
  background: var(--tph-primary);
  font-family: var(--tph-font-display);
}
.btn.nav-icon {
  transition: transform var(--tph-fast) var(--tph-ease), color var(--tph-fast) var(--tph-ease);
}
.btn.nav-icon:hover {
  transform: translateY(-2px);
  color: var(--tph-primary) !important;
}

/* ---------- Promo carousel — recolored to match the site palette ---------- */
.promo-carousel {
  border-radius: var(--tph-radius-lg);
  box-shadow: var(--tph-shadow-md);
}
.promo-slide-1 {
  background: linear-gradient(115deg, var(--tph-navy) 0%, #223761 60%, var(--tph-trust-blue) 100%);
}
.promo-slide-2 {
  background: linear-gradient(115deg, var(--tph-primary-dark) 0%, var(--tph-primary) 60%, #D45C52 100%);
}
.promo-slide-3 {
  background: linear-gradient(115deg, #3D2A0E 0%, var(--tph-gold-dark) 55%, var(--tph-gold) 100%);
}
.carousel-indicator.active {
  background: var(--tph-gold) !important;
}
.carousel-control {
  transition: transform var(--tph-fast) var(--tph-ease), background var(--tph-fast) var(--tph-ease);
}
.carousel-control:hover {
  transform: scale(1.08);
}

/* ---------- Expert / service icon badges ---------- */
.tph-expert-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: var(--tph-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tph-primary-tint);
  color: var(--tph-primary);
  font-size: 1.3rem;
  transition: transform var(--tph-fast) var(--tph-ease), background var(--tph-fast) var(--tph-ease), color var(--tph-fast) var(--tph-ease);
  box-shadow: var(--tph-shadow-sm);
}
.expert:hover .tph-expert-icon {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark));
  color: #fff;
  transform: translateY(-4px);
}
.expert .label {
  font-size: 0.74rem;
  font-weight: 600;
  margin-top: 8px;
  color: var(--tph-ink);
}

.service-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: var(--tph-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tph-gold-tint);
  color: var(--tph-gold-dark);
  font-size: 1.3rem;
  transition: transform var(--tph-fast) var(--tph-ease), background var(--tph-fast) var(--tph-ease), color var(--tph-fast) var(--tph-ease);
  box-shadow: var(--tph-shadow-sm);
}
.service-item:hover .service-icon {
  background: linear-gradient(135deg, var(--tph-gold), var(--tph-gold-dark));
  color: #fff;
  transform: translateY(-4px);
}

/* ---------- Testimonials (actual classes used in the markup) ---------- */
.testimonial-card {
  border-radius: var(--tph-radius-md);
  box-shadow: var(--tph-shadow-sm);
  border: 1px solid var(--tph-border);
  transition: box-shadow var(--tph-med) var(--tph-ease), transform var(--tph-med) var(--tph-ease);
  position: relative;
}
.testimonial-card:hover {
  box-shadow: var(--tph-shadow-md);
  transform: translateY(-3px);
}
.testimonial-text {
  font-family: var(--tph-font-body);
  font-style: normal;
  color: var(--tph-ink);
  font-size: 0.88rem;
  line-height: 1.55;
}
.author-image {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--tph-font-display);
  font-weight: 700;
  font-size: 0.85rem;
}
.author-details h6 {
  font-family: var(--tph-font-display);
  color: var(--tph-ink);
}
.author-details p {
  color: var(--tph-slate);
  font-size: 0.78rem;
  margin: 0;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  background: var(--tph-surface);
  box-shadow: 0 -4px 20px rgba(26,29,41,0.08);
  border-top: 1px solid var(--tph-border);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.nav-item {
  color: var(--tph-slate-light);
  font-family: var(--tph-font-display);
  font-weight: 600;
  font-size: 0.68rem;
  transition: color var(--tph-fast) var(--tph-ease), transform var(--tph-fast) var(--tph-ease);
  display: inline-block;
}
.nav-item:hover {
  transform: translateY(-2px);
  color: var(--tph-primary);
}
.nav-item.active {
  color: var(--tph-primary);
}
.nav-item.active .bottom-nav-icon {
  transform: scale(1.1);
}
.bottom-nav-icon {
  transition: transform var(--tph-fast) var(--tph-ease);
}

/* ============================================================================
   Category-page card variants — Pg, Service Apartment, and New Projects use
   their own class names instead of the shared .property-card ones. Same
   treatment, mapped onto their existing structure.
   ============================================================================ */
.pg-card, .project-card, .property-item {
  border-radius: var(--tph-radius-md) !important;
  box-shadow: var(--tph-shadow-sm) !important;
  border: 1px solid var(--tph-border);
  transition: transform var(--tph-med) var(--tph-ease), box-shadow var(--tph-med) var(--tph-ease) !important;
}
.pg-card:hover, .project-card:hover, .property-item:hover {
  transform: translateY(-6px) !important;
  box-shadow: var(--tph-shadow-lg) !important;
}

.pg-price, .project-price, .property-price {
  font-family: var(--tph-font-display);
  font-weight: 800;
  color: var(--tph-primary-dark);
}
.pg-title, .project-title, .property-title {
  font-family: var(--tph-font-display);
  font-weight: 600;
  color: var(--tph-ink);
}
.pg-badge, .project-badge, .featured-badge, .verified-badge {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark)) !important;
  border-radius: var(--tph-radius-pill) !important;
  font-family: var(--tph-font-display);
  font-weight: 700;
}
.verified-badge {
  background: linear-gradient(135deg, var(--tph-trust-blue), var(--tph-navy)) !important;
}

/* Per-category page header (Pg, Service Apartment, New Projects, etc. each
   render their own page title above the listings/filter row). */
.page-title {
  font-family: var(--tph-font-display);
  font-weight: 800;
  color: var(--tph-ink);
}
.page-subtitle {
  color: var(--tph-slate);
  font-family: var(--tph-font-body);
}
.filter-title, .modal-title {
  font-family: var(--tph-font-display);
  font-weight: 700;
  color: var(--tph-ink);
}

/* Generic buttons across category pages that use Bootstrap's btn-primary —
   re-skin to the brand color so "Search"/"Submit"/"Post" buttons everywhere
   match, without having to touch every page's markup individually. */
.btn-primary {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark)) !important;
  border-color: var(--tph-primary-dark) !important;
  font-family: var(--tph-font-display);
  font-weight: 600;
  transition: transform var(--tph-fast) var(--tph-ease), box-shadow var(--tph-fast) var(--tph-ease) !important;
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--tph-primary-dark), var(--tph-primary-dark)) !important;
  border-color: var(--tph-primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: var(--tph-shadow-primary);
}
.btn-outline-primary {
  color: var(--tph-primary) !important;
  border-color: var(--tph-primary) !important;
  font-family: var(--tph-font-display);
  font-weight: 600;
}
.btn-outline-primary:hover {
  background: var(--tph-primary) !important;
  border-color: var(--tph-primary) !important;
}
a, .text-primary { color: var(--tph-primary); }
.badge.bg-primary { background: var(--tph-primary) !important; }

/* ============================================================================
   Modals, forms, and tabs — shared Bootstrap primitives used across the
   login/signup modal AND every "add property" form sitewide. One set of
   rules here reaches all of them.
   ============================================================================ */
.modal-content {
  border-radius: var(--tph-radius-lg);
  border: none;
  box-shadow: var(--tph-shadow-lg);
}
.modal-title {
  font-size: 1.1rem;
}
.btn-close:focus {
  box-shadow: none;
}

.nav-tabs {
  border-bottom: 1px solid var(--tph-border);
}
.nav-tabs .nav-link {
  font-family: var(--tph-font-display);
  font-weight: 600;
  color: var(--tph-slate);
  border: none;
  border-bottom: 2px solid transparent;
  transition: color var(--tph-fast) var(--tph-ease), border-color var(--tph-fast) var(--tph-ease);
}
.nav-tabs .nav-link:hover {
  border-color: var(--tph-border);
}
.nav-tabs .nav-link.active {
  color: var(--tph-primary);
  background: transparent;
  border-bottom: 2px solid var(--tph-primary);
}

.form-control, .form-select {
  border-radius: var(--tph-radius-sm);
  border: 1px solid var(--tph-border);
  font-family: var(--tph-font-body);
  padding: 0.55rem 0.85rem;
  transition: border-color var(--tph-fast) var(--tph-ease), box-shadow var(--tph-fast) var(--tph-ease);
}
.form-control:focus, .form-select:focus {
  border-color: var(--tph-primary);
  box-shadow: 0 0 0 3px var(--tph-primary-tint);
}
.form-label {
  font-family: var(--tph-font-display);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--tph-ink);
}
.form-check-input:checked {
  background-color: var(--tph-primary);
  border-color: var(--tph-primary);
}
.input-group-text {
  background: var(--tph-surface-sunk);
  border-color: var(--tph-border);
  color: var(--tph-slate);
}

/* Step / progress indicators used in multi-step add-property forms */
.progress-bar, .step-indicator.active, .step.active {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark)) !important;
}

/* Alerts (used for form errors/success across the site) */
.alert-success {
  background: #E8F5EC;
  border-color: #C5E6D0;
  color: var(--tph-success);
}
.alert-danger {
  background: var(--tph-primary-tint);
  border-color: #F3D0D1;
  color: var(--tph-primary-dark);
}

/* ============================================================================
   Card consistency — PG and New Project cards unified to match Godown's
   badges, feature-tag pills, and action-button treatment exactly, without
   touching the underlying HTML/JS (different categories keep their own
   click handlers — savePG(), contactOwner(), share-project, etc.).
   ============================================================================ */

/* Feature tag pills — the small chips describing key attributes
   (room type, floors, BHK, etc.) — same pill treatment everywhere. */
.feature-tag, .pg-feature, .project-feature {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--tph-surface-sunk);
  color: var(--tph-slate);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--tph-radius-pill);
  margin: 0 6px 6px 0;
}
.feature-tag i, .pg-feature i, .project-feature i {
  color: var(--tph-primary);
}
.pg-features, .project-features {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Badges — one consistent pill treatment, stacked top-left, regardless of
   which category's badge classes render them. */
.pg-badge, .project-badge, .verified-badge, .featured-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark));
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--tph-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  z-index: 2;
}
/* Stack additional badges below the first instead of overlapping it */
.pg-badge ~ .verified-badge, .pg-badge ~ .featured-badge { top: 38px; }
.verified-badge ~ .featured-badge { top: 66px; }
.project-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: none;
  padding: 0;
}
.project-badge span {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark));
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--tph-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Action buttons (Call/WhatsApp on Godown, Contact/Save on PG & New
   Project) — identical sizing, spacing, and color language. */
.property-actions, .pg-actions, .project-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--tph-border);
}
.btn-action, .btn-contact, .btn-save, .btn-call, .btn-whatsapp {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--tph-radius-pill);
  padding: 9px 12px;
  font-family: var(--tph-font-display);
  font-weight: 700;
  font-size: 0.78rem;
  transition: transform var(--tph-fast) var(--tph-ease), box-shadow var(--tph-fast) var(--tph-ease);
}
.btn-call, .btn-contact {
  background: linear-gradient(135deg, var(--tph-primary), var(--tph-primary-dark));
  color: #fff;
}
.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-save {
  background: var(--tph-surface-sunk);
  color: var(--tph-ink);
}
.btn-action:hover, .btn-contact:hover, .btn-save:hover, .btn-call:hover, .btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: var(--tph-shadow-sm);
}

.pg-description, .project-description {
  font-size: 0.78rem;
  color: var(--tph-slate);
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---------- Property Experts / Home Services alignment fix ----------
   These two sections use different container classes (.expert vs
   .service-item) that had drifted to different padding, causing the
   rows to sit at different heights. Unified here so both sections
   align as a matching pair. */
.expert, .service-item {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.expert .label {
  font-size: 0.74rem !important;
}

/* ---------- Fixed bottom-nav clearance ----------
   Moved from body's padding-bottom (which left a visible white gap below
   the dark footer) to the footer itself, so the footer's own dark
   background fills the reserved space instead of showing white. */
.site-footer {
  padding-bottom: 70px;
}

/* ============================================================================
   DARK MODE — toggled via [data-theme="dark"] on <html>, set by theme.js
   and persisted in localStorage. Redefines both the new --tph-* tokens and
   the older per-page --primary/--dark-text/--muted/--white variables, since
   both patterns exist across the site — this way dark mode reaches pages
   built before and after the redesign without editing each one individually.
   ============================================================================ */
html[data-theme="dark"] {
  --tph-surface: #1E222C;
  --tph-surface-warm: #14171F;
  --tph-surface-sunk: #262B37;
  --tph-border: #333949;
  --tph-ink: #EDEEF2;
  --tph-slate: #9BA3B5;
  --tph-slate-light: #6B7386;
  --tph-primary-tint: #3A2224;
  --tph-gold-tint: #332A18;

  /* Older per-page variables (each page's own inline <style> defines these
     with light-mode values; this redefinition on the same html element
     wins the cascade since it's more specific and loads last). */
  --primary: #E24E49;
  --primary-dark: #B3282D;
  --primary-light: #ff8079;
  --dark: #EDEEF2;
  --dark-text: #EDEEF2;
  --light: #262B37;
  --muted: #262B37;
  --white: #1E222C;
  --border: #333949;
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
}

html[data-theme="dark"] body {
  background: var(--tph-surface-warm, #14171F);
  color: var(--tph-ink, #EDEEF2);
}
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .search-bar,
html[data-theme="dark"] .property-card,
html[data-theme="dark"] .cat-card,
html[data-theme="dark"] .testimonial-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .bottom-nav,
html[data-theme="dark"] .pg-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .property-item {
  background: var(--tph-surface, #1E222C);
  color: var(--tph-ink, #EDEEF2);
  border-color: var(--tph-border, #333949);
}
html[data-theme="dark"] .cat-thumb,
html[data-theme="dark"] .property-image,
html[data-theme="dark"] .tph-expert-icon,
html[data-theme="dark"] .service-icon {
  background: var(--tph-surface-sunk, #262B37);
}
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background: var(--tph-surface-sunk, #262B37);
  border-color: var(--tph-border, #333949);
  color: var(--tph-ink, #EDEEF2);
}
html[data-theme="dark"] .brand,
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 {
  color: var(--tph-ink, #EDEEF2);
}
html[data-theme="dark"] .text-dark {
  color: var(--tph-ink, #EDEEF2) !important;
}
html[data-theme="dark"] .site-footer {
  background: #0B0F1A;
}

/* Theme toggle switch used in Settings */
.theme-toggle-icon {
  width: 20px;
  text-align: center;
  color: var(--tph-gold, #C89B3C);
}

/* ============================================================================
   Global page scaling — the homepage was built with a centered, max-width
   "app" container (matching its mobile-first bottom-nav pattern), but inner
   pages never got this and stretched edge-to-edge on wide screens instead.
   Applied universally here so every page matches the homepage's scaling.
   ============================================================================ */
body {
  max-width: 2000px;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
}
