/* Styles for the blog listing page and individual blog posts.
   The header/nav here is the SAME .hero + .nav component used on the
   homepage (see main.css) — just a shorter variant via .hero--compact,
   so the nav bar, fonts and hover behaviour are identical everywhere. */

.hero--compact {
  min-height: clamp(320px, 42vw, 440px);
  align-items: center;
  text-align: center;
}

.hero--compact .hero__inner {
  margin: 0 auto;
  max-width: 780px;
}

.hero__crumbs {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 14px;
}

.hero__crumbs a {
  color: #fff;
  font-weight: 600;
}

.hero__crumbs a:hover { text-decoration: underline; }

.hero--compact h1 {
  font-family: "Belleza", "Playfair Display", "Georgia", serif;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.1;
  margin: 0 0 12px;
}

.hero__meta {
  font-family: "Space Mono", "Work Sans", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.hero--compact .lede {
  max-width: 640px;
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Listing page ---------- */

.blog-grid {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) 0 clamp(60px, 8vw, 100px);
  display: grid;
  gap: 28px;
  /* Fixed max card width (not 1fr) so cards stay nicely sized instead of
     stretching to fill the row — and thus the image inside them growing
     huge — when there are only one or two posts on a wide screen. */
  grid-template-columns: repeat(auto-fill, minmax(260px, 300px));
  justify-content: center;
}

.blog-grid__loading {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(43, 29, 22, 0.6);
  font-family: "Space Mono", "Work Sans", monospace;
  font-size: 14px;
}

/* Raw pasted post content: preserves whatever spacing/line breaks/tabs
   the author typed, with no formatting interpretation needed. */
.blog-content-raw {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--brand-ink);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.blog-content-raw strong {
  font-weight: 700;
  color: var(--brand-accent);
}

.blog-content-raw a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-content-raw a:hover {
  color: #1d4ed8;
}

.blog-content-raw ul,
.blog-content-raw ol {
  margin: 4px 0 16px;
  padding-left: 24px;
  display: grid;
  gap: 6px;
}

.blog-content-raw li {
  padding-left: 2px;
}

.blog-content-raw ul li::marker {
  color: var(--brand-primary);
}

/* ---------- FAQ page ---------- */

.faq-list {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 72px) 0 clamp(60px, 8vw, 100px);
  display: grid;
  gap: 14px;
}

.faq-item {
  background: #fff;
  border: 1px solid rgba(193, 120, 95, 0.15);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
}

.faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 600;
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 17px;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  float: right;
  font-size: 20px;
  color: var(--brand-primary);
}

.faq-item[open] summary::after { content: "–"; }

.faq-item__answer {
  padding: 0 0 18px;
  color: rgba(43, 29, 22, 0.8);
  white-space: pre-wrap;
  line-height: 1.7;
}

/* Related-posts strip at the end of a post */
.related-posts {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid rgba(193, 120, 95, 0.18);
}

.related-posts h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

.related-posts__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 180px));
}

.related-posts__card {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(193, 120, 95, 0.12);
  transition: transform 0.2s ease;
}

.related-posts__card:hover { transform: translateY(-3px); }

.related-posts__card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.related-posts__card span {
  display: block;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(193, 120, 95, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.1);
}

.blog-card__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #d7b6a3;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-card__category {
  font-family: "Space Mono", "Work Sans", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

.blog-card__body h2 {
  font-size: 21px;
  line-height: 1.25;
  margin: 0;
}

.blog-card__excerpt {
  font-size: 14.5px;
  color: rgba(43, 29, 22, 0.78);
  margin: 0;
  flex: 1;
}

.blog-card__link {
  margin-top: 8px;
  font-weight: 600;
  color: var(--brand-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-card__link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card__link::after {
  transform: translateX(4px);
}

.blog-card--placeholder {
  opacity: 0.7;
  border-style: dashed;
}

/* ---------- Single post ---------- */

.blog-post {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) 0 clamp(60px, 8vw, 96px);
}

.blog-post__meta {
  font-family: "Space Mono", "Work Sans", monospace;
  font-size: 13px;
  color: rgba(43, 29, 22, 0.6);
}

/* Carousel */

.carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 28px 0 40px;
  background: #d7b6a3;
}

/* The frame height is set in pixels by scripts/blog.js to match whichever
   slide is active (capped to a sensible range) — so a square photo shows
   as a neat square-ish box, a portrait photo shows taller, a landscape
   photo shows shorter, instead of every photo being force-cropped into
   one fixed wide shape. Height animates smoothly between slides rather
   than jumping. This value is just the fallback shown for an instant
   before JS measures the first photo. */
.carousel__track {
  display: flex;
  height: 320px;
  transition: transform 0.4s ease, height 0.3s ease;
}

.carousel__slide {
  flex: 0 0 100%;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--brand-ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease;
}

.carousel__btn:hover { background: #fff; }
.carousel__btn--prev { left: 14px; }
.carousel__btn--next { right: 14px; }

.carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.carousel__dot.is-active {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.carousel--single .carousel__btn,
.carousel--single .carousel__dots {
  display: none;
}

/* Rendered article content (from pasted plain text) */

.blog-content {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--brand-ink);
}

.blog-content h2 {
  font-size: 26px;
  margin-top: 40px;
}

.blog-content h3 {
  font-size: 20px;
  margin-top: 30px;
  color: var(--brand-accent);
}

.blog-content p {
  margin: 0 0 16px;
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 20px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.blog-content li {
  padding-left: 4px;
}

.blog-content ul li::marker {
  color: var(--brand-primary);
}

.blog-content strong {
  color: var(--brand-accent);
}

.blog-content a:not(.btn) {
  color: var(--brand-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-cta {
  text-align: center;
  margin: 32px 0 !important;
}

.blog-cta .btn {
  padding-inline: 26px;
}

.blog-post__footer-cta {
  text-align: center;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid rgba(193, 120, 95, 0.18);
}

.blog-post__footer-cta p {
  margin-bottom: 16px;
  color: rgba(43, 29, 22, 0.75);
}

@media (max-width: 640px) {
  .carousel__track { height: clamp(220px, 62vw, 340px); }
  .carousel__btn { width: 38px; height: 38px; font-size: 17px; }
}
