/* ════════════════════════════════════════════════════════════
   CAMPUSRAY — Blog Styles
   ════════════════════════════════════════════════════════════ */

/* ── Blog Post Layout ─────────────────────────────────────── */
.blog-post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-12);
  align-items: start;
  padding-top: var(--space-12);
  padding-bottom: var(--space-20);
}

/* ── Article Hero ─────────────────────────────────────────── */
.article-hero {
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-8);
  position: relative;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,22,40,0.4) 0%, transparent 60%);
}

/* ── Article Header ───────────────────────────────────────── */
.article-header {
  margin-bottom: var(--space-8);
}

.article-category {
  margin-bottom: var(--space-3);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-5xl));
  font-weight: 800;
  color: var(--color-navy);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-5);
}

.article-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 2px solid var(--color-cream-dark);
}

.article-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.article-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold), var(--color-steel));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-white);
  font-size: var(--text-sm);
}

.article-author-name {
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-navy);
}

.article-author-role {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.article-meta-items {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-label);
}

.article-meta-item svg,
.article-meta-item .icon {
  font-size: 14px;
  opacity: 0.7;
}

/* ── Table of Contents ────────────────────────────────────── */
.toc-box {
  background: var(--color-cream);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
}

.toc-title {
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: var(--space-4);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toc-item {
  font-size: var(--text-sm);
  color: var(--color-steel);
  transition: color var(--transition-fast);
  padding-left: var(--space-3);
  position: relative;
}

.toc-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-gold);
  transform: translateY(-50%);
}

.toc-item:hover { color: var(--color-navy); }

/* ── Article Content (Typography) ────────────────────────── */
.article-content {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: var(--space-5);
  color: #2D3748;
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  font-weight: 800;
  color: var(--color-navy);
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-cream-dark);
  position: relative;
}

.article-content h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 60px;
  height: 2px;
  background: var(--color-gold);
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-navy);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.article-content h4 {
  font-family: var(--font-label);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-navy);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content ul,
.article-content ol {
  margin-bottom: var(--space-5);
  padding-left: var(--space-6);
}

.article-content ul { list-style: none; padding-left: 0; }

.article-content ul li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-2);
  color: #2D3748;
}

.article-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
  flex-shrink: 0;
}

.article-content ol {
  list-style: decimal;
}

.article-content ol li {
  margin-bottom: var(--space-2);
  color: #2D3748;
  padding-left: var(--space-2);
}

.article-content ol li::marker {
  color: var(--color-gold-dark);
  font-weight: 700;
  font-family: var(--font-label);
}

.article-content strong {
  font-weight: 700;
  color: var(--color-navy);
}

.article-content em {
  font-style: italic;
  color: var(--text-secondary);
}

.article-content a {
  color: var(--color-steel);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.article-content a:hover { color: var(--color-navy); }

.article-content blockquote {
  border-left: 4px solid var(--color-gold);
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(135deg, rgba(245,166,35,0.06), rgba(45,90,142,0.04));
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: var(--space-8) 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-navy);
  line-height: var(--leading-snug);
}

.article-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  background: var(--color-cream-dark);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--color-navy);
}

.article-content pre {
  background: var(--color-navy);
  color: var(--color-cream);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-6) 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.article-content img {
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
  box-shadow: var(--shadow-lg);
}

/* Callout boxes */
.article-content .callout {
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-8) 0;
}

.article-content .callout-title {
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── AdSense Slots ────────────────────────────────────────── */
.ad-slot {
  background: var(--color-cream-dark);
  border: 1px dashed rgba(10, 22, 40, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  margin: var(--space-8) 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot-label {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Article Footer ───────────────────────────────────────── */
.article-tags-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-cream-dark);
}

.article-tags-title {
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Author Card ──────────────────────────────────────────── */
.author-card {
  background: var(--color-cream);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-top: var(--space-8);
  display: flex;
  gap: var(--space-5);
  border: 1px solid var(--color-cream-dark);
}

.author-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold), var(--color-steel));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-white);
  flex-shrink: 0;
  overflow: hidden;
}

.author-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-card-info {}
.author-card-label {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-1);
}

.author-card-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-2);
}

.author-card-bio {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── Social Share ─────────────────────────────────────────── */
.share-section {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-cream-dark);
}

.share-title {
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-3);
}

.share-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-family: var(--font-label);
  font-weight: 500;
  border: 1.5px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.share-btn-whatsapp {
  background: rgba(37,211,102,0.1);
  color: #128C7E;
  border-color: rgba(37,211,102,0.2);
}
.share-btn-whatsapp:hover { background: #25D366; color: white; border-color: #25D366; }

.share-btn-linkedin {
  background: rgba(0,119,181,0.1);
  color: #0077B5;
  border-color: rgba(0,119,181,0.2);
}
.share-btn-linkedin:hover { background: #0077B5; color: white; border-color: #0077B5; }

.share-btn-x {
  background: rgba(0,0,0,0.06);
  color: #14171A;
  border-color: rgba(0,0,0,0.1);
}
.share-btn-x:hover { background: #14171A; color: white; border-color: #14171A; }

.share-btn-copy {
  background: rgba(10,22,40,0.06);
  color: var(--color-navy);
  border-color: rgba(10,22,40,0.12);
}
.share-btn-copy:hover { background: var(--color-navy); color: white; }

/* ── Blog Sidebar ─────────────────────────────────────────── */
.blog-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + var(--space-6));
}

.sidebar-widget {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(10, 22, 40, 0.06);
}

.sidebar-widget-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-cream-dark);
  position: relative;
}

.sidebar-widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background: var(--color-gold);
}

.sidebar-post {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-cream-dark);
  transition: transform var(--transition-fast);
}

.sidebar-post:last-child { border-bottom: none; }

.sidebar-post:hover { transform: translateX(4px); }

.sidebar-post-thumb {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-cream-dark);
}

.sidebar-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center;
}

.sidebar-post-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-navy);
  line-height: var(--leading-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.sidebar-post:hover .sidebar-post-title { color: var(--color-steel); }

.sidebar-post-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-label);
  margin-top: var(--space-1);
}

/* ── Related Posts ────────────────────────────────────────── */
.related-posts-section {
  padding: var(--space-16) 0;
  background: var(--color-cream-dark);
}

/* ── Blog Listing ─────────────────────────────────────────── */
.blog-filters {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

/* ── Progress Bar (Reading) ───────────────────────────────── */
.reading-progress {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-steel-light));
  z-index: var(--z-sticky);
  transition: width 0.1s linear;
  width: 0%;
}

/* ── FAQ Section ──────────────────────────────────────────── */
.faq-section {
  background: var(--color-cream);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-top: var(--space-10);
}

.faq-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: var(--space-6);
}

.faq-item {
  border-bottom: 1px solid var(--color-cream-dark);
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  cursor: pointer;
  gap: var(--space-4);
}

.faq-question-text {
  font-family: var(--font-label);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-navy);
  line-height: var(--leading-snug);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-navy);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.faq-item.open .faq-icon {
  background: var(--color-gold);
  color: var(--color-navy);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-base);
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding-bottom: var(--space-4);
}

.faq-answer-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── Responsive Blog ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .blog-post-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .article-title {
    font-size: var(--text-2xl);
  }

  .article-meta-row {
    gap: var(--space-3);
  }

  .author-card {
    flex-direction: column;
  }

  .share-buttons {
    gap: var(--space-2);
  }
}
