/* colors.css imported globally via style.css */
/* ==========================================================================
  _headers.css – Page Headings, Subheadings, and Typography Utilities
  ========================================================================== */

/* ==========================================================================
  Table of Contents
  ========================================================================== */
/**
 * 1.0 Base Header Styles (h1–h6)
 * 2.0 Page Titles
 * 3.0 Subheaders
 * 4.0 Utilities (alignment, spacing, emphasis)
 * 5.0 Dark Mode Overrides
 */

/* ==========================================================================
   1. Base Header Styles (h1–h6)
   ========================================================================== */

h1 {
  margin: 0 0 1rem;
  color: var(--kaplon-blue);
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  margin: 0 0 0.85rem;
  color: var(--kaplon-dark-gray);
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  margin: 0 0 0.75rem;
  color: var(--kaplon-charcoal);
  font-size: 1.75rem;
  font-weight: 600;
}

h4 {
  margin: 0 0 0.65rem;
  color: var(--kaplon-gray);
  font-size: 1.5rem;
  font-weight: 600;
}

h5 {
  margin: 0 0 0.5rem;
  color: var(--kaplon-light-gray);
  font-size: 1.25rem;
  font-weight: 500;
}

h6 {
  margin: 0 0 0.4rem;
  color: var(--kaplon-muted);
  font-size: 1rem;
  font-weight: 500;
}

/* ==========================================================================
   2. Page Titles
   ========================================================================== */

.page-title {
  margin: 0 0 1.5rem;
  color: var(--kaplon-blue);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
}

/* ==========================================================================
   3. Subheaders
   ========================================================================== */

.subheader {
  margin: 0 0 1rem;
  color: var(--kaplon-dark-gray);
  font-size: 1.25rem;
  font-weight: 600;
}

/* ==========================================================================
   4. Utilities (alignment, spacing, emphasis)
   ========================================================================== */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-1 {
  margin-bottom: var(--space-1) !important;
  /* 0.5rem */
}

.mb-2 {
  margin-bottom: var(--space-3) !important;
  /* 1rem */
}

.mb-3 {
  margin-bottom: var(--space-4) !important;
  /* 1.5rem */
}

.font-bold {
  font-weight: 700 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

.text-muted {
  color: var(--kaplon-muted);
}

/* Featured/section headings – separation and subtle underline (IDX-scoped) */
.IDX-wrapper-standard :where(h1.IDX-pageTitle, h2.IDX-pageTitle, .idx-section-title, .IDX-featuredTitle) {
  margin-top: 16px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--dark-border-mid);
}

/* =============================================================================
   Houzez: Hide author meta timestamp line
   - Global: hide .author-meta anywhere on the frontend per site preference
   - IDX-specific: ensure hidden within hosted/gallery wrappers too
   - Stronger cascade with !important + container/child coverage
   Rollback: remove this entire block to restore timestamps
   ========================================================================== */
.author-meta,
.post-header-wrap .author-meta,
.IDX-wrapper-standard .author-meta,
.idx-wrapper-full .author-meta,
.single-idx-wrapper .author-meta,
ul.list-unstyled.list-inline.author-meta,
.author-meta>li,
.post-header-wrap .author-meta>li {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
}

/* ==========================================================================
   5.0 Dark Mode Overrides
   ========================================================================== */

/* =======================================================================
   Kaplon IDX Subheader – Sold/Pending (scoped to IDX only)
   Purpose: Style the IDX "Subheader" content block above the showcase
   Rollback: remove this entire block
   ======================================================================= */

.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) {
  max-width: 72rem;
  margin: 0 auto var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-1);
}

.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(h1, h2) {
  margin: 0 0 var(--space-1);
  color: var(--kaplon-blue);
  /* Kaplon Blue */
  font-family:
    Montserrat,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  font-size: clamp(1.375rem, 2vw + 1rem, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(p) {
  margin: 0 0 var(--space-2);
  font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.05rem);
  line-height: 1.6;
}

.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-actions) {
  display: flex;
  flex-wrap: wrap;
  margin: var(--space-1) 0 calc(var(--space-1) / 2);
  gap: var(--space-1);
}

.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-cta) {
  display: inline-block;
  padding: calc(var(--space-2) - 2px) calc(var(--space-3) - 2px);
  background: var(--kaplon-red);
  /* Kaplon Red */
  border: 1px solid transparent;
  border-radius: var(--btn-radius, var(--radius-1, 6px));
  color: var(--white);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-cta):hover,
.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-cta):focus-visible {
  background: var(--kaplon-red-dark);
  /* darker red for WCAG AA hover/focus */
  box-shadow: var(--shadow-focus);
  outline: 2px solid transparent;
}

.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-cta.ks-cta--outline) {
  background: var(--white);
  border-color: var(--kaplon-blue);
  color: var(--kaplon-blue);
}

.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-cta.ks-cta--outline):hover,
.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-cta.ks-cta--outline):focus-visible {
  background: var(--kaplon-blue);
  color: var(--white);
}

.IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-mls-note) {
  opacity: 0.85;
  font-size: 12px;
}

/* Dark mode respect (IDX-scoped) */

/* md+ screens */
@media (min-width: 768px) {
  .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) {
    margin-bottom: calc(var(--space-2) + var(--space-1));
    padding: calc(var(--space-3) + var(--space-1)) var(--space-4) var(--space-2);
  }

  .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-actions) {
    gap: var(--space-2);
  }
}

/* Mobile polish: IDX Subheader */
@media (max-width: 480px) {
  .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) {
    margin-bottom: var(--space-2);
    padding: calc(var(--space-2) - 2px) var(--space-2) var(--space-1);
  }

  .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(h1, h2) {
    font-size: clamp(1.15rem, 3.5vw + 0.7rem, 1.4rem);
  }

  .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-actions) {
    flex-direction: column;
    gap: var(--space-1);
  }

  .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-cta) {
    width: 100%;
    min-height: 44px;
    /* finger‑friendly */
    text-align: center;
  }

  .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-mls-note) {
    font-size: 11px;
    line-height: 1.4;
  }
}
@media (prefers-color-scheme: dark) {
  html[data-kaplon-color-mode=system] h1,html[data-kaplon-color-mode=system] 
  h2,html[data-kaplon-color-mode=system] 
  h3,html[data-kaplon-color-mode=system] 
  h4,html[data-kaplon-color-mode=system] 
  h5,html[data-kaplon-color-mode=system] 
  h6,html[data-kaplon-color-mode=system] 
  .page-title,html[data-kaplon-color-mode=system] 
  .subheader {
    color: var(--white);
  }

  html[data-kaplon-color-mode=system] .text-muted {
    color: var(--gray-600) !important;
  }
  html[data-kaplon-color-mode=system] .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) {
    color: var(--gray-200);
  }

  html[data-kaplon-color-mode=system] .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(h1, h2) {
    color: var(--gray-200);
  }

  html[data-kaplon-color-mode=system] .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-cta.ks-cta--outline) {
    background: transparent;
    border-color: var(--gray-200);
    color: var(--gray-200);
  }
}
html[data-kaplon-color-mode=dark] h1,html[data-kaplon-color-mode=dark] 
  h2,html[data-kaplon-color-mode=dark] 
  h3,html[data-kaplon-color-mode=dark] 
  h4,html[data-kaplon-color-mode=dark] 
  h5,html[data-kaplon-color-mode=dark] 
  h6,html[data-kaplon-color-mode=dark] 
  .page-title,html[data-kaplon-color-mode=dark] 
  .subheader {
    color: var(--white);
  }
html[data-kaplon-color-mode=dark] .text-muted {
    color: var(--gray-600) !important;
  }
html[data-kaplon-color-mode=dark] .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) {
    color: var(--gray-200);
  }
html[data-kaplon-color-mode=dark] .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(h1, h2) {
    color: var(--gray-200);
  }
html[data-kaplon-color-mode=dark] .IDX-wrapper-standard #IDX-Subheader :where(.kaplon-subheader) :where(.ks-cta.ks-cta--outline) {
    background: transparent;
    border-color: var(--gray-200);
    color: var(--gray-200);
  }
