.page-blog {
  color: #333333; /* Dark text for light background */
  background-color: #FFFFFF;
}

.page-blog__hero-section {
  padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px; /* Minimum height for hero section */
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-blog__hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: inherit;
}

.page-blog__hero-content {
  background: rgba(0, 0, 0, 0.7); /* Semi-transparent black overlay for text readability */
  padding: 30px;
  border-radius: 10px;
  color: #FFFFFF; /* Light text on dark overlay */
  max-width: 800px;
}

.page-blog__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: #FFFFFF;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  line-height: 1.6;
}

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

.page-blog__button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.page-blog__button--register {
  background-color: #FFFFFF; /* Register button background */
  color: #000000; /* Dark text for white button */
}

.page-blog__button--register:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.page-blog__button--login {
  background-color: #FCBC45; /* Login button background */
  color: #000000; /* Dark text for yellow button */
}

.page-blog__button--login:hover {
  background-color: #e0a53b;
  transform: translateY(-2px);
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: #000000;
  text-align: center;
  margin-bottom: 50px;
  padding-top: 60px;
}

.page-blog__latest-articles {
  padding: 60px 0;
  background-color: #f9f9f9;
}

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

.page-blog__article-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-blog__article-title {
  font-size: 1.5em;
  color: #000000;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__article-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #FCBC45;
}

.page-blog__article-excerpt {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: #FCBC45;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #e0a53b;
}

.page-blog__categories-section {
  padding: 60px 0;
}

.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 20px;
  text-decoration: none;
  color: #000000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.page-blog__category-image {
  width: 100%;
  height: 180px; /* Consistent height for category images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page-blog__category-name {
  font-size: 1.2em;
  font-weight: bold;
}

.page-blog__cta-section {
  background-color: #000000; /* Primary brand color for CTA background */
  padding: 80px 0;
  text-align: center;
}

.page-blog__cta-container {
  color: #FFFFFF; /* Light text on dark background */
}

.page-blog__cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #FFFFFF;
  line-height: 1.2;
}

.page-blog__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.page-blog__button--primary {
  background-color: #FCBC45; /* Yellow button for primary CTA */
  color: #000000;
  padding: 18px 40px;
  font-size: 1.2em;
}

.page-blog__button--primary:hover {
  background-color: #e0a53b;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 2.8em;
  }

  .page-blog__section-title,
  .page-blog__cta-title {
    font-size: 2em;
  }

  .page-blog__article-image,
  .page-blog__category-image {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    min-height: 400px;
  }

  .page-blog__hero-title {
    font-size: 2.2em;
  }

  .page-blog__hero-description,
  .page-blog__cta-description {
    font-size: 1em;
  }

  .page-blog__hero-actions {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__button {
    width: 80%;
    max-width: 300px;
    padding: 12px 25px;
    font-size: 1em;
  }

  .page-blog__section-title,
  .page-blog__cta-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-blog__articles-grid,
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__article-image,
  .page-blog__category-image {
    height: 250px;
    max-width: 100%; /* Important for mobile overflow */
  }

  .page-blog__article-card img,
  .page-blog__category-card img {
    max-width: 100%;
    height: auto;
  }

  .page-blog__cta-section {
    padding: 60px 20px;
  }

  .page-blog__button--primary {
    width: 80%;
    max-width: 300px;
  }

  /* Ensure all images within .page-blog are responsive and don't overflow */
  .page-blog img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: 1.8em;
  }

  .page-blog__hero-content {
    padding: 20px;
  }

  .page-blog__section-title,
  .page-blog__cta-title {
    font-size: 1.5em;
  }

  .page-blog__article-title {
    font-size: 1.3em;
  }
}