/* NOTE: blog.css must not style .site-header or .site-footer. It loads after
   style.css, so any rule here overrides the real site chrome. Two such rules
   set both to var(--clr-card-bg) (#fff), which made the footer white-on-white
   (1.06:1) and the header invisible on blog pages only. */

/* Blog article pages. Loaded AFTER /css/style.css, which owns the
   :root palette, reset and typography. Do not redeclare them here. */
h1, h2, h3, h4 {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  line-height: 1.1;
}

a {
  color: #064f8c;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible {
  color: #003b6f;
}

/* Site Header & Footer (loaded as components) */
/* Breadcrumbs */
.breadcrumbs {
  max-width: var(--max-width);
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.95rem;
  color: var(--clr-text-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--clr-border);
}

/* Blog Post */
.blog-post {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0;
  background: var(--clr-card-bg);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.post-header {
  padding: 2rem 1.5rem;
  background: var(--clr-card-bg);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--clr-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.post-header h1 {
  margin: 0;
  color: var(--clr-text-main);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
}

.post-deck {
  margin: 1rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

.post-meta {
  margin: 0;
  color: var(--clr-text-muted);
  font-size: 0.9rem;
}

/* Hero Figure */
.hero-figure {
  margin: 0;
  width: 100%;
}

.hero-figure img {
  display: block;
  /* Cap by height, not width, and let width follow the aspect ratio.
     A 1600x900 banner stays wide; a 1024x1536 portrait cover shrinks to
     fit instead of running taller than the viewport. Nothing is cropped. */
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 560px;
  margin: 0 auto;
}

.hero-figure figcaption {
  padding: 1rem 1.5rem;
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  background: var(--clr-card-bg);
  border-top: 1px solid var(--clr-border);
}

/* Post Body */
.post-body {
  padding: 2rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.post-body h2 {
  margin: 2rem 0 1rem;
  color: var(--clr-text-main);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  line-height: 1.2;
}

.post-body h3 {
  color: var(--clr-text-main);
  margin: 1.5rem 0 0.75rem;
  font-size: 1.2rem;
}

.post-body p {
  margin: 0 0 1rem;
  color: var(--clr-text-main);
  line-height: 1.7;
}

.post-body ul {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.post-body li {
  margin-bottom: 0.5rem;
  color: var(--clr-text-main);
}

/* Post Figure (inline images) */
.post-figure {
  margin: 2rem 0;
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--clr-bg-main);
}

.post-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.post-figure figcaption {
  padding: 1rem;
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  background: var(--clr-card-bg);
  border-top: 1px solid var(--clr-border);
  line-height: 1.5;
}

/* Quick Checklist */
.quick-checklist {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem;
  background: rgba(185, 90, 18, 0.08);
  border-left: 4px solid var(--clr-accent);
  border-radius: 6px;
}

.quick-checklist h2 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--clr-text-main);
}

.quick-checklist ol {
  margin: 1rem 0 0;
  padding-left: 1.5rem;
  color: var(--clr-text-main);
}

.quick-checklist li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Callout Box */
.callout {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #1a2a3a;
  color: var(--clr-white);
  border-radius: 8px;
  border-left: 4px solid var(--clr-accent);
}

.callout h2 {
  color: var(--clr-white);
  margin-top: 0;
  font-size: 1.3rem;
}

.callout p {
  color: var(--clr-white);
  margin: 0.5rem 0 0;
  line-height: 1.6;
}

/* Source Note & Disclaimer */
.source-note, .disclaimer {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  margin: 1.5rem 0;
  line-height: 1.6;
}

.source-note a, .disclaimer a {
  color: var(--clr-accent);
  font-weight: 600;
}

.source-note a:hover, .disclaimer a:hover {
  color: var(--clr-accent-hover);
}

/* Tip Box (template default - lighter accent callout for a single highlighted note) */
.tip-box {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--clr-bg-alt);
  border-left: 4px solid var(--clr-accent);
  border-radius: 8px;
}

.tip-box p {
  margin: 0;
  color: var(--clr-text-main);
  line-height: 1.6;
}

.tip-box strong {
  color: var(--clr-accent);
}

/* Sources (template default - matches .source-note styling) */
.sources {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  margin: 2rem 0 0;
  line-height: 1.6;
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
}

.sources p {
  margin: 0 0 0.5rem;
  color: var(--clr-text-main);
}

.sources ul {
  margin: 0;
  padding-left: 1.25rem;
}

.sources a {
  color: var(--clr-accent);
  font-weight: 600;
}

.sources a:hover {
  color: var(--clr-accent-hover);
}

/* Post CTA Section */
.post-cta {
  margin: 2rem 0 0;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--clr-border);
  background: var(--clr-bg-main);
}

.post-cta h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--clr-text-main);
}

.post-cta p {
  color: var(--clr-text-muted);
  margin: 0.5rem 0 1rem;
  line-height: 1.6;
}

/* CTA Button */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--clr-accent-soft) 0%, var(--clr-accent) 100%);
  color: var(--clr-white);
  font-weight: 600;
  font-family: "Inter", sans-serif;
  text-decoration: none;
  border: 2px solid var(--clr-accent);
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(153, 69, 0, 0.22);
}

.button:hover, .button:focus-visible {
  background: linear-gradient(180deg, var(--clr-accent) 0%, var(--clr-accent-hover) 100%);
  border-color: var(--clr-accent-hover);
  box-shadow: 0 12px 24px rgba(153, 69, 0, 0.28);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
  .post-header {
    padding: 1.5rem;
  }

  .post-body {
    padding: 1.5rem;
  }

  .post-header h1 {
    font-size: 1.5rem;
  }

  .blog-post {
    margin: 1rem 0.5rem;
    border-radius: 6px;
  }

  .breadcrumbs {
    padding: 0 1rem;
  }
}


/* --- Accessible focus indicator (WCAG 2.2 SC 2.4.11) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--clr-focus-ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--clr-focus-halo);
}

/* --- Related rentals block at the end of a post --- */
.post-related {
  max-width: 720px;
  margin: 3rem auto 0;
  padding: 1.75rem 1.5rem 2rem;
  background: var(--clr-card-bg);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-accent);
  border-radius: 8px;
}

.post-related h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.post-related ul {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

.post-related li {
  margin-bottom: 0.6rem;
}




/* --- The post shell ------------------------------------------------------
   Defined here, not in a post's inline <style>, so every post is identical.
   Wide enough that a 320px sidebar still leaves a readable content column:
   1200 - 96 padding - 320 sidebar - 52 gap = ~730px of text. */

.blog-shell {
  width: min(100% - 32px, 1200px);
  margin: 36px auto;
  background: var(--clr-card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
}

@media (max-width: 768px) {
  .blog-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }
}

/* ==========================================================================
   POST LAYOUT — two columns (content + sidebar) on desktop, one on mobile

   Structure every post uses:

     <main class="blog-shell">
       <img class="hero-image">  or  <figure class="hero-figure">
       <header class="post-header"> eyebrow, h1, meta </header>
       <div class="post-layout">
         <div class="post-main">    article body        </div>
         <aside class="post-sidebar"> sidebar-card x N   </aside>
       </div>
     </main>

   The sidebar is templated, not content-dependent, so every post lays out
   identically no matter how long the paragraphs are. That is the reason
   this replaced the old floated-figure approach.
   ========================================================================== */

.post-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: clamp(24px, 4vw, 48px);
}

.post-main {
  min-width: 0;   /* stops long words/code forcing the grid wider */
}

/* Content column capped for readability; sidebar takes the rest. */
@media (min-width: 900px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(2rem, 3vw, 3.25rem);
    align-items: start;
  }
}

@media (min-width: 1200px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

/* --- Images: full width of the content column, capped ------------------- */

.post-main img,
.post-main figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
}

.post-main figure {
  margin: 2rem auto;
  max-width: 100%;
}

/* Social-format art (1080x1350 and taller) would otherwise dominate the
   column, so cap by height and let width follow the aspect ratio. */
.post-main figure img {
  max-height: 520px;
}

.post-main figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--clr-text-muted);
}

/* --- Sidebar ------------------------------------------------------------ */

.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

@media (min-width: 900px) {
  .post-sidebar {
    position: sticky;
    top: 1.5rem;   /* stays with the reader while they scroll */
  }
}

.sidebar-card {
  padding: 1.25rem 1.35rem;
  background: var(--clr-card-bg);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
}

.sidebar-card h2,
.sidebar-card strong {
  display: block;
  margin: 0 0 0.75rem;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--clr-text-main);
}

.sidebar-card p {
  margin: 0 0 1rem;
  font-size: 0.94rem;
  color: var(--clr-text-muted);
}

.sidebar-card ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  font-size: 0.94rem;
}

.sidebar-card li {
  margin-bottom: 0.55rem;
}

.sidebar-card .btn-primary {
  display: block;
  width: 100%;
  text-align: center;
}

/* "In this guide" reads as a link list, not prose */
.sidebar-contents {
  border-left: 4px solid var(--clr-accent);
}

.sidebar-contents a {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 0;
  min-height: 44px;
  font-size: 0.94rem;
}

.sidebar-cta {
  background: var(--clr-dark);
  border-color: var(--clr-dark);
}

.sidebar-cta h2 {
  color: var(--clr-white);
}

.sidebar-cta p {
  color: #cbd5e1;
}

/* --- Post header (above the two columns) -------------------------------- */

.post-header {
  padding: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0;
}

/* --- Lead image --------------------------------------------------------- */

.hero-image,
.hero-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 560px;
  margin: 0 auto;
}

.hero-figure {
  margin: 0;
}

.hero-figure figcaption {
  padding: 0.75rem 1.5rem 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--clr-text-muted);
}
