/* ============================================================
   Sovamoon — Blog Styles
   blog/index.php  +  blog/post.php
   ============================================================ */

/* ── Blog Hero ─────────────────────────────────────────────── */
.blog-hero {
  position: relative;
  padding: 160px 0 80px;
  overflow: hidden;
  background-color: #050810;
}
.blog-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero-content {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.blog-hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin: 16px 0 20px;
  line-height: 1.15;
}
.blog-hero-content p {
  font-size: 1.05rem;
  color: var(--grey);
  line-height: 1.7;
}

/* ── Blog Listing ──────────────────────────────────────────── */
.blog-listing {
  padding: 60px 0 100px;
  background-color: var(--color-secondary);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--grey);
  font-size: 1rem;
}

/* ── Blog Card ─────────────────────────────────────────────── */
.blog-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 8px 32px rgba(0,212,255,0.08);
}
.blog-card-img-wrap {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-img {
  transform: scale(1.04);
}
.blog-card-img-placeholder {
  aspect-ratio: 16/9;
  background: rgba(0,212,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,212,255,0.3);
}
.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #00D4FF;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 12px;
}
.blog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
  font-family: 'Space Grotesk', sans-serif;
}
.blog-card-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}
.blog-card-title a:hover { color: #00D4FF; }
.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--grey);
  line-height: 1.65;
  margin: 0 0 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: rgba(160,174,192,0.7);
  margin-bottom: 16px;
}
.blog-meta-date::before { content: '📅 '; font-size: 0.7rem; }
.blog-meta-read::before  { content: '⏱ '; font-size: 0.7rem; }
.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #00D4FF;
  text-decoration: none;
  transition: gap 0.2s;
  margin-top: auto;
}
.blog-card-link:hover { gap: 10px; }

/* ── Pagination ─────────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 60px;
}
.blog-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.blog-page-btn:hover {
  background: rgba(0,212,255,0.1);
  border-color: rgba(0,212,255,0.3);
}
.blog-page-info {
  font-size: 0.875rem;
  color: var(--grey);
}

/* ── Post Hero ──────────────────────────────────────────────── */
.post-hero {
  position: relative;
  padding: 140px 0 60px;
  overflow: hidden;
}
.post-hero-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.post-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,15,44,0.6) 0%, rgba(10,15,44,0.95) 100%);
}
.post-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,255,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}
.post-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.blog-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--grey);
  margin-bottom: 20px;
}
.blog-breadcrumb a {
  color: var(--grey);
  text-decoration: none;
  transition: color 0.2s;
}
.blog-breadcrumb a:hover { color: #00D4FF; }
.blog-breadcrumb span:last-child {
  color: rgba(160,174,192,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.post-hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  margin: 16px 0 20px;
}
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--grey);
}
.meta-sep { opacity: 0.4; }

/* ── Post Body Section ──────────────────────────────────────── */
.post-body-section {
  padding: 60px 0 80px;
}
.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}
.post-article { min-width: 0; }
.post-excerpt {
  font-size: 1.1rem;
  color: var(--grey);
  line-height: 1.75;
  border-left: 3px solid #00D4FF;
  padding: 16px 20px;
  background: rgba(0,212,255,0.04);
  border-radius: 0 8px 8px 0;
  margin-bottom: 36px;
}

/* ── Blog Body Typography ───────────────────────────────────── */
.blog-body {
  font-size: 1rem;
  line-height: 1.8;
  color: #c8d4e0;
}
.blog-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 40px 0 16px;
  line-height: 1.3;
}
.blog-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 28px 0 12px;
}
.blog-body p {
  margin: 0 0 20px;
}
.blog-body ul,
.blog-body ol {
  padding-left: 24px;
  margin: 0 0 20px;
}
.blog-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.blog-body strong {
  color: #fff;
  font-weight: 600;
}
.blog-body a {
  color: #00D4FF;
  text-decoration: underline;
  text-decoration-color: rgba(0,212,255,0.4);
  transition: text-decoration-color 0.2s;
}
.blog-body a:hover { text-decoration-color: #00D4FF; }
.blog-body blockquote {
  border-left: 3px solid #7B2FFF;
  padding: 12px 20px;
  margin: 24px 0;
  background: rgba(123,47,255,0.06);
  border-radius: 0 8px 8px 0;
  color: #e2e8f0;
  font-style: italic;
}

/* ── Post Tags ──────────────────────────────────────────────── */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.post-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--grey);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 4px 10px;
}

/* ── Post Nav ───────────────────────────────────────────────── */
.post-nav {
  margin-top: 28px;
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--grey);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}
.post-back:hover { color: #00D4FF; }

/* ── Post Sidebar ───────────────────────────────────────────── */
.post-sidebar { position: sticky; top: 100px; }
.post-sidebar-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 24px;
}
.post-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.1rem;
}
.post-sidebar-card p {
  font-size: 0.875rem;
  color: var(--grey);
  line-height: 1.6;
  margin: 0;
}
.post-sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-sidebar-links li { margin-bottom: 8px; }
.post-sidebar-links a {
  font-size: 0.875rem;
  color: var(--grey);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-sidebar-links a::before {
  content: '→';
  color: rgba(0,212,255,0.5);
  font-size: 0.75rem;
}
.post-sidebar-links a:hover { color: #00D4FF; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
}
@media (max-width: 768px) {
  .blog-hero  { padding: 130px 0 60px; }
  .post-hero  { padding: 120px 0 48px; }
  .blog-grid  { grid-template-columns: 1fr; gap: 20px; }
  .blog-listing { padding: 40px 0 80px; }
}
