/* =========================================================
   BLOG PAGE
   ========================================================= */

.blog-section {
  padding: 72px 0 96px;
  background: var(--blog-bg, #F7FAFC);
}

.blog-section__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
.blog-main { min-width: 0; }

/* ---------- Featured Post ---------- */
.post-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 40px;
  box-shadow: 0 4px 16px rgba(21, 43, 69, 0.04);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.post-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(21, 43, 69, 0.08);
}

.post-featured__media {
  position: relative;
  height: 100%;
  min-height: 320px;
  background: var(--blue-tint);
  overflow: hidden;
}
.post-featured__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.post-featured:hover .post-featured__media img {
  transform: scale(1.04);
}

.post-featured__body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-featured__title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
  margin: 12px 0 16px;
  transition: color 0.2s;
}
.post-featured:hover .post-featured__title { color: var(--blue-dark); }

.post-featured__desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--gray);
  margin: 0 0 24px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray);
}
.post-author__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ---------- Post Grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.post-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(21, 43, 69, 0.08);
}

.post-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--blue-tint);
  overflow: hidden;
}
.post-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.post-card:hover .post-card__media img { transform: scale(1.05); }

.post-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin: 10px 0 8px;
  transition: color 0.2s;
}
.post-card:hover .post-card__title { color: var(--blue-dark); }

.post-card__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--gray);
  margin: 0;
  flex: 1;
}

/* Meta */
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 600;
}
.post-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--orange);
  color: #fff;
  border-radius: 20px;
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.post-date {
  color: var(--gray-light);
}

.post-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 32px;
  color: var(--blue);
  opacity: 0.4;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.blog-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* Search */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #F7FAFC;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(21, 159, 218, 0.15);
}
.search-box svg {
  width: 16px; height: 16px;
  color: var(--gray-light);
  flex-shrink: 0;
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  width: 100%;
}

/* Categories */
.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.category-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}
.category-btn:hover { background: #F7FAFC; color: var(--navy); }
.category-btn.is-active {
  background: var(--blue-tint);
  color: var(--blue-dark);
  font-weight: 700;
}
.category-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-light);
  background: #F7FAFC;
  padding: 2px 8px;
  border-radius: 12px;
}
.category-btn.is-active .category-count {
  background: #fff;
  color: var(--blue-dark);
}

/* Empty State */
.post-empty {
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--gray);
  font-size: 14.5px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .blog-layout { grid-template-columns: 1fr; gap: 40px; }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured__media { min-height: 260px; }
  .blog-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (max-width: 640px) {
  .blog-sidebar { grid-template-columns: 1fr; }
  .post-featured__body { padding: 24px 20px; }
  .post-featured__title { font-size: 20px; }
  .post-grid { grid-template-columns: 1fr; gap: 16px; }
  .post-card { flex-direction: row; height: 120px; }
  .post-card__media { width: 120px; aspect-ratio: auto; height: 100%; flex-shrink: 0; }
  .post-card__body { padding: 14px 16px; justify-content: center; }
  .post-card__title { font-size: 15px; margin-top: 6px; }
  .post-card__desc { display: none; /* Hide excerpt on mobile row layout */ }
}