.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--bg-color, #f5f5f5); /* Fallback to light gray if --bg-color is not defined */
}

.page-blog__container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__top-section {
  padding-top: 10px; /* Adjusted for shared header padding */
  padding-bottom: 60px;
  text-align: center;
}

.page-blog__dark-bg {
  background: #B71C1C; /* Custom background color */
  color: #FFF5E1; /* Custom text color for dark background */
}

.page-blog__light-bg {
  background: #ffffff; /* White background for contrast */
  color: #333333; /* Dark text for light background */
}

.page-blog__dark-section {
  background: #7A0E0E; /* Deep Red custom color */
  color: #FFF5E1; /* Custom text color for dark background */
  padding: 40px 0;
}

.page-blog__main-title {
  font-size: clamp(2.2em, 4vw, 3.2em);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFF5E1; /* Custom text color */
}

.page-blog__intro-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #FFD86A; /* Gold-like color for emphasis */
}

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

.page-blog__cta-buttons--centered {
  margin-top: 40px;
}

.page-blog__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1em;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom button gradient */
  color: #7A0E0E; /* Deep Red text for contrast */
  border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
  background: #C91F17; /* Main brand color */
  color: #FFF5E1; /* Custom text color */
  border: 2px solid #F2B544; /* Custom border color */
}

.page-blog__btn-secondary:hover {
  background: #E53935; /* Auxiliary brand color */
  transform: translateY(-2px);
}

.page-blog__section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  font-weight: 700;
  margin-bottom: 30px;
  color: inherit; /* Inherit from section for contrast */
}

.page-blog__sub-title {
  font-size: clamp(1.4em, 2.5vw, 2em);
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 20px;
  color: inherit;
}

.page-blog__paragraph {
  font-size: 1.05em;
  margin-bottom: 20px;
  text-align: justify;
  color: inherit;
}

.page-blog__text-link {
  color: #E53935; /* Auxiliary color for links */
  text-decoration: underline;
  font-weight: 600;
}

.page-blog__text-link:hover {
  color: #C91F17; /* Main color on hover */
}

.page-blog__list {
  list-style: disc;
  text-align: left;
  margin: 20px auto;
  max-width: 800px;
  padding-left: 25px;
  color: inherit;
}

.page-blog__numbered-list {
  list-style: decimal;
  text-align: left;
  margin: 20px auto;
  max-width: 800px;
  padding-left: 25px;
  color: inherit;
}

.page-blog__list-item {
  margin-bottom: 10px;
  font-size: 1.05em;
  color: inherit;
}

.page-blog__figure {
  margin: 30px auto;
  max-width: 680px;
  text-align: center;
}

.page-blog__image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
}

.page-blog__figcaption {
  font-size: 0.9em;
  color: #666;
  margin-top: 10px;
}

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

.page-blog__article-card {
  background: #D32F2F; /* Card background color */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: left;
  display: flex;
  flex-direction: column;
  color: #FFF5E1; /* Text color for cards */
}

.page-blog__card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-blog__card-title {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 10px;
  color: #FFCC66; /* Glow color for titles */
}

.page-blog__card-excerpt {
  font-size: 0.95em;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__read-more {
  font-weight: 600;
  color: #FFD86A; /* Button gradient start color for read more */
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-blog__read-more:hover .page-blog__arrow {
  transform: translateX(5px);
}

.page-blog__arrow {
  transition: transform 0.2s ease-out;
}

.page-blog__copyright-section {
  padding: 20px 0;
  font-size: 0.9em;
  color: #666;
  text-align: center;
  border-top: 1px solid #eee;
}

.page-blog__copyright-text {
  margin: 0;
  color: inherit;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }

  .page-blog__section-title {
    font-size: clamp(1.6em, 3.8vw, 2.5em);
  }

  .page-blog__sub-title {
    font-size: clamp(1.3em, 2.8vw, 1.8em);
  }

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

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__top-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
    margin-bottom: 15px;
  }

  .page-blog__intro-description {
    font-size: 1em;
    margin-bottom: 25px;
  }

  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 10px;
  }

  .page-blog__btn {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: clamp(1.5em, 6vw, 2.2em);
    margin-bottom: 20px;
  }

  .page-blog__sub-title {
    font-size: clamp(1.2em, 5vw, 1.6em);
    margin-top: 30px;
    margin-bottom: 15px;
  }

  .page-blog__paragraph,
  .page-blog__list-item {
    font-size: 1em;
    text-align: left; /* Ensure paragraphs align left for readability */
  }

  .page-blog__list,
  .page-blog__numbered-list {
    padding-left: 20px;
    margin: 15px auto;
  }

  .page-blog__figure {
    margin: 20px auto;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-blog__article-card {
    text-align: center;
  }

  .page-blog__card-image {
    height: 180px;
  }

  .page-blog__card-content {
    padding: 15px;
  }

  .page-blog__card-title {
    font-size: 1.2em;
  }

  .page-blog__card-excerpt {
    font-size: 0.9em;
  }

  .page-blog__read-more {
    justify-content: center;
  }

  .page-blog__copyright-section {
    padding: 15px 0;
  }
}