/* ============================================
   SAM & SONS V3 — Page Actualités / Blog
   Industrial Brutalist Tech — Bento Magazine
   ============================================ */

/* ═══════════════════════════════════════════
   BLOG BENTO — 12-column Magazine Grid
   ═══════════════════════════════════════════ */
.blog-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: clamp(1rem, 1.5vw, 1.5rem);
}

/* ═══════════════════════════════════════════
   BLOG TILE — Base card
   ═══════════════════════════════════════════ */
.blog-tile {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

.blog-tile:hover {
  border-color: var(--color-border-cyan);
  box-shadow: var(--shadow-tile-hover, 0 8px 32px rgba(226, 5, 18, 0.08));
  transform: translateY(-4px);
}

/* ═══════════════════════════════════════════
   FEATURED TILE — Full-width hero (12 cols)
   ═══════════════════════════════════════════ */
.blog-tile--featured {
  grid-column: span 12;
  grid-row: span 3;
  min-height: 520px;
}

/* ═══════════════════════════════════════════
   CARD TILE — Standard (4 cols = 3 per row)
   ═══════════════════════════════════════════ */
.blog-tile--card {
  grid-column: span 4;
  grid-row: span 2;
  min-height: 340px;
}

/* ═══════════════════════════════════════════
   TILE IMAGE — Full bleed with zoom
   ═══════════════════════════════════════════ */
.blog-tile-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.blog-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo, ease);
}

.blog-tile:hover .blog-tile-img img {
  transform: scale(1.06);
}

/* ═══════════════════════════════════════════
   TILE OVERLAY — Enhanced gradient for readability
   ═══════════════════════════════════════════ */
.blog-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 20%,
    rgba(10, 10, 15, 0.3) 45%,
    rgba(10, 10, 15, 0.75) 70%,
    rgba(10, 10, 15, 0.92) 100%
  );
  z-index: 1;
  transition: background 0.4s ease;
}

.blog-tile:hover .blog-tile-overlay {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 15%,
    rgba(10, 10, 15, 0.35) 40%,
    rgba(10, 10, 15, 0.8) 65%,
    rgba(10, 10, 15, 0.95) 100%
  );
}

/* ═══════════════════════════════════════════
   TILE CONTENT — Bottom-aligned text
   ═══════════════════════════════════════════ */
.blog-tile-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-xl);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ─── Meta row (Tag + Date) ─── */
.blog-tile-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ─── Date ─── */
.blog-tile-date {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  font-weight: var(--fw-medium);
  font-family: var(--font-body);
}

/* ─── Title ─── */
.blog-tile-title {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  line-height: var(--lh-heading);
  margin: 0;
}

.blog-tile--featured .blog-tile-title {
  font-size: var(--fs-2xl, clamp(1.75rem, 3vw, 2.5rem));
  max-width: 700px;
}

.blog-tile--card .blog-tile-title {
  font-size: var(--fs-lg);
}

/* ─── Excerpt (featured only) ─── */
.blog-tile-excerpt {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--lh-relaxed);
  margin: 0;
  max-width: 550px;
}

/* ═══════════════════════════════════════════
   BLOG TAGS — High contrast badges
   ═══════════════════════════════════════════ */
.blog-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35em 0.85em;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  line-height: 1.4;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.blog-tile:hover .blog-tag {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ─── Red variant (brand accent) ─── */
.blog-tag--red {
  background: rgba(226, 5, 18, 0.85);
  border-color: rgba(226, 5, 18, 0.6);
  color: var(--color-white);
}

.blog-tile:hover .blog-tag--red {
  background: rgba(226, 5, 18, 0.95);
  border-color: rgba(226, 5, 18, 0.8);
}

/* ─── Featured specific — bigger tags ─── */
.blog-tile--featured .blog-tag {
  font-size: var(--fs-sm);
  padding: 0.4em 1em;
}

/* ─── Link Arrow ─── */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--color-white);
  transition: all var(--transition-fast);
  text-decoration: none;
  margin-top: var(--space-sm);
}

.link-arrow .arrow {
  transition: transform var(--transition-fast);
}

.link-arrow:hover {
  color: var(--color-primary-light, #FF2D3A);
}

.link-arrow:hover .arrow {
  transform: translateX(4px);
}

/* ═══════════════════════════════════════════
   NEWSLETTER CTA — Brutalist accent section
   ═══════════════════════════════════════════ */
.newsletter-cta {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  position: relative;
}

/* Cyan glow line top */
.newsletter-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0.4;
}

.newsletter-content {
  max-width: 600px;
  text-align: center;
  margin: 0 auto;
}

.newsletter-content h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.newsletter-content p {
  color: var(--color-text-secondary);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-xl);
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1024px)
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .blog-bento {
    grid-template-columns: repeat(8, 1fr);
    gap: clamp(0.75rem, 1.2vw, 1.25rem);
  }

  .blog-tile--featured {
    grid-column: span 8;
    grid-row: span 2;
    min-height: 400px;
  }

  .blog-tile--card {
    grid-column: span 4;
    grid-row: span 2;
    min-height: 280px;
  }

  .blog-tile--featured .blog-tile-title {
    font-size: var(--fs-xl);
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Small tablet (≤ 768px)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .blog-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    gap: var(--space-md);
  }

  .blog-tile--featured {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 360px;
  }

  .blog-tile--card {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 280px;
  }

  .blog-tile-content {
    padding: var(--space-lg);
  }

  .blog-tile--card .blog-tile-title {
    font-size: var(--fs-md);
  }

  .blog-tile-excerpt {
    font-size: var(--fs-xs);
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 480px)
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
  .blog-bento {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .blog-tile--featured,
  .blog-tile--card {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 300px;
  }

  .blog-tile--featured {
    min-height: 380px;
  }

  .blog-tile-content {
    padding: var(--space-lg) var(--space-md);
  }

  .blog-tile--featured .blog-tile-title {
    font-size: var(--fs-xl);
  }

  .blog-tile--card .blog-tile-title {
    font-size: var(--fs-md);
  }

  .blog-tile-excerpt {
    display: none;
  }

  .blog-tag {
    font-size: var(--fs-xxs);
    padding: 0.3em 0.7em;
  }

  .blog-tile--featured .blog-tag {
    font-size: var(--fs-xs);
  }
}
