/* Blogs Grid Page Styles */
.bg-main {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Hero Section - Same as single post */
.bg-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--dark) 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.bg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 40%, rgba(33, 176, 243, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 60%, rgba(27, 74, 128, 0.3) 0%, transparent 55%);
  pointer-events: none;
}

.bg-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
  text-align: center;
}

.bg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(33, 176, 243, 0.14);
  border: 1px solid rgba(33, 176, 243, 0.35);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 22px;
}

.bg-kicker-dot {
  width: 6px;
  height: 6px;
  background: var(--sky);
  border-radius: 50%;
}

.bg-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: 2px;
  line-height: 1.1;
  margin: 0 0 16px;
  color: #fff;
}

.bg-sub {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
  margin: 0 auto;
  font-weight: 300;
}

/* Section */
.bg-section {
  padding: 60px 0 80px;
}

.bg-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Grid */
.bg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
}

/* Card */
.bg-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--sh);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bg-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-h);
}

/* Card Image - Fixed height for consistency */
.bg-card-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  position: relative;
  background: var(--bg);
}

.bg-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bg-card:hover .bg-card-img {
  transform: scale(1.05);
}

.bg-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--dark) 100%);
  color: var(--sky);
}

/* Card Content */
.bg-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.bg-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.bg-card-date,
.bg-card-author {
  font-weight: 500;
}

.bg-card-separator {
  color: var(--sky);
  font-weight: 700;
}

.bg-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--dark);
  margin: 0 0 12px;
  line-height: 1.3;
  min-height: 58px; /* Fixed height for 2 lines */
  display: flex;
  align-items: center;
}

.bg-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.bg-card-title a:hover {
  color: var(--sky);
}

.bg-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 20px;
  flex: 1;
  min-height: 67px; /* Fixed height for ~3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bg-card-link {
  color: var(--sky);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bg-card-link:hover {
  color: var(--navy);
  transform: translateX(5px);
}

.bg-card-link::after {
  content: '→';
  transition: transform 0.3s ease;
}

.bg-card-link:hover::after {
  transform: translateX(3px);
}

/* Pagination */
.bg-pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
}

.bg-pagination ul {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.bg-pagination li {
  display: inline-block;
}

.bg-pagination a,
.bg-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.bg-pagination a:hover {
  background: var(--sky);
  color: #fff;
  border-color: var(--sky);
  transform: translateY(-2px);
}

.bg-pagination .current {
  background: var(--sky);
  color: #fff;
  border-color: var(--sky);
}

.bg-pagination .prev,
.bg-pagination .next {
  padding: 0 16px;
}

/* No Posts */
.bg-no-posts {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

.bg-no-posts svg {
  margin-bottom: 24px;
  opacity: 0.5;
}

.bg-no-posts h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 1px;
  color: var(--dark);
  margin: 0 0 12px;
}

.bg-no-posts p {
  font-size: 16px;
  margin: 0;
}

/* Responsive */
@media (max-width: 968px) {
  .bg-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
  }

  .bg-card-image {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .bg-hero {
    padding: 60px 0 40px;
  }

  .bg-section {
    padding: 40px 0 60px;
  }

  .bg-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .bg-card-image {
    height: 240px;
  }

  .bg-card-title {
    min-height: auto;
  }

  .bg-card-excerpt {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .bg-hero {
    padding: 40px 0 30px;
  }

  .bg-title {
    font-size: 32px;
  }

  .bg-sub {
    font-size: 15px;
  }

  .bg-card-image {
    height: 200px;
  }

  .bg-card-content {
    padding: 20px;
  }

  .bg-card-title {
    font-size: 20px;
  }
}