/* CampusWalha – Blog listing & article styles (blog.html, blog-post.php) */
.page-hero {
  padding: 130px 2rem 60px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,183,0,0.12) 0%, transparent 65%);
}

/* Blog Layout */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

/* Featured Post */
.featured-post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 2rem;
  transition: var(--transition);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.featured-post:hover { border-color: rgba(91,33,250,0.5); transform: translateY(-4px); }
.featured-banner {
  background: linear-gradient(135deg, #1a0533, #3b0764, #7C4DFF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  padding: 2rem;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}
.featured-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%);
}
.featured-content { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.post-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 0.75rem;
  width: fit-content;
}
.cat-guide    { background: rgba(91,33,250,0.15); color: #a78bfa; border: 1px solid rgba(91,33,250,0.3); }
.cat-compare  { background: rgba(0,201,167,0.12); color: #00C9A7; border: 1px solid rgba(0,201,167,0.3); }
.cat-career   { background: rgba(255,183,0,0.12);  color: #FFB700; border: 1px solid rgba(255,183,0,0.3); }
.cat-tips     { background: rgba(255,100,100,0.12);color: #fc8181; border: 1px solid rgba(255,100,100,0.3); }
.cat-univ     { background: rgba(52,211,153,0.12); color: #34D399; border: 1px solid rgba(52,211,153,0.3); }
.cat-news     { background: rgba(96,165,250,0.12); color: #60A5FA; border: 1px solid rgba(96,165,250,0.3); }
.post-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.4;
  margin-bottom: 0.6rem;
  text-decoration: none;
  transition: color 0.2s;
}
.post-title:hover { color: var(--primary-light); }
a.post-title { display: block; }
.post-excerpt { font-size: 0.83rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.post-meta span { display: flex; align-items: center; gap: 4px; }
.read-more {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.75rem;
  transition: gap 0.2s;
}
.read-more:hover { gap: 8px; }

/* Regular Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.post-card:hover { transform: translateY(-5px); border-color: rgba(91,33,250,0.5); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
.post-card-banner {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.post-card-body { padding: 1.25rem; }

/* Sidebar */
.blog-sidebar { position: sticky; top: 85px; }
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-widget h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}
.recent-post-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.recent-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.recent-emoji { font-size: 1.5rem; flex-shrink: 0; }
.recent-title { font-size: 0.8rem; font-weight: 600; color: var(--text-white); line-height: 1.4; }
.recent-date  { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.blog-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.blog-tag:hover { background: rgba(91,33,250,0.15); border-color: var(--primary); color: var(--text-white); }

.newsletter-form { display: flex; flex-direction: column; gap: 0.75rem; }
.newsletter-form input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}
.newsletter-form input::placeholder { color: var(--text-dim); }
.newsletter-form button {
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.newsletter-form button:hover { opacity: 0.9; }

/* Category filter */
.blog-cats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.blog-cat-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.blog-cat-btn:hover, .blog-cat-btn.active {
  background: rgba(91,33,250,0.2);
  border-color: var(--primary);
  color: var(--text-white);
}

/* Load more */
.load-more-wrap { text-align: center; margin-top: 2rem; }

@media (max-width: 1024px) { .blog-layout { grid-template-columns: 1fr; } .blog-sidebar { position: static; } }
@media (max-width: 640px)  { .posts-grid { grid-template-columns: 1fr; } .featured-post { grid-template-columns: 1fr; } .featured-banner { min-height: 140px; } }

/* Image banners (posts with a featured image) */
.featured-banner.has-img, .post-card-banner.has-img { background-size: cover; background-position: center; }
.post-card { display: flex; flex-direction: column; }
.post-card-body { flex: 1; display: flex; flex-direction: column; }
.post-card-body .read-more { margin-top: auto; padding-top: 0.75rem; }
.recent-post-item { text-decoration: none; }
.recent-thumb { width: 52px; height: 40px; border-radius: 6px; background: var(--bg-card2, #eef2ff) center/cover no-repeat; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.cat-row { display: flex; justify-content: space-between; font-size: 0.83rem; color: var(--text-muted); padding: 0.45rem 0; border-bottom: 1px solid var(--border); cursor: pointer; text-decoration: none; }
.cat-row:last-child { border-bottom: 0; }
.cat-row:hover { color: var(--primary); }
.cat-row b { color: var(--secondary); }
.blog-empty { grid-column: 1/-1; text-align: center; padding: 3rem; color: var(--text-muted); }
.skeleton { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius-lg); min-height: 260px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ===== Single article (blog-post.php) ===== */
.article-wrap { max-width: 1200px; margin: 0 auto; padding: 110px 1.5rem 3rem; }
.breadcrumb { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.article { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; }
.article-cover { width: 100%; aspect-ratio: 16/8; object-fit: cover; display: block; }
.article-inner { padding: 2rem 2.25rem 2.5rem; }
.article h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.25; margin: 0.6rem 0 0.8rem; color: var(--text-light); }
.article-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem; color: var(--text-muted); padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.article-content { font-size: 1.04rem; line-height: 1.85; color: var(--text-light); overflow-wrap: break-word; }
.article-content h2 { font-size: 1.45rem; margin: 2rem 0 0.75rem; line-height: 1.3; }
.article-content h3 { font-size: 1.2rem; margin: 1.6rem 0 0.6rem; }
.article-content h4 { font-size: 1.05rem; margin: 1.4rem 0 0.5rem; }
.article-content p { margin: 0 0 1.1rem; }
.article-content ul, .article-content ol { margin: 0 0 1.2rem 1.4rem; }
.article-content li { margin-bottom: 0.4rem; }
.article-content a { color: var(--primary); }
.article-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 1rem 0; }
.article-content blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--secondary); background: rgba(255,90,0,0.06); border-radius: 0 10px 10px 0; font-style: italic; }
.article-content iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 10px; margin: 1rem 0; }
.article-content pre { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: 8px; overflow-x: auto; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; display: block; overflow-x: auto; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; }
.article-content .ql-align-center { text-align: center; }
.article-content .ql-align-right { text-align: right; }
.article-content .ql-align-justify { text-align: justify; }
.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.article-share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 0.85rem; font-weight: 700; }
.article-share a { padding: 0.45rem 0.9rem; border-radius: 99px; border: 1px solid var(--border); text-decoration: none; color: var(--text-light); font-weight: 600; font-size: 0.8rem; }
.article-share a:hover { border-color: var(--primary); color: var(--primary); }
.article-cta { margin-top: 2rem; padding: 1.5rem; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.article-cta h3 { margin: 0 0 0.25rem; font-size: 1.1rem; color: #fff; }
.article-cta p { margin: 0; font-size: 0.85rem; opacity: 0.85; }
.related-title { font-size: 1.2rem; margin: 2.5rem 0 1rem; }
@media (max-width: 640px) { .article-inner { padding: 1.25rem 1.1rem 1.75rem; } .article-wrap { padding-top: 90px; } }
