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

/* ==========================================================================
   Hero
   ========================================================================== */

.bl-hero {
  background-color: var(--hp-navy, #1f2f3f);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 200px 0 80px;
  min-height: 400px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.bl-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(31, 47, 63, 0.65);
}

.bl-hero .hp-container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.bl-hero__title {
  color: var(--hp-white, #fff);
  font-size: 50px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 auto;
  max-width: 700px;
}

/* ==========================================================================
   Blog Posts Section
   ========================================================================== */

.bl-posts {
  background: var(--hp-white, #fff);
  padding: var(--hp-section-py, 80px) 0;
}

/* ==========================================================================
   Posts Grid
   ========================================================================== */

.bl-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.bl-posts__empty {
  text-align: center;
  color: #666;
  font-size: 18px;
  padding: 60px 0;
}

/* ==========================================================================
   Blog Card
   ========================================================================== */

.bl-card,
.bl-card:hover,
.bl-card:focus {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--hp-radius-card, 8px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.bl-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--hp-red, #cd2c2a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.bl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(31, 47, 63, 0.12);
}

.bl-card:hover::after {
  transform: scaleX(1);
}

/* Card Image */

.bl-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f0f0f0;
}

.bl-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.bl-card:hover .bl-card__image img {
  transform: scale(1.05);
}

.bl-card__placeholder {
  width: 100%;
  height: 100%;
  background: var(--hp-navy, #1f2f3f);
  opacity: 0.1;
}

/* Card Body */

.bl-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.bl-card__date {
  font-size: 13px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.bl-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--hp-navy, #1f2f3f);
  line-height: 1.3;
  margin: 0 0 12px;
}

.bl-card__excerpt {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

.bl-card__more {
  font-size: 15px;
  font-weight: 600;
  color: var(--hp-red, #cd2c2a);
  transition: letter-spacing 0.2s ease;
}

.bl-card:hover .bl-card__more {
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.bl-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.bl-pagination a,
.bl-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--hp-radius-card, 8px);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.bl-pagination a {
  color: var(--hp-navy, #1f2f3f);
  border: 1px solid #e0e0e0;
}

.bl-pagination a:hover {
  background: var(--hp-red, #cd2c2a);
  color: #fff;
  border-color: var(--hp-red, #cd2c2a);
}

.bl-pagination .current {
  background: var(--hp-red, #cd2c2a);
  color: #fff;
  border: 1px solid var(--hp-red, #cd2c2a);
}

.bl-pagination .dots {
  border: none;
  color: #999;
}

/* ==========================================================================
   RESPONSIVE — Tablet (992px)
   ========================================================================== */

@media (max-width: 992px) {
  .bl-hero__title {
    font-size: 36px;
  }

  .bl-posts__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .bl-card__title {
    font-size: 18px;
  }

  .bl-card__excerpt {
    font-size: 14px;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ==========================================================================
   RESPONSIVE — Mobile (768px)
   ========================================================================== */

@media (max-width: 768px) {
  .bl-hero {
    padding: 140px 0 52px;
    min-height: auto;
  }

  .bl-hero__title {
    font-size: 30px;
  }

  .bl-posts {
    padding: 48px 0;
  }

  .bl-posts__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Horizontal card layout on mobile */
  .bl-card {
    flex-direction: row;
    align-items: stretch;
  }

  .bl-card__image {
    width: 140px;
    min-width: 140px;
    aspect-ratio: auto;
  }

  .bl-card__body {
    padding: 16px;
  }

  .bl-card__date {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .bl-card__title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .bl-card__excerpt {
    font-size: 13px;
    margin-bottom: 8px;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .bl-card__more {
    font-size: 13px;
  }

  .bl-pagination {
    margin-top: 40px;
    gap: 6px;
  }

  .bl-pagination a,
  .bl-pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    font-size: 14px;
  }
}

/* ==========================================================================
   RESPONSIVE — Small Mobile (576px)
   ========================================================================== */

@media (max-width: 576px) {
  .bl-hero {
    padding: 120px 0 40px;
  }

  .bl-hero__title {
    font-size: 26px;
  }

  .bl-posts {
    padding: 32px 0;
  }

  .bl-card__image {
    width: 110px;
    min-width: 110px;
  }

  .bl-card__body {
    padding: 12px;
  }

  .bl-card__title {
    font-size: 15px;
  }

  .bl-card__excerpt {
    display: none;
  }

  .bl-pagination a,
  .bl-pagination span {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }
}
