/**
 * BotOnPlot blog homepage — Latest / Recent / archive CTA
 * Namespace: .bop-blog-home
 */

.bop-blog-home {
  --bop-orange: #f27b21;
  --bop-orange-dark: #c95009;
  --bop-ink: #0b1018;
  --bop-muted: #5f6670;
  --bop-line: #dfe1df;
  --bop-soft: #f6f5f2;
  --bop-warm: #fbfaf7;
  --bop-white: #fff;
  --bop-radius: 14px;
  --bop-shadow: 0 24px 70px rgba(11, 16, 24, 0.11);
  --bop-shadow-soft: 0 12px 36px rgba(11, 16, 24, 0.08);
  font-family: Arial, "Helvetica Neue", sans-serif;
  color: var(--bop-ink);
}

.bop-blog-home *,
.bop-blog-home *::before,
.bop-blog-home *::after {
  box-sizing: border-box;
}

.bop-blog-home a {
  color: inherit;
  text-decoration: none;
}

.bop-blog-home a:focus-visible {
  outline: 3px solid rgba(242, 123, 33, 0.45);
  outline-offset: 3px;
}

.bop-blog-home__container {
  width: min(1360px, calc(100% - 64px));
  margin-inline: auto;
}

.bop-blog-home__latest,
.bop-blog-home__recent {
  padding: clamp(84px, 9vw, 144px) 0;
  background: var(--bop-white);
}

/* Tighter Latest header — remove the large empty band beside the title */
.bop-blog-home__latest {
  position: relative;
  z-index: 1;
  padding: clamp(56px, 6vw, 96px) 0 clamp(72px, 8vw, 120px);
  /* Lift above hero cream diagonal so sections read as separate */
  box-shadow: 0 -16px 48px rgba(11, 16, 24, 0.05);
}

.bop-blog-home__latest .bop-blog-home__intro {
  margin-bottom: 24px;
  max-width: 56ch;
}

.bop-blog-home__recent {
  background: var(--bop-soft);
  border-top: 1px solid rgba(11, 16, 24, 0.04);
}

.bop-blog-home__eyebrow {
  margin: 0 0 14px;
  color: var(--bop-orange-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bop-blog-home__heading {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--bop-ink);
}

.bop-blog-home__intro {
  margin: 0 0 48px;
  max-width: 720px;
  color: var(--bop-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.bop-blog-home__section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 48px;
  margin-bottom: 48px;
}

.bop-blog-home__section-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.bop-blog-home__section-head .bop-blog-home__heading {
  margin-bottom: 16px;
}

.bop-blog-home__section-head .bop-blog-home__intro {
  margin-bottom: 0;
  max-width: 640px;
}

.bop-blog-home__section-head .bop-blog-home__archive-link {
  flex: 0 0 auto;
  margin-bottom: 2px;
}

/* —— Featured latest —— */

.bop-blog-home__featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--bop-white);
  border: 1px solid var(--bop-line);
  border-radius: var(--bop-radius);
  overflow: hidden;
  box-shadow: var(--bop-shadow-soft);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.bop-blog-home__featured:hover {
  box-shadow: var(--bop-shadow);
}

.bop-blog-home__featured-media {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f1ec;
}

.bop-blog-home__featured-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.bop-blog-home__featured-media-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 240px;
  color: var(--bop-muted);
  font-size: 0.9rem;
  background:
    linear-gradient(135deg, #f0eeea, #e2e0da);
}

.bop-blog-home__featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3.5vw, 40px) clamp(24px, 3.5vw, 40px) clamp(20px, 3vw, 32px);
  gap: 10px;
}

.bop-blog-home__category {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(242, 123, 33, 0.12);
  color: var(--bop-orange-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bop-blog-home__featured-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--bop-ink);
}

.bop-blog-home__excerpt {
  margin: 0;
  color: var(--bop-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.bop-blog-home__featured .bop-blog-home__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bop-blog-home__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  color: #777e84;
  font-size: 0.82rem;
  font-weight: 650;
}

.bop-blog-home__read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  color: var(--bop-orange-dark);
  font-weight: 750;
  font-size: 0.94rem;
}

.bop-blog-home__featured .bop-blog-home__read-link {
  margin-top: 0;
}

.bop-blog-home__read-link svg {
  transition: transform 180ms ease;
}

.bop-blog-home__featured:hover .bop-blog-home__read-link svg {
  transform: translateX(3px);
}

/* —— Recent cards —— */

.bop-blog-home__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.bop-blog-home__post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bop-white);
  border: 1px solid var(--bop-line);
  border-radius: var(--bop-radius);
  overflow: hidden;
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.bop-blog-home__post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.bop-blog-home__post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 16, 24, 0.14);
  box-shadow: var(--bop-shadow-soft);
}

.bop-blog-home__post-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f1ec;
  overflow: hidden;
}

.bop-blog-home__post-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.bop-blog-home__post-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 18px;
  flex: 1;
}

.bop-blog-home__post-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--bop-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bop-blog-home__post-card .bop-blog-home__excerpt {
  font-size: 0.88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bop-blog-home__post-card .bop-blog-home__meta {
  margin-top: 0;
  padding-top: 0;
}

/* —— View all —— */

.bop-blog-home__archive-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.bop-blog-home__archive-link {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--bop-orange);
  color: #15100c;
  font-weight: 750;
  font-size: 0.94rem;
  box-shadow: 0 8px 20px rgba(242, 123, 33, 0.2);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.bop-blog-home__archive-link:hover {
  transform: translateY(-2px);
  background: #ff8a30;
  box-shadow: 0 12px 28px rgba(242, 123, 33, 0.28);
  color: #15100c;
}

/* —— Empty —— */

.bop-blog-home__empty {
  padding: 40px 32px;
  border: 1px dashed var(--bop-line);
  border-radius: var(--bop-radius);
  background: var(--bop-warm);
  color: var(--bop-muted);
  text-align: center;
}

.bop-blog-home__empty p {
  margin: 0;
  max-width: 460px;
  margin-inline: auto;
}

/* Homepage: hero owns top clearance (matches marketing 180px) */
body.bop-chrome.bop-front-home #et-main-area {
  padding-top: 0 !important;
}

body.bop-chrome.bop-front-home #main-content,
body.bop-chrome.bop-front-home .bop-blog-home {
  margin: 0;
  padding: 0;
}

@media (max-width: 1100px) {
  .bop-blog-home__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .bop-blog-home__container {
    width: min(100% - 36px, 720px);
  }

  .bop-blog-home__featured {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .bop-blog-home__featured-media {
    min-height: 0;
  }

  .bop-blog-home__featured-media img {
    width: 100%;
    height: auto;
  }

  .bop-blog-home__section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

@media (max-width: 560px) {
  .bop-blog-home__container {
    width: min(100% - 28px, 520px);
  }

  .bop-blog-home__grid {
    grid-template-columns: 1fr;
  }

  .bop-blog-home__heading {
    margin-bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bop-blog-home__featured,
  .bop-blog-home__post-card,
  .bop-blog-home__archive-link,
  .bop-blog-home__read-link svg {
    transition: none;
  }

  .bop-blog-home__post-card:hover,
  .bop-blog-home__archive-link:hover {
    transform: none;
  }
}
