/* 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);
}

/* 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;
}


/* ==========================================================================
   POST LAYOUT — editorial float (desktop) / single column (mobile)

   Social-format art (1080x1080, 1080x1350) scales up badly in a wide column.
   Figures sit in a right rail capped at 380px and body text wraps around
   them, the way a magazine or newspaper sets an article. Below 900px
   everything collapses to a single centred column.

   IMPORTANT: do NOT add `clear: both` to h2/h3 here. Headings must be
   allowed to wrap beside a floated figure, otherwise every image pushes
   the text back to full width and the layout reads as a single column.
   Only large standalone blocks clear.

   Optional classes in a post:
     <figure class="figure-left">      float to the left instead
     <figure class="figure-portrait">  tighter cap for 4:5 portrait art
     <figure class="figure-wide">      full width, no wrap
   ========================================================================== */

.post-body img,
article img {
  max-width: 100%;
  height: auto;
}

/* ---- Mobile first: single column ---- */
.post-body figure,
.blog-shell article figure {
  margin: 28px auto;
  max-width: 480px;
}

.post-body figure img,
.blog-shell article figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.post-body figcaption,
.blog-shell article figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--clr-text-muted);
}

/* ---- Desktop: figures float, text wraps ---- */
@media (min-width: 900px) {
  .post-body figure,
  .blog-shell article figure {
    float: right;
    /* width:auto lets the figure shrink to the image, so portrait art does
       not leave a wide empty box with a stranded caption. */
    width: auto;
    max-width: 380px;
    margin: 6px 0 24px 36px;
    clear: right;
  }

  /* Cap by HEIGHT as well as width. Almost all of this site's art is 4:5
     or taller (Instagram format); capping width alone still lets a portrait
     image run 475px tall. This makes portrait and landscape both behave
     without needing a class on every figure. */
  .post-body figure img,
  .blog-shell article figure img {
    width: auto;
    max-width: 380px;
    max-height: 440px;
  }

  .post-body figure.figure-left,
  .blog-shell article figure.figure-left {
    float: left;
    margin: 6px 36px 24px 0;
    clear: left;
  }

  .post-body figcaption,
  .blog-shell article figcaption {
    text-align: left;
  }

  /* 4:5 portrait art runs tall — cap it tighter so it does not
     dominate the column. */
  .post-body figure.figure-portrait img,
  .blog-shell article figure.figure-portrait img {
    max-width: 300px;
    max-height: 375px;
  }

  /* Full-width opt-out for images that genuinely need the space */
  .post-body figure.figure-wide,
  .blog-shell article figure.figure-wide {
    float: none;
    width: auto;
    max-width: 100%;
    margin: 36px 0;
    clear: both;
  }

  .post-body figure.figure-wide img,
  .blog-shell article figure.figure-wide img {
    width: 100%;
    max-width: 820px;
    max-height: none;
    margin: 0 auto;
  }

  /* Only these clear the float. Headings deliberately do not. */
  .post-related,
  .blog-shell article .cta,
  .blog-shell article .sources,
  .blog-shell article .contents {
    clear: both;
  }
}

/* Contain the floats so the article never collapses around them */
.post-body::after,
.blog-shell article::after {
  content: "";
  display: table;
  clear: both;
}

/* Hero image at the top of a post: never taller than the fold */
.blog-shell .hero-image,
.hero-image {
  display: block;
  /* No object-fit:cover here. These banners are designed graphics with text
     at the top and the logo bar at the bottom - cropping cuts the artwork.
     Cap the height and let width follow the aspect ratio instead. */
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 560px;
  margin: 0 auto;
}

