/* ===========================================================
   BLOG PAGE
   =========================================================== */

/* ===== PAGE HEADER ===== */
.blog-page-header {
  background: white;
  border-bottom: 1px solid #ebebeb;
  padding: 5.5rem 0 1.8rem;
}

.blog-page-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.blog-page-header__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.blog-page-header__tag i {
  font-size: 0.7rem;
}

.blog-page-header__left h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
  color: #0f0f1a;
  letter-spacing: -0.6px;
  line-height: 1.1;
}

.blog-page-header__left h1 span {
  color: var(--primary-color);
}

/* ── Search Form ── */
.blog-search-form {
  flex-shrink: 0;
  width: 340px;
  max-width: 100%;
}

.blog-search-inner {
  display: flex;
  align-items: center;
  background: #f4f5f8;
  border: 1.5px solid #e8e8e8;
  border-radius: 50px;
  padding: 0.45rem 0.45rem 0.45rem 1.2rem;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.blog-search-inner:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(190, 16, 3, 0.08);
}

.blog-search-inner > i {
  color: #bbb;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-right: 0.65rem;
}

.blog-search-inner input[type="text"] {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #0f0f1a;
  font-size: 0.9rem;
  min-width: 0;
}

.blog-search-inner input::placeholder {
  color: #bbb;
}

.blog-search-btn {
  flex-shrink: 0;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.55rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.blog-search-btn:hover {
  background: #a00d02;
  transform: translateY(-1px);
}

/* ===== FILTERS BAR ===== */
.blog-filters-bar {
  position: sticky;
  top: 70px;
  z-index: 100;
  background: white;
  border-bottom: 1px solid #eee;
  padding: 0.75rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.blog-filters-scroll {
  display: flex;
  gap: 0.6rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.blog-filters-scroll::-webkit-scrollbar {
  display: none;
}

.blog-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  border: 1.5px solid #e0e0e0;
  background: white;
  color: #555;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.22s ease;
}

.blog-filter-pill:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.blog-filter-pill.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.blog-filter-count {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  padding: 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.6;
  min-width: 18px;
  text-align: center;
}

.blog-filter-pill.active .blog-filter-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ===== POSTS SECTION ===== */
.blog-posts-section {
  padding: 4rem 0 7rem;
  background: #f5f6fa;
  min-height: 60vh;
}

.blog-results-info {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 2rem;
}

.blog-results-info strong {
  color: #0f0f1a;
}

/* ── Featured Card ── */
.blog-featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  border-radius: 22px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.09);
  margin-bottom: 3.5rem;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.blog-featured-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.13);
}

.blog-featured-card__img {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 400px;
}

.blog-featured-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-featured-card:hover .blog-featured-card__img img {
  transform: scale(1.04);
}

.blog-featured-card__body {
  padding: 3rem 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-featured-card__body h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 900;
  color: #0f0f1a;
  line-height: 1.22;
  margin-bottom: 1rem;
  letter-spacing: -0.4px;
}

.blog-featured-card__body h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-featured-card__body h2 a:hover {
  color: var(--primary-color);
}

.blog-featured-card__body > p {
  font-size: 0.95rem;
  line-height: 1.85;
  color: #777;
  margin-bottom: 2rem;
}

.blog-featured-card__body .btn-primary-solid {
  color: #fff;
}

.blog-featured-card__body .btn-primary-solid:hover,
.blog-featured-card__body .btn-primary-solid:focus-visible {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* ── Card Badge ── */
.blog-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 2rem;
  z-index: 2;
}

.blog-card__badge--featured {
  top: 1rem;
  left: auto;
  right: 1rem;
  background: rgba(15, 15, 26, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ── Card Meta ── */
.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 0.9rem;
}

.blog-card__meta i {
  margin-right: 0.3rem;
  color: var(--primary-color);
}

/* ── Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

/* ── Grid Card ── */
.blog-card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.11);
}

.blog-card__img-wrap {
  display: block;
  position: relative;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.blog-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__img-wrap img {
  transform: scale(1.06);
}

.blog-card__body {
  padding: 1.6rem 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__body h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f0f1a;
  line-height: 1.35;
  margin-bottom: 0.65rem;
  letter-spacing: -0.2px;
}

.blog-card__body h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card__body h3 a:hover {
  color: var(--primary-color);
}

.blog-card__body > p {
  font-size: 0.88rem;
  line-height: 1.78;
  color: #888;
  margin-bottom: 1.4rem;
  flex: 1;
  /* Truncate to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: gap 0.25s ease;
  margin-top: auto;
}

.blog-read-more:hover {
  gap: 0.9rem;
}

/* ===== PAGINATION ===== */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.blog-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  background: white;
  color: #444;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.22s ease;
  padding: 0 0.6rem;
}

.blog-page-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.blog-page-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  font-weight: 800;
}

.blog-page-btn--arrow {
  font-size: 0.8rem;
  border-radius: 50%;
}

.blog-page-ellipsis {
  color: #aaa;
  font-size: 1rem;
  padding: 0 0.2rem;
  display: flex;
  align-items: center;
  height: 44px;
}

/* ===== EMPTY STATE ===== */
.blog-empty {
  text-align: center;
  padding: 6rem 2rem;
  max-width: 440px;
  margin: 0 auto;
}

.blog-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: rgba(190, 16, 3, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary-color);
  margin: 0 auto 1.8rem;
}

.blog-empty h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f0f1a;
  margin-bottom: 0.75rem;
}

.blog-empty p {
  font-size: 0.95rem;
  color: #888;
  line-height: 1.75;
  margin-bottom: 2rem;
}

/* ===== SINGLE ARTICLE ===== */
.single-article-page {
  background: #f5f6fa;
}

.single-article-head {
  background: white;
  border-bottom: 1px solid #ececf1;
  padding: 5.2rem 0 2.5rem;
}

.single-article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 1.2rem;
}

.single-article-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.single-article-cats span {
  background: rgba(190, 16, 3, 0.08);
  color: var(--primary-color);
  border: 1px solid rgba(190, 16, 3, 0.2);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.single-article-head h1 {
  max-width: 900px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
  color: #0f0f1a;
  font-weight: 900;
  letter-spacing: -0.7px;
  margin-bottom: 1rem;
}

.single-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #888;
}

.single-article-meta i {
  color: var(--primary-color);
  margin-right: 0.3rem;
}

.single-article-content-wrap {
  padding: 2rem 0 4.5rem;
}

.single-article-card {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 18px;
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.single-article-cover img {
  width: 100%;
  height: clamp(260px, 40vw, 460px);
  object-fit: cover;
  display: block;
}

.single-article-content {
  padding: clamp(1.3rem, 2.5vw, 2.2rem);
  color: #2a2a2a;
  font-size: 1rem;
  line-height: 1.9;
}

.single-article-content > * + * {
  margin-top: 1rem;
}

.single-article-content h2,
.single-article-content h3,
.single-article-content h4 {
  color: #0f0f1a;
  line-height: 1.35;
  margin-top: 1.8rem;
}

.single-article-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.single-article-content ul,
.single-article-content ol {
  margin-left: 1.2rem;
}

.single-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.single-related {
  padding: 0 0 5rem;
}

.single-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.single-related-head h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  color: #0f0f1a;
  font-weight: 900;
}

.single-related-head a {
  color: var(--primary-color);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .blog-page-header {
    padding-top: 5rem;
  }

  .blog-page-header__inner {
    align-items: flex-start;
    gap: 1.4rem;
  }

  .blog-search-form {
    width: 100%;
  }

  .blog-featured-card {
    grid-template-columns: 1fr;
  }

  .blog-featured-card__img {
    min-height: 280px;
  }

  .blog-featured-card__body {
    padding: 2rem;
  }
}

@media (max-width: 640px) {
  .blog-page-header {
    padding: 4.4rem 0 1.2rem;
  }

  .single-article-head {
    padding: 4.5rem 0 1.8rem;
  }

  .single-related-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-page-header__left h1 {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .blog-filters-bar {
    top: 60px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-search-btn {
    padding: 0.55rem 0.95rem;
    font-size: 0.8rem;
  }

  .blog-posts-section {
    padding: 3.5rem 0 5rem;
  }
}
