/* ==========================================================================
   MINDFORG — ADVANCED MOBILE & DESKTOP EDITORIAL BLOG STYLESHEET
   Psychology, Sociology, Self-Improvement & Human Behavior Publication Engine
   ========================================================================== */

/* 1. Global Visual Theme Variables & Utilities */
:root {
  --mf-navy-dark: #070F26;
  --mf-navy-mid: #0D2142;
  --mf-blue-primary: #1261A8;
  --mf-blue-light: #EFF6FF;
  --mf-gold-accent: #D4AF37;
  --mf-gold-light: #FEF3C7;
  --mf-text-dark: #0F172A;
  --mf-text-muted: #64748B;
  --mf-bg-body: #F8FAFC;
  --mf-card-radius: 20px;
}

/* 2. Hero Section Styling */
.blog-hero-v8 {
  background: linear-gradient(135deg, #070F26 0%, #0D2142 60%, #1261A8 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-hero-v8::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.blog-hero-title {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.gold-badge-tag {
  background: rgba(212, 175, 55, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(212, 175, 55, 0.3);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* 3. Category Horizontal Navigation Rail */
.category-nav-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.category-nav-rail::-webkit-scrollbar {
  display: none;
}

.cat-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background-color: #FFFFFF;
  color: #334155;
}

.cat-pill-btn:active {
  transform: scale(0.95);
}

.cat-pill-btn.active {
  background-color: #1261A8;
  color: #FFFFFF !important;
  border-color: #1261A8;
  box-shadow: 0 4px 12px rgba(18, 97, 168, 0.25);
}

.cat-pill-btn .cat-count {
  font-size: 11px;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 6px;
  border-radius: 20px;
}

.cat-pill-btn.active .cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* 4. Popular Search Tags */
.popular-tag-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 4px 12px;
  border-radius: 30px;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.popular-tag-chip:hover, .popular-tag-chip:active {
  background: #1261A8;
  color: #FFFFFF;
  border-color: #1261A8;
}

/* 5. Article Card Styling */
.article-card-v8 {
  background: #FFFFFF;
  border-radius: var(--mf-card-radius);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card-v8:active {
  transform: scale(0.985);
}

@media (min-width: 992px) {
  .article-card-v8:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  }
}

.article-card-v8 .card-image-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background-color: #0F172A;
}

.article-card-v8 .card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card-v8:hover .card-image-wrapper img {
  transform: scale(1.04);
}

.article-card-v8 .card-body-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 6. Featured Article Hero Card */
.featured-card-v8 {
  background: #FFFFFF;
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  position: relative;
}

.featured-card-v8 .featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: rgba(11, 19, 43, 0.85);
  backdrop-filter: blur(8px);
  color: #D4AF37;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 7. Reading View Styling (post.php / mobile/post.php) */
.reading-container {
  max-width: 768px;
  margin: 0 auto;
}

.article-reading-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #1E293B;
}

.article-reading-body p {
  margin-bottom: 1.5rem;
}

.article-reading-body blockquote {
  border-left: 4px solid #D4AF37;
  padding-left: 18px;
  margin: 2rem 0;
  font-style: italic;
  color: #334155;
  background: #F8FAFC;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
}

.article-reading-body img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 1.5rem 0;
}

/* 8. Skeleton Loaders */
.skeleton-box {
  background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 9. Touch targets & Safe Area padding */
@media (max-width: 767px) {
  .mobile-safe-bottom {
    padding-bottom: max(85px, calc(75px + env(safe-area-inset-bottom)));
  }
}
