* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, sans-serif;
}


body {
  background-color: #fff;
  color: #1f2937;
}


/* ===================== */
/* MAIN PAGE */
/* ===================== */

.page {
  max-width: 1400px;
  margin: auto;
  padding: 64px 32px 96px;
}

.page-title {
  text-align: center;
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 48px;
}

/* FEATURED CARDS — CENTER ALIGNED */
#blogs .featured-grid {
  display: grid;

  /* fixed-width cards like Meter */
  grid-template-columns: repeat(auto-fit, 260px);

  gap: 28px;

  /* THIS centers the cards */
  justify-content: center;

  margin: 0 auto 56px;
}


#blogs .featured-card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
  width: 260px;
}

.featured-card h3 {
  font-size: 17px;
  margin-bottom: 12px;
}

.featured-card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.7;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-top: 16px;
}

.read {
  color: #2563eb;
  text-decoration: none;
}

/* CATEGORY BAR */
.category-bar {
  display: flex;
  gap: 20px;
  justify-content: center;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 14px;
  margin-bottom: 40px;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #eef0f4; /* same as page background */
  padding-top: 12px;
  margin-top: -12px;
}

.category {
  cursor: pointer;
  color: #6b7280;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.category.active {
  color: #1e40af; /* darker blue */
  background: rgba(30, 64, 175, 0.12);
  font-weight: 500;
}


.category b {
  margin-left: 4px;
  font-weight: 500;
}


/* BLOG LIST */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: auto;
}

.blog-row {
  display: grid;
  grid-template-columns: 120px 1fr 180px;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e5e7eb;
}

.blog-date {
  font-size: 14px;
  color: #6b7280;
}

.blog-row h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.blog-row p {
  font-size: 14px;
  color: #6b7280;
}

.blog-meta {
  text-align: right;
  font-size: 14px;
}

/* ===================== */
/* DETAIL PAGE */
/* ===================== */

.detail-page {
  max-width: 900px;
  margin: auto;
  padding: 48px 24px 96px;
}

.back-link {
  color: #2563eb;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 32px;
}

.detail-title {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 12px;
}

.detail-date {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
}

.author-row {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.author {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.author-name {
  font-size: 14px;
  font-weight: 500;
}

.author-role {
  font-size: 12px;
  color: #6b7280;
}

/* CONTENT CARD */
.detail-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.detail-card p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 18px;
}

/* MOBILE */
@media (max-width: 900px) {
  .featured-grid {
    grid-template-columns: repeat(2, 260px);
    justify-content: center;
  }

  .blog-row {
    grid-template-columns: 1fr;
  }

  .blog-meta {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    width: 100%;
  }
}


/*hover and click*/
.blog-title-link {
  color: #111;            
  text-decoration: none; 
}

.blog-title-link:hover {
  color: #2563eb;        
  cursor: pointer;
}

.author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-size: 14px;
  font-weight: 600;
}

.author-role {
  font-size: 13px;
  color: #6b7280;
}


.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination button {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  color: #374151;
}

.pagination button.active {
  background: #e3e6f8;
  color: #3747d4;
  font-weight: 600;
}

.pagination button:hover {
  background: #f3f4f6;
}



/* ===================== */
/* BLOG DETAIL SCROLL INDICATOR */
/* ===================== */

.detail-page .scroll-track {
  position: fixed;
  left: 24px;
  top: 160px;
  width: 1.5px;
  height: 40vh;
  background: #d1d5db;
  border-radius: 2px;
  z-index: 10;
  opacity: 0.7;
}

.detail-page .scroll-progress {
  width: 100%;
  height: 0%;
  background: #ffffff;
  border-radius: 2px;
  transition: height 0.12s linear;
}

/* Hide on small screens */
@media (max-width: 900px) {
  .detail-page .scroll-track {
    display: none;
  }
}

.page {
  padding-bottom: 32px;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.card-footer .read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* REMOVE GREY BACKGROUND BEHIND BLOG FILTERS */
.page-section {
  background-color: #ffffff !important;
}

#blogs .category-bar {
  background-color: #ffffff !important;
}
