/* ============================================================
   Lebasi Blog — Public Styles (content only)
   Header/Footer styles come from main site's styles.css
   ============================================================ */

/* ---------- Blog Layout ---------- */
.blog-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

/* ---------- Blog Hero ---------- */
.blog-hero {
  background: linear-gradient(160deg, var(--lebasi-blue-dark) 0%, var(--primary) 50%, var(--lebasi-blue-light) 100%);
  color: #fff;
  padding: 8rem 1.5rem 3.5rem;
  text-align: center;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.blog-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
  color: #fff;
}

/* ---------- Post Cards ---------- */
.posts-grid { display: grid; gap: 2rem; }

.post-card {
  background: #fff;
  border: 1px solid hsl(200, 20%, 88%);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.25s cubic-bezier(0.2,0.8,0.2,1);
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px hsla(200, 50%, 10%, 0.08);
}
.post-card-featured {
  grid-column: 1 / -1;
}
.post-card-featured .post-card-image {
  aspect-ratio: 21/9;
  min-height: 300px;
}
.post-card-featured .post-card-body {
  padding: 2rem;
}
.post-card-featured:not(:has(.post-card-image)) .post-card-body {
  padding: 2.5rem;
}
.post-card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: hsl(200, 15%, 93%);
}
.post-card-featured .post-card-image {
  aspect-ratio: auto;
  min-height: 320px;
}
.post-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1);
}
.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.post-card-category {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lebasi-blue-light);
}
.post-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--foreground);
  letter-spacing: -0.01em;
}
.post-card-featured .post-card-title { font-size: 1.6rem; }
.post-card a:hover .post-card-title { color: var(--primary); }

.post-card-excerpt {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  display: flex; gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted-foreground);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid hsl(200, 20%, 88%);
}

/* ---------- Sidebar ---------- */
.blog-sidebar { display: flex; flex-direction: column; gap: 2rem; }

.sidebar-widget {
  background: hsl(200, 30%, 96%);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
}
.sidebar-categories { list-style: none; }
.sidebar-categories li { padding: 0.5rem 0; border-bottom: 1px solid hsl(200,20%,88%); }
.sidebar-categories li:last-child { border: none; }
.sidebar-categories a { display: flex; justify-content: space-between; color: var(--foreground); font-size: 0.9rem; }
.cat-count { background: hsl(200,20%,92%); padding: 0.1rem 0.5rem; border-radius: 99px; font-size: 0.78rem; color: var(--muted-foreground); }

.sidebar-recent-post { display: flex; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid hsl(200,20%,88%); }
.sidebar-recent-post:last-child { border: none; }
.sidebar-recent-post img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.recent-title { font-size: 0.85rem; font-weight: 600; line-height: 1.4; color: var(--foreground); }
.recent-date { font-size: 0.75rem; color: var(--muted-foreground); }

/* ---------- Single Post ---------- */
.single-post-header {
  background: linear-gradient(160deg, var(--lebasi-blue-dark), var(--primary));
  color: #fff;
  padding: 8rem 1.5rem 2.5rem;
}
.single-post-header-inner { max-width: 760px; margin: 0 auto; }
.single-post-category { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.8; margin-bottom: 0.75rem; }
.single-post-header h1 { font-family: var(--font-display); font-size: clamp(1.75rem,3.5vw,2.5rem); font-weight: 700; line-height: 1.2; margin-bottom: 1rem; color: #fff; }
.single-post-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.88rem; opacity: 0.8; }

.single-post-content { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.single-post-featured-img { border-radius: var(--radius); margin-bottom: 2rem; overflow: hidden; box-shadow: 0 4px 20px hsla(200,50%,10%,0.1); }
.single-post-featured-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* Post body typography */
.post-body { font-size: 1.05rem; }
.post-body h2 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 2.5rem 0 1rem; }
.post-body h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin: 2rem 0 0.75rem; }
.post-body p { margin-bottom: 1.25rem; }
.post-body ul, .post-body ol { margin: 1rem 0 1.5rem 1.5rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body blockquote { border-left: 4px solid var(--primary); padding: 1rem 1.25rem; margin: 1.5rem 0; background: hsl(200,30%,96%); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; }
.post-body a { color: var(--lebasi-blue-light); text-decoration: underline; text-underline-offset: 2px; }
.post-body img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-body strong { font-weight: 600; }

/* Video */
.post-video { position: relative; padding-bottom: 56.25%; margin: 2rem 0; border-radius: var(--radius); overflow: hidden; }
.post-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid hsl(200,20%,88%); }
.post-tag { background: hsl(200,20%,92%); color: var(--foreground); padding: 0.3rem 0.75rem; border-radius: 99px; font-size: 0.82rem; font-weight: 500; }

/* Post navigation */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid hsl(200,20%,88%); }
.post-nav-item { padding: 1.25rem; background: hsl(200,30%,96%); border-radius: var(--radius); transition: background 0.3s; }
.post-nav-item:hover { background: hsl(200,20%,92%); }
.post-nav-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 0.4rem; }
.post-nav-title { font-family: var(--font-display); font-weight: 600; color: var(--foreground); }
.post-nav-next { text-align: right; }

/* Category header */
.category-header { background: hsl(200,30%,96%); padding: 8rem 1.5rem 2.5rem; text-align: center; border-bottom: 1px solid hsl(200,20%,88%); }
.category-header h1 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.category-header p { color: var(--muted-foreground); margin-top: 0.5rem; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid hsl(200,20%,88%); }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 0.5rem; border-radius: 8px; font-size: 0.9rem; font-weight: 500; }
.pagination a { color: var(--foreground); border: 1px solid hsl(200,20%,88%); transition: all 0.3s; }
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; }

/* Search input */
.blog-search-input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid hsl(200,20%,88%); border-radius: 8px; font-size: 0.9rem; font-family: var(--font-body); }
.blog-search-btn { display: inline-flex; align-items: center; padding: 0.5rem 0.75rem; background: var(--primary); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-size: 0.9rem; }

/* Reading progress */
.reading-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 9999; }
.reading-progress-bar { height: 100%; background: var(--lebasi-gold); width: 0; transition: width 0.1s linear; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .blog-layout { grid-template-columns: 1fr; }
  .post-card-featured { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .blog-hero { padding: 7rem 1rem 2rem; }
  .post-card-body { padding: 1.15rem; }
  .post-card-title { font-size: 1.15rem; }
  .single-post-content { padding: 1.5rem 1rem 3rem; }
  .post-body { font-size: 1rem; }
  .post-nav { grid-template-columns: 1fr; }
  .single-post-header { padding: 7rem 1rem 2rem; }
  .category-header { padding: 7rem 1rem 2rem; }
}

/* Blog nav active state */
.nav-desktop .blog-nav-active { color: var(--primary) !important; font-weight: 600 !important; }