/* ============================================================
   PIXANTRA — Blog page (dynamic, Strapi-driven)
   Leans on the tokens defined in styles.css / pages.css.
   ============================================================ */

.blog-main {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 20px) var(--pad) var(--pad);
  max-width: 1200px;
  margin: 0 auto;
}

body.blog-page {
  background:
    radial-gradient(circle at 15% 15%, rgba(124, 193, 255, 0.26) 0%, rgba(124, 193, 255, 0.08) 25%, transparent 48%),
    radial-gradient(circle at 85% 8%, rgba(118, 189, 255, 0.22) 0%, rgba(118, 189, 255, 0.08) 22%, transparent 42%),
    radial-gradient(circle at 75% 80%, rgba(91, 173, 255, 0.2) 0%, rgba(91, 173, 255, 0.06) 22%, transparent 42%),
    linear-gradient(135deg, #f8fcff 0%, #ffffff 55%, #f2f8ff 100%);
  color: #14314f;
  min-height: 100%;
}

body.blog-page::before,
body.blog-page::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(10px);
  opacity: 0.9;
}

body.blog-page::before {
  width: 360px;
  height: 360px;
  left: -90px;
  top: -80px;
  background: radial-gradient(circle, rgba(129, 201, 255, 0.28) 0%, rgba(129, 201, 255, 0.08) 45%, transparent 72%);
}

body.blog-page::after {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -80px;
  background: radial-gradient(circle, rgba(94, 176, 255, 0.24) 0%, rgba(94, 176, 255, 0.06) 45%, transparent 72%);
}

body.blog-page .header {
  position: relative;
  z-index: 4;
}

body.blog-page .logo,
body.blog-page .nav__link,
body.blog-page .nav__label,
body.blog-page .nav__num {
  color: #12304d;
}

body.blog-page .logo__text .logo__x {
  color: #3f95ff;
}

body.blog-page .nav__label::after,
body.blog-page .nav__link.is-active .nav__label::after {
  background: #3f95ff;
}

.blog-main {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 20px) var(--pad) var(--pad);
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(116, 188, 255, 0.35);
  border-radius: 32px;
  box-shadow: 0 24px 70px rgba(91, 145, 212, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------- Hero ---------- */
.blog-hero { margin-bottom: clamp(40px, 6vw, 80px); }
.blog-hero__tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #3f95ff;
  margin-bottom: 18px;
}
.blog-hero__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(3.4rem, 12vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: #10304f;
}
.blog-hero__sub {
  margin-top: 16px;
  max-width: 46ch;
  color: #5f718a;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

/* ---------- Grid ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(20px, 2.4vw, 34px);
}

.blog-loading, .blog-error, .blog-empty {
  grid-column: 1 / -1;
  color: #607086;
  font-size: 1rem;
  padding: 40px 0;
}
.blog-error { color: #ff7b7b; }
.blog-error a { color: #3f95ff; text-decoration: underline; }

/* ---------- Card ---------- */
.blog-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fcff 100%);
  border: 1px solid rgba(122, 191, 255, 0.7);
  border-radius: 16px;
  overflow: hidden;
  cursor: none;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 30px rgba(97, 152, 210, 0.08);
}
.blog-card:hover {
  border-color: rgba(63, 149, 255, 0.9);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(63, 149, 255, 0.16);
}
.blog-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--navy);
}
.blog-card__img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #dcefff 0%, #f8fbff 100%);
}
.blog-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.blog-card__meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: #7690aa;
}
.blog-card__cat { color: #3f95ff; }
.blog-card__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #10304f;
}
.blog-card__excerpt {
  color: #5f718a;
  font-size: 0.92rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__read {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: #3f95ff;
  margin-top: 6px;
}

/* ---------- Single post ---------- */
.blog-back {
  background: rgba(248, 252, 255, 0.95); border: 1px solid rgba(122, 191, 255, 0.6); border-radius: 10px;
  color: #14314f; font-family: var(--font-body); font-size: 0.85rem;
  padding: 10px 20px; cursor: none;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s;
  margin-bottom: 40px;
}
.blog-back:hover { border-color: #3f95ff; color: #0b63c4; background: #f3f9ff; }

#blog-article {
  max-width: 720px;
  margin: 0 auto;
}
.post-header { margin-bottom: 40px; }
.post-header__cat {
  font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: #3f95ff; margin-bottom: 14px; display: block;
}
.post-header__title {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.0; letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: #10304f;
}
.post-header__meta { color: #7690aa; font-size: 0.82rem; }
.post-header__img {
  width: 100%; border-radius: 14px; margin-top: 28px;
  aspect-ratio: 16/9; object-fit: cover;
}
.post-body {
  color: #54657c;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.8;
}
.post-body h2, .post-body h3 {
  font-family: var(--font-head); font-weight: 600;
  color: #10304f; margin: 2em 0 0.6em;
  letter-spacing: -0.01em;
}
.post-body h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.post-body h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); }
.post-body p { margin-bottom: 1.4em; }
.post-body a { color: #3f95ff; text-decoration: underline; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin-bottom: 1.4em; }
.post-body li { margin-bottom: 0.5em; }
.post-body blockquote {
  border-left: 3px solid #3f95ff;
  padding-left: 20px; margin: 1.6em 0;
  color: #5f718a; font-style: italic;
}
.post-body code {
  background: rgba(63,149,255,0.12); border-radius: 4px;
  padding: 2px 6px; font-size: 0.88em;
}
.post-body pre {
  background: #f4f9ff; border: 1px solid rgba(122, 191, 255, 0.55);
  border-radius: 10px; padding: 20px; overflow-x: auto;
  margin-bottom: 1.4em;
}
.post-body pre code { background: none; padding: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}
