/* ── Blog Hub ── */

:root {
  --blog-ink: #0a1224;
  --blog-ink-soft: rgba(10, 18, 36, 0.68);
  --blog-line: rgba(10, 18, 36, 0.12);
  --blog-line-strong: rgba(10, 18, 36, 0.2);
  --blog-paper: rgba(255, 255, 255, 0.82);
  --blog-paper-strong: rgba(255, 255, 255, 0.94);
  --blog-shadow: 0 22px 54px rgba(10, 18, 36, 0.12);
  --blog-shadow-strong: 0 28px 70px rgba(10, 18, 36, 0.16);
  --blog-blue: #1457d7;
  --blog-blue-soft: rgba(20, 87, 215, 0.12);
  --blog-orange: #e36b21;
  --blog-orange-soft: rgba(227, 107, 33, 0.14);
}

body.blog-hub-page {
  background-color: #f1efe6;
  background-image:
    radial-gradient(rgba(17, 30, 55, 0.14) 0.9px, transparent 0.9px),
    radial-gradient(1100px 620px at 12% -8%, rgba(255, 255, 255, 0.92), transparent 64%),
    radial-gradient(980px 560px at 95% 6%, rgba(196, 206, 224, 0.42), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(241, 238, 230, 0.94));
  background-size: 24px 24px, auto, auto, auto;
  color: var(--blog-ink);
}

.blog-hub-bg-image {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--blog-hub-hero-bg, none) center / cover no-repeat;
  opacity: 0.22;
}

.blog-hub-page .blog-shell,
.blog-hub-page .blog-main,
.blog-hub-page footer,
.blog-hub-page .blog-cinematic-hero {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════
   CINEMATIC HERO — Full-viewport (About page style)
   ═══════════════════════════════════════ */

.blog-cinematic-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(24px, 5vw, 80px) clamp(60px, 8vh, 120px);
  overflow: hidden;
  z-index: 2;
}

.blog-cinematic-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.blog-cinematic-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(0.85);
}

.blog-cinematic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12, 23, 48, 0.95) 0%,
    rgba(12, 23, 48, 0.55) 38%,
    rgba(12, 23, 48, 0.18) 68%,
    transparent 100%
  );
  z-index: 1;
}

.blog-cinematic-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.blog-kicker {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blog-orange);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: blogHeroFadeUp 0.8s 0.3s ease forwards;
}

.blog-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(48px, 8vw, 110px);
  font-weight: 700;
  line-height: 0.95;
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0;
  opacity: 0;
  transform: translateY(40px);
  animation: blogHeroFadeUp 0.8s 0.5s ease forwards;
}

.blog-title span {
  display: block;
  color: var(--blog-orange);
}

.blog-intro {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: blogHeroFadeUp 0.8s 0.65s ease forwards;
}

.blog-intro p {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  max-width: 640px;
}

.blog-hero-line {
  width: 60px;
  height: 2px;
  background: var(--blog-orange);
  margin-top: 32px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  animation: blogHeroLineIn 0.6s 0.9s ease forwards;
}

.blog-hero-note {
  display: flex;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-top: 24px;
  max-width: 480px;
  opacity: 0;
  animation: blogHeroFadeUp 0.6s 1s ease forwards;
}

.blog-note-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.6rem;
  background: rgba(227, 107, 33, 0.2);
  color: var(--blog-orange);
  font-family: var(--font-sub);
  font-weight: 700;
  font-size: 0.92rem;
}

.blog-hero-note strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
}

.blog-hero-note span {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.5;
}

@keyframes blogHeroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blogHeroLineIn {
  to { opacity: 1; transform: scaleX(1); }
}

/* ── Shell ── */

.blog-shell {
  width: min(1280px, calc(100% - 3rem));
  margin: 0 auto;
}

/* ── Main ── */

.blog-main {
  padding-top: 3rem;
}

/* ── Hero Grid (for compatibility — used inside cinematic hero) ── */

.blog-hero-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Search Bar ── */

.blog-search-bar {
  margin-top: 2.2rem;
  padding: 1.2rem 0 1.7rem;
  border-top: 1px solid rgba(10, 18, 36, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-search-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.blog-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--blog-ink-soft);
  pointer-events: none;
  transition: color 0.2s ease;
}

.blog-search-wrap:focus-within .blog-search-icon {
  color: var(--blog-blue);
}

.blog-search {
  width: 100%;
  padding: 0.82rem 1rem 0.82rem 3rem;
  border: 1px solid var(--blog-line);
  border-radius: 0.85rem;
  background: var(--blog-paper-strong);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--blog-ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.blog-search::placeholder {
  color: rgba(10, 18, 36, 0.36);
  font-weight: 400;
}

.blog-search:focus {
  border-color: var(--blog-blue);
  box-shadow: 0 0 0 3px var(--blog-blue-soft);
  background: #fff;
}

.blog-search-clear {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 18, 36, 0.06);
  color: var(--blog-ink-soft);
  cursor: pointer;
  display: none;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.blog-search-clear.is-visible {
  display: grid;
}

.blog-search-clear:hover {
  background: rgba(10, 18, 36, 0.12);
  color: var(--blog-ink);
}

.blog-search-clear svg {
  width: 14px;
  height: 14px;
}

.blog-result-count {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--blog-ink-soft);
  white-space: nowrap;
}

/* ── Category Filters ── */

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-left: auto;
}

.blog-filter {
  border: 0;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  background: transparent;
  color: rgba(10, 18, 36, 0.42);
  font-family: var(--font-head);
  font-size: clamp(0.88rem, 1.4vw, 1.05rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.blog-filter:hover {
  color: rgba(10, 18, 36, 0.68);
}

.blog-filter.is-active {
  color: var(--blog-ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(10, 18, 36, 0.08);
}

/* ── Grid ── */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  padding-bottom: 3rem;
}

/* ── Card — always horizontal (image left, body right) ── */

.blog-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.48fr) 1fr;
  grid-template-rows: 1fr;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(10, 18, 36, 0.09);
  border-radius: 1.75rem;
  overflow: hidden;
  box-shadow: var(--blog-shadow);
  position: relative;
  transform: translateY(0);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--blog-shadow-strong);
  border-color: rgba(10, 18, 36, 0.14);
}

/* corner brackets */
.blog-card::before,
.blog-card::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: rgba(196, 216, 40, 0.9);
  border-style: solid;
  border-width: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.blog-card::before {
  top: 14px;
  right: 14px;
  border-top-width: 2.5px;
  border-right-width: 2.5px;
  border-radius: 0 6px 0 0;
  transform: translate(4px, -4px);
}

.blog-card::after {
  bottom: 14px;
  left: 14px;
  border-bottom-width: 2.5px;
  border-left-width: 2.5px;
  border-radius: 0 0 0 6px;
  transform: translate(-4px, 4px);
}

.blog-card:hover::before,
.blog-card:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

/* ── Card Media ── */

.blog-card-media {
  position: relative;
  overflow: hidden;
  background: rgba(10, 18, 36, 0.04);
  min-height: 260px;
}

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

.blog-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(10, 18, 36, 0.06));
  pointer-events: none;
}

/* ── Card Body ── */

.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.8rem 1.8rem 1.5rem;
  justify-content: center;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.blog-card-category {
  font-family: var(--font-sub);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blog-ink-soft);
}

.blog-card-date {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(10, 18, 36, 0.4);
}

.blog-card-date::before {
  content: '\00b7';
  margin-right: 0.7rem;
}

.blog-card-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--blog-ink);
  margin: 0;
}

.blog-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--blog-ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Card Chips ── */

.blog-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.blog-chip {
  font-family: var(--font-sub);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.32rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--blog-line);
  color: var(--blog-ink-soft);
  background: transparent;
  white-space: nowrap;
}

/* ── Card Footer ── */

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.4rem;
}

.blog-read-time {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(10, 18, 36, 0.4);
}

.blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blog-blue);
  text-decoration: none;
  transition: gap 0.2s ease;
}

.blog-card:hover .blog-card-cta {
  gap: 0.6rem;
}

.blog-card-cta svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-cta svg {
  transform: translateX(2px);
}

/* ── Featured Card — same horizontal layout, slightly larger ── */

.blog-card.is-featured .blog-card-body {
  padding: 2rem 2.2rem 1.8rem;
  gap: 0.9rem;
}

.blog-card.is-featured .blog-card-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}

.blog-card.is-featured .blog-card-excerpt {
  -webkit-line-clamp: 4;
}

/* ── Empty State ── */

.blog-empty {
  padding: 3rem 2rem;
  border-radius: 1.5rem;
  border: 1px dashed rgba(10, 18, 36, 0.18);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.blog-empty h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--blog-ink);
  margin: 0 0 0.5rem;
}

.blog-empty p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--blog-ink-soft);
  margin: 0;
}

/* ── CTA Section ── */

.blog-cta {
  margin: 1rem 0 4.5rem;
  padding: 2.8rem clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 2rem;
  background: var(--blog-ink);
  color: #fff;
  box-shadow: var(--blog-shadow-strong);
}

.blog-cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.blog-cta h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0;
}

.blog-cta p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  margin: 0.8rem 0 0;
  max-width: 50ch;
}

.blog-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
}

.blog-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-text-link:hover {
  color: #fff;
}

/* ── Responsive ── */

@media (max-width: 1180px) {
  .blog-cta-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .blog-cinematic-hero {
    min-height: 85vh;
  }

  .blog-title {
    font-size: clamp(40px, 12vw, 72px);
  }
}

@media (max-width: 900px) {
  .blog-main {
    padding-top: 7.5rem;
  }

  .blog-shell {
    width: min(100%, calc(100% - 1.5rem));
  }

  .blog-search-bar {
    flex-wrap: wrap;
  }

  .blog-search-wrap {
    max-width: 100%;
    order: -1;
    width: 100%;
  }

  .blog-filters {
    margin-left: 0;
    width: 100%;
  }

  .blog-result-count {
    width: 100%;
    text-align: center;
    order: 1;
  }
}

@media (max-width: 700px) {
  .blog-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .blog-card-media {
    min-height: 200px;
    aspect-ratio: 16 / 10;
  }

  .blog-card-body {
    padding: 1.35rem 1.3rem 1.25rem;
  }

  .blog-cta {
    padding: 2rem 1.3rem;
  }

  .blog-cta-actions {
    width: 100%;
  }

  .blog-cta-actions .gradient-border-btn {
    width: 100%;
    justify-content: center;
  }
}
