/* ==========================================================================
   Gagner — blog layout (blog.html, blog-post.html)
   Extends css/styles.css: load that first for tokens, header, footer, buttons.
   ========================================================================== */

/* ---------- hero ---------- */
.blog-hero {
  position: relative;
  padding: calc(56px) 0 120px;
  background: linear-gradient(180deg, #e2e6fc 0%, #eceffd 100%);
  text-align: center;
  overflow: hidden;
}
.blog-hero-inner { max-width: 640px; margin: 0 auto; }
.blog-hero h1 {
  font-size: clamp(50px, 5.5vw, 58px);
  font-weight: 800;
  letter-spacing: -0.03em;
  /* color: var(--brand); */
}
.blog-hero p {
  margin-top: 16px;
  font-size: 16px;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}
.blog-hero-cutout {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 70px;
}

/* ---------- featured carousel ---------- */
.blog-featured-wrap {
  margin-top: -96px;
  position: relative;
  z-index: 2;
}
.blog-carousel {
  max-width: 980px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(20,16,60,0.16);
  position: relative;
}
.blog-carousel-track {
  display: flex;
  transition: transform .45s cubic-bezier(.65,0,.35,1);
}
.blog-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--brand);
  min-height: 360px;
}
@media (min-width: 720px) {
  .blog-slide { grid-template-columns: 1fr 1fr; }
}
.blog-slide-content {
  padding: 40px 40px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
.blog-slide-tags { display: flex; gap: 8px; margin-bottom: 18px; }
.blog-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.16);
  color: #fff;
}
.blog-tag.is-accent { background: #ffd166; color: #3d2a00; }
.blog-slide-title {
  font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.blog-slide-title a { color: inherit; }
.blog-slide-meta {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.blog-slide-image { position: relative; min-height: 220px; }
.blog-slide-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.blog-carousel-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  pointer-events: none;
}
.blog-dots { display: flex; gap: 7px; pointer-events: auto; }
.blog-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color .2s, width .2s;
}
.blog-dot.is-active { background: #fff; width: 20px; border-radius: var(--radius-pill); }
.blog-arrows { display: flex; gap: 8px; pointer-events: auto; }
.blog-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: background-color .15s;
}
.blog-arrow:hover { background: var(--surface-2); }
.blog-arrow svg { width: 16px; height: 16px; }

/* ---------- listing ---------- */
.blog-listing { padding: 90px 0 120px; }
.blog-listing-head {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.blog-listing-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.blog-search { position: relative; width: 100%; max-width: 320px; }
.blog-search svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-softer);
}
.blog-search input {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  padding: 11px 14px 11px 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.blog-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-ambient); }
.blog-card-image { aspect-ratio: 16/10; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.blog-card-title { font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.blog-card-title a { color: var(--text); }
.blog-card-excerpt { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; flex: 1; }
.blog-card-meta { font-size: 12px; color: var(--text-softer); margin-top: 4px; }

.blog-empty { text-align: center; padding: 60px 20px; color: var(--text-softer); font-size: 15px; }

.blog-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.blog-page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 600;
  transition: background-color .15s, color .15s, border-color .15s;
}
.blog-page-btn:hover:not(:disabled) { background: var(--surface-2); }
.blog-page-btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.blog-page-btn:disabled { opacity: 0.4; cursor: default; }

/* ---------- single post ---------- */
.post-hero { padding: calc(var(--nav-height) + 56px) 0 0; }
.post-hero .container { max-width: 760px; }
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 24px;
}
.post-back svg { width: 14px; height: 14px; }
.post-category { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand-deep); margin-bottom: 14px; }
.post-title { font-size: clamp(28px, 4.4vw, 42px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.post-meta { margin-top: 18px; display: flex; gap: 14px; font-size: 13.5px; color: var(--text-softer); }
.post-hero-image { margin: 36px 0 0; border-radius: var(--radius-xl); overflow: hidden; max-width: 760px; margin-left: auto; margin-right: auto; }
.post-hero-image img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }

.post-body { padding: 48px 0 100px; }
.post-body .container { max-width: 720px; }
.post-content { font-size: 17px; line-height: 1.8; color: var(--text-soft); }
.post-content h2 { font-size: 22px; font-weight: 700; color: var(--text); margin: 38px 0 14px; letter-spacing: -0.01em; }
.post-content p { margin: 0 0 20px; }
.post-content p:first-child { font-size: 18.5px; color: var(--text); }

.post-not-found { padding: 140px 0 140px; text-align: center; }
.post-not-found h1 { font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.post-not-found p { color: var(--text-soft); margin-bottom: 28px; }

.post-cta {
  margin-top: 56px;
  padding: 36px;
  border-radius: var(--radius-xl);
  background: var(--brand-tint);
  text-align: center;
}
.post-cta h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.post-cta p { color: var(--text-soft); font-size: 14.5px; margin-bottom: 20px; }
