.page-blog {
  font-family: Arial, sans-serif;
  color: var(--text-main, #1F2D3D);
  background-color: var(--background, #F4F7FB);
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  background-color: #0a0909; /* Deep dark background */
  color: #fff;
  text-align: center;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 40px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

.page-blog__hero-content {
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 20px;
  /* clamp for responsive font size without fixed large values */
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.page-blog__hero-description {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.page-blog__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-blog__btn {
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.page-blog__btn--primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #fff;
}

.page-blog__btn--primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn--secondary {
  background-color: transparent;
  border: 2px solid var(--auxiliary-color, #6FA3FF);
  color: var(--auxiliary-color, #6FA3FF);
}

.page-blog__btn--secondary:hover {
  background-color: var(--auxiliary-color, #6FA3FF);
  color: #fff;
  transform: translateY(-2px);
}

/* Posts Section */
.page-blog__posts-section {
  padding: 80px 0;
  background-color: var(--background, #F4F7FB);
}

.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: bold;
  color: var(--text-main, #1F2D3D);
  text-align: center;
  margin-bottom: 15px;
}

.page-blog__section-subtitle {
  font-size: 1.1rem;
  color: #555;
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__post-card {
  background-color: var(--card-b-g, #FFFFFF);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.page-blog__post-image-wrapper {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-blog__post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-image {
  transform: scale(1.05);
}

.page-blog__post-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__post-title {
  font-size: 1.4rem;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 10px;
}

.page-blog__post-title a {
  color: var(--text-main, #1F2D3D);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: var(--primary-color, #2F6BFF);
}

.page-blog__post-meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  color: var(--primary-color, #2F6BFF);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  align-self: flex-start;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  text-decoration: underline;
  color: #0040E0;
}

.page-blog__view-all-wrapper {
  text-align: center;
  margin-top: 60px;
}

.page-blog__btn--view-all {
  background-color: var(--primary-color, #2F6BFF);
  color: #fff;
  padding: 15px 35px;
  border-radius: 8px;
  font-weight: bold;
}

.page-blog__btn--view-all:hover {
  background-color: #2659D9;
  transform: translateY(-2px);
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-blog__cta-section--alt-bg {
  background-color: var(--primary-color, #2F6BFF);
  color: #fff;
}

.page-blog__cta-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: bold;
  margin-bottom: 20px;
  color: #fff;
}

.page-blog__cta-description {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-blog__cta-buttons .page-blog__btn--primary {
  background: #fff; /* Invert for CTA section */
  color: var(--primary-color, #2F6BFF);
}

.page-blog__cta-buttons .page-blog__btn--primary:hover {
  background-color: #f0f0f0;
}

.page-blog__cta-buttons .page-blog__btn--secondary {
  border-color: #fff;
  color: #fff;
}

.page-blog__cta-buttons .page-blog__btn--secondary:hover {
  background-color: #fff;
  color: var(--primary-color, #2F6BFF);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
  }
  .page-blog__hero-image-wrapper {
    margin-bottom: 30px;
  }
  .page-blog__main-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .page-blog__hero-description {
    font-size: 1rem;
  }
  .page-blog__posts-section {
    padding: 60px 0;
  }
  .page-blog__section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
  .page-blog__section-subtitle {
    font-size: 1rem;
    margin-bottom: 40px;
  }
  .page-blog__cta-section {
    padding: 60px 0;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 30px;
  }
  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }
  .page-blog__hero-buttons,
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__btn {
    width: 100%;
    max-width: 300px;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__post-image-wrapper {
    height: 180px;
  }
  .page-blog__post-image {
    max-width: 100%; /* Ensure images don't overflow */
    height: auto; /* Maintain aspect ratio */
  }
  .page-blog__post-title {
    font-size: 1.2rem;
  }
  .page-blog__post-excerpt {
    font-size: 0.95rem;
  }
  .page-blog__posts-section {
    padding: 40px 0;
  }
  .page-blog__cta-section {
    padding: 40px 0;
  }
  /* Enforce minimum image size for content area images */
  .page-blog__hero-image,
  .page-blog__post-image {
    min-width: 200px;
    min-height: 200px;
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-content {
    padding: 0 15px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  .page-blog__hero-description {
    font-size: 0.9rem;
  }
  .page-blog__section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }
  .page-blog__section-subtitle {
    font-size: 0.9rem;
  }
  .page-blog__cta-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  .page-blog__cta-description {
    font-size: 0.9rem;
  }
}