/* ============================================================
   Houston First Time Home Buyer — Resource Hub & Guides
   ------------------------------------------------------------
   Additive layer for /resources/. Loaded AFTER styles.css and
   houston-elevate.css so it can lean on their tokens
   (--cream, --gold, --ink) without redefining the palette.

   Kept in its own file on purpose: the shared stylesheets carry
   unrelated in-flight edits, and the hub should be able to land
   or be reverted without disturbing them.
   ============================================================ */

/* ---- Skip link (no equivalent existed site-wide) ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 20px;
  background: var(--ink, #14110e);
  color: var(--cream, #f5f0e8);
  font-size: 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---- Visible focus for the whole resources surface ---- */
.resources-page a:focus-visible,
.resources-page button:focus-visible,
.resources-page summary:focus-visible {
  outline: 3px solid var(--gold, #c9a227);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Breadcrumbs ---- */
.breadcrumb {
  padding: 0;
  margin: 0 0 24px;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}
.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(20, 17, 14, 0.62);
}
.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: rgba(20, 17, 14, 0.38);
}
.breadcrumb-item a {
  color: rgba(20, 17, 14, 0.72);
  text-decoration: underline;
  text-underline-offset: 3px;
  /* 44px tap target without disturbing the inline baseline */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.breadcrumb-item a:hover {
  color: #75551d;
}
.breadcrumb-item[aria-current="page"] {
  color: rgba(20, 17, 14, 0.72);
}

/* ---- Answer-first summary box ---- */
.answer-box {
  border-left: 3px solid var(--gold, #c9a227);
  background: rgba(201, 162, 39, 0.06);
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 6px 6px 0;
}
.answer-box-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #75551d;
  margin: 0 0 10px;
  font-weight: 600;
}
.answer-box p {
  font-size: 18px;
  line-height: 1.65;
  margin: 0;
}

/* ---- Table of contents ---- */
.toc {
  border: 1px solid rgba(20, 17, 14, 0.12);
  border-radius: 6px;
  padding: 22px 26px;
  margin: 32px 0;
}
.toc-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(20, 17, 14, 0.55);
  margin: 0 0 12px;
  font-weight: 600;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li + li {
  margin-top: 4px;
}
.toc-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: rgba(20, 17, 14, 0.8);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.toc-list a:hover {
  color: var(--gold, #c9a227);
}

/* ---- Guide prose ---- */
.guide-body {
  font-size: 17px;
  line-height: 1.75;
}
.guide-body h2 {
  margin: 48px 0 8px;
  scroll-margin-top: 96px;
}
.guide-body h3 {
  margin: 32px 0 8px;
  scroll-margin-top: 96px;
}
.guide-body p {
  margin: 0 0 18px;
}
.guide-body ul,
.guide-body ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.guide-body li {
  margin-bottom: 10px;
}
.guide-body a {
  color: #8a6d12;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.guide-body a:hover {
  color: var(--gold, #c9a227);
}

/* ---- Step list (buying process) ---- */
.step-list {
  list-style: none;
  padding: 0;
  margin: 32px 0;
  counter-reset: step;
}
.step-item {
  position: relative;
  padding: 0 0 28px 60px;
  counter-increment: step;
}
.step-item::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: 24px;
  color: var(--gold, #c9a227);
  line-height: 1.2;
}
.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 32px;
  bottom: 4px;
  width: 1px;
  background: rgba(201, 162, 39, 0.28);
}
.step-title {
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 6px;
}

/* ---- Hub cards ---- */
.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(20, 17, 14, 0.12);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.resource-card:hover {
  border-color: rgba(201, 162, 39, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(20, 17, 14, 0.07);
}
.resource-card-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold, #c9a227);
  font-weight: 600;
  margin: 0 0 10px;
}
.resource-card-title {
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.resource-card-title a {
  color: inherit;
  text-decoration: none;
}
/* Whole card clickable, link still the only focus target */
.resource-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.resource-card {
  position: relative;
}
.resource-card-title a:hover {
  color: var(--gold, #c9a227);
}
.resource-card-desc {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(20, 17, 14, 0.72);
  margin: 0 0 16px;
}
.resource-card-meta {
  margin-top: auto;
  font-size: 14px;
  color: rgba(20, 17, 14, 0.72);
}

@media (min-width: 720px) {
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1040px) {
  .resource-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- FAQ (native disclosure — these pages load no JS) ---- */
.faq-native {
  border-top: 1px solid rgba(20, 17, 14, 0.12);
  margin: 32px 0 0;
}
.faq-native details {
  border-bottom: 1px solid rgba(20, 17, 14, 0.12);
}
.faq-native summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 18px 0;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-native summary::-webkit-details-marker {
  display: none;
}
.faq-native summary::after {
  content: "+";
  color: var(--gold, #c9a227);
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.faq-native details[open] summary::after {
  content: "−";
}
.faq-native .faq-answer {
  padding: 0 0 20px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(20, 17, 14, 0.78);
}

/* ---- Official source citations ---- */
.source-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.source-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(20, 17, 14, 0.1);
  font-size: 16px;
  line-height: 1.6;
}
.source-item:first-child {
  border-top: 1px solid rgba(20, 17, 14, 0.1);
}
.source-item a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: #8a6d12;
  text-decoration: underline;
  text-underline-offset: 3px;
  /* long official URLs must not push the page sideways on mobile */
  overflow-wrap: anywhere;
}
.source-item a:hover {
  color: var(--gold, #c9a227);
}
.source-item-note {
  display: block;
  color: rgba(20, 17, 14, 0.62);
  margin-top: 2px;
}

/* ---- Last reviewed + educational disclaimer ---- */
.last-reviewed {
  font-size: 14px;
  color: rgba(20, 17, 14, 0.55);
  margin: 0;
}
.edu-disclaimer {
  border: 1px solid rgba(20, 17, 14, 0.14);
  border-radius: 6px;
  background: rgba(20, 17, 14, 0.03);
  padding: 20px 24px;
  margin: 40px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(20, 17, 14, 0.7);
}
.edu-disclaimer strong {
  color: rgba(20, 17, 14, 0.85);
}

/* ---- Inline next-step CTA inside guides ---- */
.guide-cta {
  border-radius: 8px;
  background: var(--ink, #14110e);
  padding: 32px;
  margin: 48px 0 0;
  text-align: center;
}
.guide-cta-title {
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: 28px;
  line-height: 1.25;
  color: var(--cream, #f5f0e8);
  margin: 0 0 10px;
}
.guide-cta-copy {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(245, 240, 232, 0.68);
  margin: 0 0 22px;
}
.guide-cta a:focus-visible {
  outline: 3px solid var(--cream, #f5f0e8);
  outline-offset: 3px;
}
/* .btn is white-space:nowrap, so long CTA labels can exceed a narrow viewport. */
@media (max-width: 560px) {
  .guide-cta .final-cta-actions .btn {
    white-space: normal;
    min-width: 0;
    text-align: center;
  }
}

/* ---- Related links ---- */
.related-links {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.related-links li + li {
  margin-top: 4px;
}
.related-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: #8a6d12;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.related-links a:hover {
  color: var(--gold, #c9a227);
}

@media (prefers-reduced-motion: reduce) {
  .resource-card {
    transition: none;
  }
  .resource-card:hover {
    transform: none;
  }
}
