.page-blog {
  color: #ffffff; /* Light text for dark body background */
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

.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;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  background-color: #1A202C; /* Main dark color for section background */
  position: relative;
  overflow: hidden;
}

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

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.page-blog__hero-title {
  font-size: 3.5em;
  color: #FFD700; /* Accent gold for main title */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-description {
  font-size: 1.3em;
  color: #f0f0f0;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

/* General Buttons */
.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;
  white-space: nowrap;
}

.page-blog__button--primary {
  background-color: #FFD700; /* Accent gold */
  color: #1A202C; /* Dark text for contrast */
  border: 2px solid #FFD700;
}

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

.page-blog__button--secondary {
  background-color: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.page-blog__button--secondary:hover {
  background-color: rgba(255, 215, 0, 0.1);
  transform: translateY(-2px);
}

.page-blog__button--small {
  padding: 10px 20px;
  font-size: 0.9em;
  border-radius: 5px;
}

.page-blog__button--read-more {
  background-color: #1A202C;
  color: #FFD700;
  border: 1px solid #FFD700;
  padding: 10px 20px;
  font-size: 0.95em;
  border-radius: 5px;
}

.page-blog__button--read-more:hover {
  background-color: #FFD700;
  color: #1A202C;
}

/* Section Titles */
.page-blog__section-title {
  font-size: 2.5em;
  color: #FFD700;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 10px;
}

.page-blog__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #FFD700;
  border-radius: 2px;
}

.page-blog__section-text {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

/* Introduction Section */
.page-blog__introduction-section {
  padding: 60px 0;
  background-color: #0d121c; /* Body background color */
}

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: #1A202C;
}

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

.page-blog__category-card {
  background-color: rgba(26, 32, 44, 0.8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__category-image {
  width: 100%;
  height: 200px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  margin-bottom: 15px;
}

.page-blog__category-title {
  font-size: 1.5em;
  color: #FFD700;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-blog__category-title a {
  color: #FFD700;
  text-decoration: none;
}

.page-blog__category-title a:hover {
  text-decoration: underline;
}

.page-blog__category-description {
  font-size: 0.95em;
  color: #cccccc;
  line-height: 1.6;
  padding: 0 15px;
  flex-grow: 1;
  margin-bottom: 20px;
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #0d121c;
}

.page-blog__posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.page-blog__post-card {
  background-color: rgba(26, 32, 44, 0.8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: row;
  align-items: center;
}

.page-blog__post-image {
  width: 40%;
  height: auto;
  object-fit: cover;
  min-width: 250px; /* Ensure images are not too small */
}

.page-blog__post-content {
  padding: 30px;
  width: 60%;
}

.page-blog__post-title {
  font-size: 1.8em;
  color: #FFD700;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__post-title a {
  color: #FFD700;
  text-decoration: none;
}

.page-blog__post-title a:hover {
  text-decoration: underline;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: #e0e0e0;
  line-height: 1.7;
  margin-bottom: 25px;
  display: -webkit-box;
  -webkit-line-clamp: 6; /* Limit excerpt to 6 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 20px;
  text-align: center;
  background-color: #1A202C;
}

.page-blog__cta-section--alt {
  background-color: #0d121c;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 3em;
  }
  .page-blog__hero-description {
    font-size: 1.2em;
  }
  .page-blog__post-card {
    flex-direction: column;
  }
  .page-blog__post-image {
    width: 100%;
    height: 250px;
    min-width: 200px;
  }
  .page-blog__post-content {
    width: 100%;
    padding: 20px;
  }
  .page-blog__post-title {
    font-size: 1.6em;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 60px 15px;
  }
  .page-blog__hero-title {
    font-size: 2.2em;
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__button {
    width: 80%;
    max-width: 300px;
  }
  .page-blog__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }
  .page-blog__section-text {
    font-size: 1em;
  }
  .page-blog__category-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__category-card {
    margin-bottom: 20px;
  }
  .page-blog__post-card {
    flex-direction: column;
  }
  .page-blog__post-image {
    width: 100%;
    height: auto; /* Ensure images are responsive */
    max-width: 100%;
    min-width: 200px; /* Minimum size for content images */
  }
  .page-blog__post-content {
    padding: 20px;
  }
  .page-blog__post-title {
    font-size: 1.4em;
  }
  .page-blog__post-excerpt {
    font-size: 0.9em;
    -webkit-line-clamp: 4; /* Adjust excerpt lines for mobile */
  }
  /* Ensure all images within .page-blog are responsive and don't overflow */
  .page-blog img {
    max-width: 100%;
    height: auto;
  }
  .page-blog {
    overflow-x: hidden; /* Prevent horizontal scroll */
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: 1.8em;
  }
  .page-blog__hero-buttons {
    width: 100%;
  }
  .page-blog__button {
    width: 90%;
  }
  .page-blog__section-title {
    font-size: 1.6em;
  }
  .page-blog__category-image {
    height: 180px;
  }
  .page-blog__post-image {
    height: 200px;
    min-width: 200px;
  }
}