/* FCS Magazine — Blog masonry on homepage (1 featured + 2 small).
 * Will be wired to {{#get "posts"}} in step 2. CSS sized for that data shape.
 */

.blog {
  padding: 6rem 0;
  background: var(--paper-soft);
}

.blog-header {
  margin-bottom: 3rem;
}

.blog-header-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.blog-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 550;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.blog-header p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink-mute);
  font-weight: 500;
}

.blog-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  background: white;
  color: var(--copper);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--rule);
  white-space: nowrap;
}

.blog-all:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
  color: var(--copper-dark);
}

.blog-all svg { transition: transform 0.3s ease; }
.blog-all:hover svg { transform: translateX(3px); }

.blog-masonry {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.5rem;
  min-height: 520px;
}

.blog-card {
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px -12px rgba(26, 24, 23, 0.14);
}

.blog-card a { display: block; color: inherit; }

/* Featured — tall left column */
.blog-card--featured {
  grid-row: 1 / 3;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
}

.blog-card--featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(31, 51, 36, 0.92) 0%,
    rgba(31, 51, 36, 0.35) 40%,
    transparent 70%);
  z-index: 1;
  border-radius: 4px;
}

.blog-card--featured .blog-card-inner {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  color: white;
}

.blog-card--featured .blog-card-category {
  background: var(--copper);
  color: white;
}

.blog-card--featured .blog-card-date {
  color: rgba(255, 255, 255, 0.78);
}

.blog-card--featured h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.blog-card--featured:hover h3 { color: var(--copper-pale); }

.blog-card--featured p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  opacity: 0.78;
  line-height: 1.6;
  font-weight: 500;
}

/* Small horizontal cards — right column */
.blog-card--small {
  display: flex;
  flex-direction: row;
  background: white;
  border: 1px solid var(--rule);
}

.blog-card--small .blog-card-image {
  width: 44%;
  min-height: 100%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.blog-card--small .blog-card-inner {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-card--small .blog-card-category {
  align-self: flex-start;
}

.blog-card--small h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
}

.blog-card--small:hover h3 { color: var(--copper-dark); }

.blog-card--small p {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-mute);
  line-height: 1.6;
  font-weight: 500;
}

.blog-card-category {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  background: rgba(207, 125, 95, 0.12);
  color: var(--copper);
}

.blog-card-date {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--ink-whisper);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.blog-more {
  text-align: right;
  margin-top: 1.5rem;
}

/* Empty-state fallback when no posts have been published yet.
 * Renders inside .blog-masonry when {{posts}} is empty. */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border: 1px dashed var(--rule);
  border-radius: 4px;
  color: var(--ink-mute);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
}
