/* Blog hero card + Remodeling Guide buttons and pages.
   Used by: /blog/, /kitchen-remodeling-guide/ (and its topic pages),
   /bathroom-remodeling-guide/ (and its topic pages).
   Guide pages are generated by scripts/build-guides.mjs (npm run guides). */

/* Hero: cream card, copy on the left, guide buttons on the right.
   --g is the article grid's left edge (the .container gutter), --m the card's
   outer margin; padding-left = --g - --m puts the headline on the grid edge. */
.blog-page-hero.bl-hero { background: #fff; background-image: none; padding: 84px 0 28px; text-align: left; }
.bl-hero-card { --g: max(32px, calc((100% - 1136px) / 2)); --m: max(8px, calc(var(--g) - 48px));
  margin: 0 var(--m); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 40px;
  background: #f6f3ee; border-radius: 14px; padding: 14px calc(var(--g) - var(--m)) 14px; }
.bl-hero-text, .bl-hero-media { min-width: 0; }
.bl-hero-text { padding: 8px 0; }
.bl-hero .blog-page-label { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; margin: 0 0 12px; }
.bl-hero .blog-page-title { font-family: var(--sans); font-weight: 700; font-size: clamp(1.6rem, 2.48vw, 2.4rem); line-height: 1.05; letter-spacing: -0.03em; text-transform: none; color: var(--charcoal); }
.bl-hero .blog-page-title em { display: block; font-style: normal; color: var(--red); font-weight: 700; }
.bl-hero .blog-page-sub { color: #555; font-weight: 400; font-size: clamp(15px, 1.15vw, 16px); line-height: 1.55; margin: 12px 0 0; max-width: 500px; }
.bl-hero-media { border-radius: 10px; overflow: hidden; height: 280px; width: 100%; background: var(--cream-mid); }
.bl-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 960px) {
  .blog-page-hero.bl-hero { padding-top: 80px; }
  .bl-hero-card { grid-template-columns: 1fr; gap: 14px; padding: 18px calc(var(--g) - var(--m)) calc(var(--g) - var(--m)); }
  .bl-hero-text { padding: 0; }
  .bl-hero .blog-page-label { margin-bottom: 10px; font-size: 11px; }
  .bl-hero-media { height: 200px; }
}
@media (max-width: 768px) { .bl-hero-card { --g: 20px; } }
@media (max-width: 480px) { .blog-page-hero.bl-hero { padding-top: 96px; } }

/* Guide buttons: two tiles filling the box the hero photo used to occupy. */
.bl-hero-media.bl-guides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: transparent; border-radius: 0; overflow: visible; }
.bl-guide { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%; padding: 26px 26px 24px; border-radius: 10px;
  background: #fff; color: var(--charcoal); text-decoration: none; border: 1px solid rgba(15,15,15,0.06); box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease; }
.bl-guide:hover { background: var(--charcoal); color: #fff; box-shadow: 0 14px 36px rgba(0,0,0,0.16); transform: translateY(-2px); }
.bl-guide:focus-visible { outline: 2px solid #c8372d; outline-offset: 3px; }
.bl-guide[aria-current="page"] { background: var(--charcoal); color: #fff; }
.bl-guide-icon { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #f6f3ee; color: #c8372d; transition: background 0.25s ease; }
.bl-guide:hover .bl-guide-icon, .bl-guide[aria-current="page"] .bl-guide-icon { background: rgba(255,255,255,0.1); }
.bl-guide-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bl-guide-kicker { margin-top: auto; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #c8372d; }
.bl-guide:hover .bl-guide-kicker, .bl-guide[aria-current="page"] .bl-guide-kicker { color: #ff8a80; }
.bl-guide-name { margin-top: 8px; font-size: clamp(1.2rem, 1.75vw, 1.6rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
.bl-guide-more { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: #c8372d; }
.bl-guide:hover .bl-guide-more, .bl-guide[aria-current="page"] .bl-guide-more { color: #fff; }
.bl-guide-more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.bl-guide:hover .bl-guide-more svg { transform: translateX(4px); }
@media (max-width: 960px) { .bl-guide { padding: 20px 20px 18px; } .bl-guide-icon { width: 40px; height: 40px; } }
@media (max-width: 480px) {
  .bl-hero-media.bl-guides { height: auto; gap: 10px; }
  .bl-guide { min-height: 184px; padding: 16px 16px 16px; }
  .bl-guide-name { font-size: 1.12rem; }
  .bl-guide-more { font-size: 14px; }
}

/* Guide pages */
.gd-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 13px; color: #6e6e6e; }
.gd-crumbs li + li::before { content: "/"; margin-right: 6px; color: #b5b5b5; }
.gd-crumbs a { color: #6e6e6e; text-decoration: none; }
.gd-crumbs a:hover { color: #c8372d; }
.gd-body { background: #fff; padding: 48px 0 96px; }
.gd-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 64px; align-items: start; }
.gd-toc { position: sticky; top: 100px; }
.gd-toc-title { margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--charcoal); }
.gd-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--cream-dark); }
.gd-toc li a { display: flex; gap: 10px; padding: 9px 0 9px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: #555; text-decoration: none; transition: color 0.2s ease, border-color 0.2s ease; }
.gd-toc li a:hover { color: var(--charcoal); }
.gd-toc li a[aria-current="page"] { color: var(--charcoal); font-weight: 600; border-left-color: #c8372d; }
.gd-toc-num { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: #c8372d; font-weight: 600; }
.gd-toc-all { display: inline-block; margin-top: 18px; font-size: 14px; font-weight: 500; color: #c8372d; text-decoration: none; }
.gd-toc-all:hover { text-decoration: underline; }
.gd-section { padding: 36px 0; border-top: 1px solid var(--cream-dark); scroll-margin-top: 100px; }
.gd-section:first-child { padding-top: 0; border-top: 0; }
.gd-num { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #c8372d; }
.gd-h2 { margin: 0; font-family: var(--sans); font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--charcoal); }
.gd-h2 a { color: inherit; text-decoration: none; }
.gd-h2 a:hover { color: #c8372d; }
.gd-blurb { margin: 10px 0 0; max-width: 680px; font-size: 16px; line-height: 1.6; color: #555; }
.gd-list { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.gd-item a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: center; padding: 18px 22px; background: #f6f3ee; border-radius: 10px; color: var(--charcoal); text-decoration: none; transition: background 0.2s ease, box-shadow 0.2s ease; }
.gd-item a:hover { background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,0.09); }
.gd-item a:focus-visible { outline: 2px solid #c8372d; outline-offset: 3px; }
.gd-item-title { font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.gd-item-excerpt { grid-column: 1; font-size: 14.5px; line-height: 1.55; color: #5c5c5c; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gd-item-arrow { grid-column: 2; grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #c8372d; transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease; }
.gd-item a:hover .gd-item-arrow { background: #c8372d; color: #fff; transform: translateX(3px); }
.gd-item-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gd-empty { margin: 22px 0 0; padding: 18px 22px; border: 1px dashed rgba(15,15,15,0.18); border-radius: 10px; font-size: 15px; color: #6e6e6e; }
.gd-empty strong { margin-right: 8px; padding: 5px 10px; border-radius: 999px; background: #f6f3ee; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--charcoal); }
.gd-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 15px; font-weight: 500; color: #c8372d; text-decoration: none; }
.gd-more:hover { text-decoration: underline; }
.gd-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--cream-dark); }
.gd-pager a { display: block; padding: 18px 22px; border: 1px solid var(--cream-dark); border-radius: 10px; color: var(--charcoal); text-decoration: none; transition: border-color 0.2s ease; }
.gd-pager a:hover { border-color: var(--charcoal); }
.gd-pager-next { grid-column: 2; text-align: right; }
.gd-pager-label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #c8372d; }
.gd-pager-name { font-size: 15px; font-weight: 600; line-height: 1.35; }
.gd-cta { margin-top: 48px; padding: 32px 34px; background: var(--charcoal); border-radius: 14px; color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.gd-cta-title { margin: 0; font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.gd-cta-text { margin: 6px 0 0; font-size: 15px; color: rgba(255,255,255,0.72); }
.gd-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gd-btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; border-radius: 6px; font-size: 15px; font-weight: 600; text-decoration: none; transition: background 0.2s ease, color 0.2s ease; }
.gd-btn-red { background: #c8372d; color: #fff; }
.gd-btn-red:hover { background: #a92c23; }
.gd-btn-line { border: 1px solid rgba(255,255,255,0.35); color: #fff; }
.gd-btn-line:hover { background: #fff; color: var(--charcoal); }
@media (max-width: 960px) {
  .gd-layout { grid-template-columns: 1fr; gap: 48px; }
  .gd-toc { position: static; order: 2; padding-top: 32px; border-top: 1px solid var(--cream-dark); }
}
@media (max-width: 580px) {
  .gd-body { padding: 32px 0 72px; }
  .gd-item a { padding: 16px 16px; gap: 4px 14px; }
  .gd-item-title { font-size: 16px; }
  .gd-pager { grid-template-columns: 1fr; }
  .gd-pager-next { grid-column: 1; }
  .gd-cta { padding: 26px 22px; }
}

/* Budget calculator card at the top of each guide page */
.gd-calc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 22px; align-items: center; margin: 0 0 40px; padding: 24px 26px; border-radius: 12px; background: #F7F5EF; border: 1px solid #e8e3d9; color: var(--charcoal); text-decoration: none; transition: box-shadow 0.25s ease, transform 0.25s ease; }
.gd-calc:hover { box-shadow: 0 14px 36px rgba(0,0,0,0.09); transform: translateY(-2px); }
.gd-calc:focus-visible { outline: 2px solid #c8372d; outline-offset: 3px; }
.gd-calc-icon { width: 56px; height: 56px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #c8372d; }
.gd-calc-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gd-calc-body { display: flex; flex-direction: column; min-width: 0; }
.gd-calc-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #c8372d; }
.gd-calc-name { margin-top: 4px; font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.gd-calc-text { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: #5c5c5c; }
.gd-calc-go { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 6px; background: #c8372d; color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background 0.2s ease; }
.gd-calc:hover .gd-calc-go { background: #a92c23; }
.gd-calc-go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.gd-calc:hover .gd-calc-go svg { transform: translateX(3px); }
@media (max-width: 720px) {
  .gd-calc { grid-template-columns: auto minmax(0, 1fr); padding: 22px 20px; }
  .gd-calc-icon { width: 46px; height: 46px; align-self: start; }
  .gd-calc-go { grid-column: 1 / -1; justify-content: center; margin-top: 12px; }
}

.gd-calc + .gd-section { padding-top: 0; border-top: 0; }
