.page-blog {
  color: #333333;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.page-blog__hero-section {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-blog__hero-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-blog__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: #ffffff;
}

.page-blog__hero-title {
  font-size: 2.8em;
  margin-bottom: 15px;
  color: #ffc107;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-blog__hero-description {
  font-size: 1.2em;
  max-width: 800px;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__hero-cta-button {
  display: inline-block;
  background-color: #007bff;
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
}

.page-blog__hero-cta-button:hover {
  background-color: #0056b3;
}

.page-blog__section-title {
  font-size: 2.2em;
  color: #007bff;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.page-blog__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: #ffc107;
  margin: 10px auto 0;
}

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

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

.page-blog__article-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

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

.page-blog__article-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  min-height: 70px;
}

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

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

.page-blog__article-excerpt {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 20px;
}

.page-blog__read-more-button {
  display: inline-block;
  background-color: #ffc107;
  color: #333333;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9em;
  transition: background-color 0.3s ease;
}

.page-blog__read-more-button:hover {
  background-color: #e0a800;
}

.page-blog__cta-section {
  background-color: #007bff;
  color: #ffffff;
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-content {
  max-width: 800px;
}

.page-blog__cta-title {
  font-size: 2.5em;
  margin-bottom: 15px;
  color: #ffc107;
}

.page-blog__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
}

.page-blog__cta-button {
  display: inline-block;
  background-color: #ffc107;
  color: #333333;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-blog__cta-button:hover {
  background-color: #e0a800;
  transform: scale(1.05);
}

.page-blog__cta-image {
  width: 500px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__sidebar {
  max-width: 300px;
  padding: 20px;
  margin: 0 auto;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-blog__sidebar-widget {
  margin-bottom: 30px;
}

.page-blog__widget-title {
  font-size: 1.8em;
  color: #007bff;
  margin-bottom: 15px;
  border-bottom: 2px solid #ffc107;
  padding-bottom: 5px;
}

.page-blog__category-list,
.page-blog__popular-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-blog__category-list li,
.page-blog__popular-posts-list li {
  margin-bottom: 10px;
}

.page-blog__category-list a,
.page-blog__popular-posts-list a {
  color: #333333;
  text-decoration: none;
  font-size: 1.1em;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.page-blog__category-list a:hover,
.page-blog__popular-posts-list a:hover {
  color: #007bff;
  text-decoration: underline;
}

.page-blog__floating-btn {
  position: fixed;
  right: 20px;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  z-index: 1000;
}

.page-blog__floating-btn--register {
  bottom: 100px;
  background-color: #ffc107;
  color: #333333;
}

.page-blog__floating-btn--register:hover {
  background-color: #e0a800;
  transform: scale(1.05);
}

.page-blog__floating-btn--login {
  bottom: 40px;
  background-color: #007bff;
  color: #ffffff;
}

.page-blog__floating-btn--login:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* Desktop layout */
@media (min-width: 992px) {
  .page-blog {
    grid-template-columns: 2fr 1fr; /* Main content and sidebar */
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
  }

  .page-blog__latest-articles {
    grid-column: 1 / 2;
    padding: 0;
  }

  .page-blog__cta-section {
    grid-column: 1 / 2;
    flex-direction: row;
    justify-content: space-around;
    padding: 40px;
    text-align: left;
  }

  .page-blog__cta-content {
    text-align: left;
    max-width: 50%;
  }

  .page-blog__sidebar {
    grid-column: 2 / 3;
    margin: 0;
    padding: 0 0 0 30px;
  }

  .page-blog__hero-section {
    grid-column: 1 / -1;
    height: 600px;
  }

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

  .page-blog__hero-description {
    font-size: 1.4em;
  }
}

/* Tablet layout */
@media (max-width: 991px) and (min-width: 769px) {
  .page-blog {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .page-blog__hero-section {
    height: 500px;
  }

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

  .page-blog__hero-description {
    font-size: 1.1em;
  }

  .page-blog__cta-section {
    flex-direction: column;
    padding: 40px 20px;
  }

  .page-blog__cta-content {
    max-width: 100%;
  }

  .page-blog__cta-image {
    width: 80%;
    max-width: 600px;
  }

  .page-blog__sidebar {
    max-width: 100%;
    margin-top: 40px;
  }
}

/* Mobile layout */
@media (max-width: 768px) {
  .page-blog {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .page-blog__hero-section {
    height: 350px;
  }

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

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

  .page-blog__hero-cta-button {
    padding: 12px 25px;
    font-size: 1em;
  }

  .page-blog__section-title {
    font-size: 1.8em;
  }

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

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

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

  .page-blog__cta-section {
    flex-direction: column;
    padding: 30px 15px;
  }

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

  .page-blog__cta-description {
    font-size: 0.95em;
  }

  .page-blog__cta-button {
    padding: 12px 25px;
    font-size: 1em;
  }

  .page-blog__cta-image {
    width: 95%;
    max-width: 400px;
  }

  .page-blog__sidebar {
    margin-top: 30px;
  }

  .page-blog__widget-title {
    font-size: 1.5em;
  }

  .page-blog__category-list a,
  .page-blog__popular-posts-list a {
    font-size: 1em;
  }

  /* Ensure content images do not overflow */
  .page-blog img {
    max-width: 100%;
    height: auto;
  }

  /* Override any potentially smaller image sizes if applied */
  .page-blog__article-image,
  .page-blog__cta-image {
    min-width: 200px; /* Minimum size enforced */
    min-height: 200px;
  }

  .page-blog__floating-btn {
    padding: 10px 20px;
    font-size: 1em;
  }
}

/* Ensure all content images meet minimum size requirements */
.page-blog img {
  min-width: 200px;
  min-height: 200px;
  /* Other styles like max-width: 100%; height: auto; will ensure responsiveness */
}

/* Specific overrides for images that might be smaller by default */
.page-blog__article-image {
  width: 100%; /* Occupy full card width */
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
}

.page-blog__cta-image {
  width: 500px;
  height: 281px;
  object-fit: cover;
}

/* Ensure CSS width/height matches HTML attributes or uses responsive sizing */
.page-blog__hero-image {
  width: 1200px; /* HTML width attribute */
  height: 675px; /* HTML height attribute */
  max-width: 100%;
  height: auto;
}
.page-blog__article-image {
  width: 400px;
  height: 225px;
  max-width: 100%;
  height: auto;
}
.page-blog__cta-image {
  width: 500px;
  height: 281px;
  max-width: 100%;
  height: auto;
}