/* =========================================================
   HOMES BY MADHU — Components
   Reusable and page-scoped UI components: section headers,
   buttons, cards, page heroes, and individual page sections
   that are not part of the homepage (see home.css) or a form
   (see forms.css). Organized by component / page, top to bottom.
   ========================================================= */

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 12px; }
.section-header p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.gold-line {
  width: 60px; height: 3px; background: var(--gold);
  margin: 16px auto 0; border-radius: 2px;
}
.eyebrow { color: var(--red); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 14px; }

/* ── In-Page Section Navigation (shared: Intelligence Center, Communities) ── */
.section-subnav {
  position: sticky; top: 82px; z-index: 70;
  background: var(--white); border-bottom: 1px solid var(--cream-dark);
  overflow-x: auto;
}
.section-subnav-inner {
  display: flex; gap: 4px; white-space: nowrap;
}
.section-subnav a {
  display: block; padding: 16px 14px; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.03em; color: var(--text-muted); text-transform: uppercase;
  border-bottom: 3px solid transparent; transition: all var(--transition);
}
.section-subnav a:hover, .section-subnav a:focus-visible { color: var(--gold-dark); border-bottom-color: var(--gold); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em;
  transition: all var(--transition); text-transform: uppercase;
}
.btn-primary {
  background: var(--red); color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--red-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent; color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-outline:hover, .btn-outline:focus-visible { background: var(--gold); color: var(--white); }
.btn-white {
  background: var(--white); color: var(--brown);
}
.btn-white:hover, .btn-white:focus-visible { background: var(--cream); }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ── Page Hero (shared across interior pages) ── */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--brown);
  padding: 60px 0 40px;
  color: var(--white);
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
  opacity: 0.3;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,0.7); }
.page-hero--foundation { background: var(--ivory); min-height: 440px; display: flex; align-items: center; }
/* .page-hero h1/p above are styled for the dark .page-hero background;
   --foundation swaps in a light (ivory) background, so text color must be
   re-declared here or it renders as near-invisible white-on-ivory. */
.page-hero--foundation h1 { color: var(--brown); }
.page-hero--foundation p { color: var(--text-muted); }
.page-hero-content { max-width: 820px; }
.development-note { margin-top: 28px; padding: 16px 18px; border-left: 3px solid var(--gold); background: var(--white); color: var(--text-muted); font-size: 0.88rem; }
.breadcrumb {
  font-size: 0.8rem; color: rgba(255,255,255,0.5);
  margin-bottom: 12px; display: flex; gap: 8px; align-items: center;
}
.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: var(--white); }

.text-link { display: inline-block; margin-top: 20px; color: var(--red); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── Property Cards (shared: /listings grid + listing detail "related") ── */
.property-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.property-card-img {
  position: relative; height: 220px; overflow: hidden;
}
.property-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.property-card:hover .property-card-img img { transform: scale(1.04); }
.property-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--gold); color: var(--white);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 20px; text-transform: uppercase;
}
.property-card-body { padding: 20px; }
.property-price {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 700; color: var(--gold);
}
.property-address {
  font-size: 0.88rem; color: var(--text-muted); margin: 4px 0 12px;
}
.property-meta {
  display: flex; gap: 16px; font-size: 0.82rem; color: var(--text-muted);
  border-top: 1px solid var(--cream-dark); padding-top: 12px; margin-top: 8px;
}
.property-meta-item { display: flex; align-items: center; gap: 5px; }
.property-meta-item svg { opacity: 0.6; }

/* ── List Your Home Banner (shared: /listings, /testimonials) ── */
.list-banner {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 60%, var(--gold-light) 100%);
  padding: 64px 0; text-align: center; color: var(--white);
}
.list-banner h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--white); margin-bottom: 12px; }
.list-banner p { opacity: 0.88; margin-bottom: 32px; font-size: 1.05rem; }

/* ── Transparency / Expertise Grid (shared: /about, /sell) ── */
.transparency-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
}
.transparency-item { text-align: center; }
.transparency-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.transparency-icon svg { color: var(--gold); }
.transparency-item h4 { font-size: 1rem; margin-bottom: 8px; }
.transparency-item p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.65; }

/* ── Testimonials (shared: /sell, /testimonials) ── */
.testimonials-section { background: var(--cream); }
.testimonials-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.testimonials-page-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 28px;
}
.testimonial-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
  position: relative;
}
.testimonial-quote {
  font-size: 3rem; line-height: 1; color: var(--gold); opacity: 0.3;
  font-family: var(--font-serif); margin-bottom: -16px;
}
.testimonial-text {
  font-size: 0.92rem; color: var(--text-muted); line-height: 1.75;
  margin-bottom: 20px; font-style: italic;
}
.testimonial-stars { color: var(--star-gold); font-size: 1rem; margin-bottom: 12px; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.testimonial-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--gold);
}
.testimonial-name { font-weight: 600; font-size: 0.9rem; }
.testimonial-loc { font-size: 0.78rem; color: var(--text-muted); }

/* ── Property Detail Page ── */
.property-detail { padding: 48px 0; }
.detail-gallery {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 40px;
}
.detail-gallery-main { height: 420px; }
.detail-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery-side { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; }
.detail-gallery-side img { width: 100%; height: 208px; object-fit: cover; }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 40px; }
.detail-main h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 4px; }
.detail-price {
  font-family: var(--font-serif);
  font-size: 2rem; color: var(--gold); font-weight: 700; margin: 8px 0;
}
.detail-meta-row {
  display: flex; gap: 24px; margin: 16px 0 24px;
  padding: 16px 0; border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
}
.detail-meta-item { text-align: center; }
.detail-meta-item strong { display: block; font-size: 1.2rem; font-family: var(--font-serif); }
.detail-meta-item span { font-size: 0.78rem; color: var(--text-muted); }
.detail-description { font-size: 0.95rem; color: var(--text-muted); line-height: 1.8; }
.detail-facts { margin-top: 28px; }
.detail-facts h3 { font-size: 1.1rem; margin-bottom: 14px; }
.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact-row {
  display: flex; justify-content: space-between;
  font-size: 0.87rem; padding: 8px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.fact-label { color: var(--text-muted); }
.fact-value { font-weight: 600; }
.contact-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-md);
  position: sticky; top: 90px;
}
.contact-card .agent-photo {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gold); margin-bottom: 12px;
}
.contact-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.contact-card .agent-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }

/* ── About Page ── */
.about-hero { padding: 80px 0; background: var(--cream); }
.about-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-photo {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3/4; background: var(--cream-dark);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-content .eyebrow {
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px; font-weight: 600;
}
.about-content h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 16px; }
.about-content p { color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; font-size: 0.95rem; }
.about-creds {
  display: flex; gap: 32px; margin: 28px 0; flex-wrap: wrap;
}
.cred { text-align: center; }
.cred strong {
  display: block; font-family: var(--font-serif);
  font-size: 2rem; color: var(--gold);
}
.cred span { font-size: 0.78rem; color: var(--text-muted); }

/* ── Contact Page ── */
.contact-page { padding: 64px 0; }
.contact-page-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; }
.contact-info h2 { font-size: 1.8rem; margin-bottom: 20px; }
.contact-info p { color: var(--text-muted); line-height: 1.8; margin-bottom: 24px; }
.contact-detail-item {
  display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start;
}
.contact-detail-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream); border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--gold);
}
.contact-detail-text .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-detail-text strong { display: block; font-size: 0.95rem; }

/* ── Blog ── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px; }
.blog-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-img { height: 200px; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body { padding: 22px; }
.blog-category {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--gold); margin-bottom: 8px;
}
.blog-card-body h3 { font-size: 1rem; margin-bottom: 10px; line-height: 1.4; }
.blog-card-body p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }
.blog-meta { font-size: 0.78rem; color: var(--gray); display: flex; gap: 12px; }

/* ── Sell Page ── */
.sell-hero {
  position: relative; min-height: 520px;
  display: flex; align-items: center;
  overflow: hidden; background: var(--cream);
}
.sell-hero-photo {
  position: absolute; top: 0; right: 0;
  width: 65%; height: 100%;
  background-image: url('https://images.unsplash.com/photo-1551836022-d5d88e9218df?w=1200&q=80');
  background-size: cover; background-position: center top;
}
.sell-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, var(--cream) 30%, rgba(245,240,232,0.75) 50%, transparent 70%);
}
.sell-hero-inner { position: relative; z-index: 1; padding: 80px 0; }
.sell-hero-content { max-width: 420px; }
.sell-hero-content h1 { color: var(--brown); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.sell-hero-content p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 32px; line-height: 1.7; }
.btn-sell-hero {
  display: inline-flex; align-items: center;
  padding: 14px 28px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em;
  background: var(--gold); color: var(--white); transition: all var(--transition);
}
.btn-sell-hero:hover { background: var(--gold-dark); }

.sell-tagline {
  font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 12px;
}
.sell-approach-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 48px;
}
.sell-approach-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 32px 28px;
  box-shadow: var(--shadow-sm); text-align: center;
  border-top: 3px solid var(--gold);
}
.sell-approach-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; color: var(--gold);
}
.sell-approach-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.sell-approach-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

.sell-expect {
  background: var(--cream-dark); border-radius: var(--radius-lg);
  padding: 40px; text-align: center; border-left: 4px solid var(--gold);
}
.sell-expect h3 { font-size: 1.4rem; margin-bottom: 20px; }
.sell-expect-list {
  list-style: none; margin-bottom: 28px; display: inline-block; text-align: left;
}
.sell-expect-list li {
  padding: 6px 0 6px 28px; position: relative;
  font-size: 0.95rem; color: var(--text-muted);
}
.sell-expect-list li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--gold); font-weight: 700;
}

.sell-marketing { background: var(--cream); }
.sell-marketing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.sell-marketing-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 32px 28px;
  box-shadow: var(--shadow-sm); text-align: center;
}
.sell-marketing-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; color: var(--gold);
}
.sell-marketing-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.sell-marketing-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }

.sell-transparency { background: var(--white); }

/* ── Home Valuation Page ── */
.valuation-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: start;
}
.valuation-info h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); margin-bottom: 16px; }
.valuation-info > p { color: var(--text-muted); line-height: 1.8; margin-bottom: 32px; }
.valuation-steps { display: flex; flex-direction: column; gap: 24px; }
.valuation-step {
  display: flex; gap: 16px; align-items: flex-start;
}
.valuation-step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.valuation-step h4 { font-size: 0.95rem; margin-bottom: 4px; }
.valuation-step p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.6; }

/* ── Tools and Resources Page ── */
.tools-hero { min-height: 390px; }

/* ── Legal / Static Content Pages ── */
.legal-content { max-width: 800px; }
.legal-content .development-note { margin-bottom: 40px; }
.legal-content h2 { font-size: 1.3rem; margin-bottom: 12px; margin-top: 32px; }
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p { color: var(--text-muted); line-height: 1.8; }
.legal-content a { color: var(--gold); }

/* ── Intelligence Center Page ── */
.intel-status .development-note { max-width: 860px; margin-left: auto; margin-right: auto; text-align: center; color: var(--text-muted); }

.intel-section--alt { background: var(--ivory); }

/* Stat tiles (Market at a Glance, Luxury Market, Regional Dashboard) */
.stat-tile-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}
.stat-tile {
  background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold);
  padding: 24px;
}
.stat-tile-label { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px; }
.stat-tile-value { display: block; font-family: var(--font-serif); font-size: 1.7rem; font-weight: 700; color: var(--brown); }
.stat-tile-value--pending { color: var(--line); }
.stat-tile-pending { display: block; margin-top: 4px; font-size: 0.72rem; color: var(--gray); font-style: italic; }

/* Pending chart (Weekly Snapshot, Monthly Intelligence) */
.pending-chart { margin-top: 8px; }
.pending-chart svg { width: 100%; height: auto; display: block; background: var(--white); border: 1px solid var(--line); }
.pending-chart-axis { stroke: var(--text-muted); stroke-width: 1.5; }
.pending-chart-grid { stroke: var(--cream-dark); stroke-width: 1; }
.pending-chart-line { stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 6; fill: none; }
.pending-chart figcaption { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); text-align: center; }

.intel-report-placeholder {
  margin-top: 28px; padding: 24px; text-align: center;
  border: 1px dashed var(--line); color: var(--text-muted); font-size: 0.9rem;
}

/* Regional Dashboard */
.region-dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.region-dash-card { background: var(--white); border: 1px solid var(--line); padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.region-dash-card strong { font-family: var(--font-serif); font-size: 1.25rem; }
.region-dash-stats { display: flex; flex-direction: column; gap: 10px; }
.region-dash-stats .stat-tile { padding: 14px; border-top-width: 2px; }
.region-dash-stats .stat-tile-value { font-size: 1.2rem; }

/* Madhu's Perspective */
.perspective-card { max-width: 720px; border: 1px solid var(--line); }

/* Market Archive */
.archive-empty {
  padding: 40px; text-align: center;
  border: 1px dashed var(--line); color: var(--text-muted); font-size: 0.9rem;
}

/* Buyer / Seller View */
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.audience-card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--black); padding: 32px; }
.audience-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.audience-card p { color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.audience-card ul { margin-bottom: 24px; }
.audience-card li { position: relative; padding-left: 20px; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.audience-card li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }

/* Final CTA (page-scoped variant of the homepage final-CTA pattern; also used by Communities) */
.intel-cta { padding: 80px 0; background: var(--charcoal); color: var(--white); border-bottom: 4px solid var(--gold); }
.intel-cta h2 { color: var(--white); max-width: 640px; margin-bottom: 12px; }
.intel-cta p { color: rgba(255,255,255,0.7); }
.intel-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 48px; }

/* ── Communities Page ── */
.region-detail--alt { background: var(--ivory); }
.region-detail-header { max-width: 820px; margin-bottom: 40px; }
.region-detail-overview { color: var(--text-muted); font-size: 1.05rem; line-height: 1.8; margin-top: 4px; }
.region-detail-media {
  margin: 28px 0 0;
  max-width: 100%;
  overflow: hidden;
}
.region-detail-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 640;
  object-fit: cover;
}
.region-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-bottom: 48px; }
.region-detail-col h3 { font-size: 1.05rem; margin-bottom: 8px; }
.region-detail-col h3:not(:first-child) { margin-top: 28px; }
.region-detail-col p { color: var(--text-muted); line-height: 1.75; font-size: 0.94rem; }
.city-chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.city-chip {
  padding: 8px 16px; border: 1.5px solid var(--gold); border-radius: 20px;
  background: var(--cream); color: var(--brown); font-size: 0.85rem; font-weight: 600;
}
.region-detail-market { margin-bottom: 44px; }
.region-detail-market h3 { font-size: 1.05rem; margin-bottom: 16px; }
.region-detail-cta {
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
  padding: 28px 32px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold);
}
.region-detail-cta p { color: var(--text-muted); max-width: 480px; }
.region-detail-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.region-detail--alt .region-detail-cta { background: var(--white); }
