/* ── BLOG SPECIFIC STYLES ── */

/* Restore native cursor — custom cursor JS is not loaded on blog pages */
* { cursor: auto !important; }
a, button, [role="button"], label, select, .btn, .blog-card { cursor: pointer !important; }
a *, button *, .btn *, .blog-card * { cursor: inherit !important; }
input { cursor: text !important; }
#cursor, #cursor-ring { display: none !important; }

/* Nav override for blog pages */
.blog-nav-back {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Article layout */
.blog-article {
  padding: 2rem 0 5rem;
  position: relative;
  z-index: 1;
}

.blog-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Article header */
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.article-category {
  background: rgba(91,127,255,0.15);
  color: var(--accent);
  border: 1px solid rgba(91,127,255,0.3);
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-date, .article-read {
  font-size: 0.82rem;
  color: var(--muted);
}

.article-date::before { content: '·'; margin-right: 0.75rem; }

.blog-article h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.article-lead {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.7;
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin-bottom: 2.5rem;
}

/* Article hero image */
.article-hero-img {
  margin: 0 0 2.5rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-hero-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Prose content */
.prose h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--accent);
}

.prose p {
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.prose ul, .prose ol {
  margin: 1rem 0 1.5rem 1.5rem;
  line-height: 1.8;
}

.prose li {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.prose strong { color: var(--text); font-weight: 600; }

.prose .highlight-box {
  background: rgba(91,127,255,0.07);
  border: 1px solid rgba(91,127,255,0.2);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.prose .highlight-box p { margin: 0; }

.prose .stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.prose .stat-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.prose .stat-box strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

.prose .stat-box span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* CTA box */
.article-cta {
  background: rgba(91,127,255,0.08);
  border: 1px solid rgba(91,127,255,0.25);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.article-cta h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.article-cta p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Blog search bar */
.blog-search-wrap {
  max-width: 560px;
  margin: 0 auto 0.5rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.blog-search-inner {
  position: relative;
}

.blog-search-ic {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: var(--muted);
  pointer-events: none;
}

.blog-search-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.blog-search-input::placeholder { color: var(--muted); }

.blog-search-input:focus {
  border-color: rgba(91,127,255,0.6);
  background: rgba(255,255,255,0.06);
}

/* hide browser's native ✕ button in search inputs */
.blog-search-input::-webkit-search-cancel-button { display: none; }

.blog-no-results {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

/* Blog index */
.blog-hero {
  padding: 6rem 1.5rem 3rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin: 0 auto 1rem;
}

.blog-hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

.blog-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  border-color: rgba(91,127,255,0.5);
  transform: translateY(-2px);
}

.blog-card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
}

.blog-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.blog-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.blog-card-arrow {
  color: var(--accent);
  font-weight: 700;
}

/* ── NAV ALIGNMENT ──
   Article and legal pages have no <ul class="nav-links">, so .nav-right
   would sit right next to the logo instead of at the far right.
   Push it over, and undo that on the index pages that do have nav-links. */
.nav-right { margin-left: auto; }
.nav-links + .nav-right { margin-left: 0; }

/* ── NAV ON SMALL SCREENS ──
   Article and legal navs carry a back button, a language switcher and a CTA.
   Below 600px they no longer fit and the CTA was being clipped off-screen. */
@media (max-width: 600px) {
  .nav-inner { gap: 0.75rem; }
  /* The logo already links home, so the back button is redundant here */
  .nav-right .btn-ghost { display: none; }
  .blog-lang-btn { padding: 0.16rem 0.42rem; font-size: 0.68rem; }
  .nav-right .btn-primary { padding: 0.4rem 0.7rem !important; font-size: 0.78rem !important; }
}
@media (max-width: 430px) {
  /* Articles carry their own CTA at the end; legal pages need none */
  .nav-right .btn-primary { display: none; }
}
