/* ==========================================================================
   SITESURGEON PRO — CHILD THEME OVERRIDES
   Loaded after tokens/base/components. Everything the WordPress conversion
   added or changed lives here so the ported design-reference CSS stays a
   clean, diffable copy of the original.
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* 2) Lead form — its own section instead of bolted onto the services grid */
/* ---------------------------------------------------------------------- */
.lead-form-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lift);
  padding: 48px 44px;
  text-align: center;
}
.lead-form-panel .eyebrow { justify-content: center; }
.lead-form-panel .lead-form { text-align: left; }
@media (max-width: 560px) { .lead-form-panel { padding: 34px 24px; } }

/* ---------------------------------------------------------------------- */
/* 3) Category selection moved to a right-hand sidebar (blog + services)  */
/* ---------------------------------------------------------------------- */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.blog-main { min-width: 0; }

.cat-sidebar { position: sticky; top: 96px; }
.cat-sidebar-title { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-2); font-weight: 600; margin: 0 0 14px; }
.cat-sidebar-list { display: flex; flex-direction: column; gap: 8px; }
.cat-sidebar-list .cat-pill { display: block; width: 100%; text-align: left; }

@media (max-width: 900px) {
  .blog-layout { grid-template-columns: 1fr; gap: 28px; }
  .cat-sidebar { position: static; order: -1; }
  .cat-sidebar-list { flex-direction: row; flex-wrap: wrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .cat-sidebar-list .cat-pill { width: auto; white-space: nowrap; }
}

/* Single blog post: prose + affiliate sidebar */
.blog-layout--post { grid-template-columns: minmax(0, 1fr) 300px; }
.blog-layout--post .blog-sidebar { position: sticky; top: 96px; }
@media (max-width: 900px) {
  .blog-layout--post { grid-template-columns: 1fr; }
  .blog-layout--post .blog-sidebar { position: static; order: 2; }
}

/* ---------------------------------------------------------------------- */
/* 4) Blog card contrast                                                  */
/* ---------------------------------------------------------------------- */
.blog-card { background: var(--paper); border-color: var(--line); }
.blog-card-title { color: var(--ink); }
.blog-card-excerpt { color: #384357; } /* darker than --slate for reliable body contrast on white */
.blog-card-meta { color: var(--slate-2); } /* was --slate-3, too light at 0.76rem */
.blog-card-media { display: block; overflow: hidden; border-radius: var(--radius-md) var(--radius-md) 0 0; margin: -26px -24px 18px; aspect-ratio: 16/10; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------------- */
/* 5) Card stacking on mobile — belt-and-braces on top of the existing    */
/*    component breakpoints, now that cards can sit inside .blog-main.   */
/* ---------------------------------------------------------------------- */
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) {
  .svc-cards { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* Homepage YouTube showcase                                              */
/* ---------------------------------------------------------------------- */
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 8px; }
@media (max-width: 1080px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .video-grid { grid-template-columns: 1fr; } }

.video-card[hidden] { display: none; }
.video-thumb { position: relative; display: block; width: 100%; padding: 0; border: none; border-radius: var(--radius-md); overflow: hidden; background: var(--ink-navy); aspect-ratio: 16/9; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease); }
.video-thumb:hover img { transform: scale(1.04); }
.video-play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: rgba(5,11,26,0.55); border-radius: 999px; backdrop-filter: blur(2px); }
.video-embed { width: 100%; aspect-ratio: 16/9; border: none; border-radius: var(--radius-md); }
.video-title { margin: 12px 0 0; font-size: 0.96rem; font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------------------- */
/* Affiliate partner cards                                                */
/* ---------------------------------------------------------------------- */
.blog-sidebar-affiliate { display: flex; flex-direction: column; gap: 22px; }
.affiliate-eyebrow { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-2); font-weight: 600; margin: 0; }

.affiliate-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
  box-shadow: var(--shadow-soft);
}
.affiliate-badge { display: inline-block; background: var(--surgical-teal); color: #fff; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.affiliate-name { margin: 0 0 6px; font-size: 1.15rem; }
.affiliate-tagline { font-size: 0.9rem; color: var(--slate); margin: 0 0 14px; }
.affiliate-price { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--ink); margin: 0 0 16px; }
.affiliate-price span { font-size: 0.95rem; font-weight: 500; color: var(--slate-2); }
.affiliate-features { display: flex; flex-direction: column; gap: 9px; margin: 0 0 20px; }
.affiliate-features li { display: flex; align-items: center; gap: 9px; font-size: 0.92rem; color: var(--ink); }
.affiliate-features svg { flex-shrink: 0; }
.affiliate-why { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 0.9rem; font-weight: 600; color: var(--surgical-teal); }
.affiliate-why:hover { gap: 10px; }

.affiliate-bottom-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 24px; justify-content: center; }
@media (max-width: 720px) { .affiliate-bottom-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; } }

/* ---------------------------------------------------------------------- */
/* Misc                                                                   */
/* ---------------------------------------------------------------------- */
.prose img { border-radius: var(--radius-md); }
.svc-bar-promise svg { flex-shrink: 0; }
