.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color for the page, assuming dark body background */
  background-color: var(--background-color, #08160F); /* Ensure consistency with body background */
}

/* Custom Color Variables */
:root {
  --main-color: #11A84E;
  --accent-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background-color: #08160F; /* This should ideally come from shared.css */
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* Apply color variables */
.page-blog__cta-button,
.page-blog__view-all-button {
  background: var(--button-gradient);
}
.page-blog__article-card,
.page-blog__featured-card,
.page-blog__category-card,
.page-blog__faq-item {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}
.page-blog__article-title a,
.page-blog__featured-title a,
.page-blog__category-title,
.page-blog__faq-question .page-blog__faq-qtext {
  color: var(--text-main);
}
.page-blog__article-meta,
.page-blog__article-excerpt,
.page-blog__featured-meta,
.page-blog__featured-excerpt,
.page-blog__faq-answer p,
.page-blog__cta-description {
  color: var(--text-secondary);
}
.page-blog__section-title,
.page-blog__main-title {
  color: var(--text-main);
}
.page-blog__article-title a:hover,
.page-blog__featured-title a:hover {
  color: var(--glow);
}
.page-blog__read-more-button {
  background-color: var(--deep-green);
  color: var(--text-main);
}
.page-blog__read-more-button:hover {
  background-color: var(--glow);
}
.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: var(--deep-green);
}
.page-blog__hero-section,
.page-blog__cta-bottom-section {
  background-color: var(--deep-green);
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px; /* Space below content */
  padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px; /* Limit height for hero image */
}

.page-blog__hero-content {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__intro-text {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.page-blog__cta-button {
  display: inline-block;
  color: #FFFFFF;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-blog__cta-button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Latest Articles Section */
.page-blog__latest-articles-section,
.page-blog__featured-article-section,
.page-blog__categories-section,
.page-blog__faq-section,
.page-blog__cta-bottom-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

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

.page-blog__article-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  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.3);
}

.page-blog__article-image {
  width: 100%;
  min-width: 200px;
  min-height: 200px;
  height: 220px; /* 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.4rem;
  margin-top: 0;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-blog__article-meta {
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1rem;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow excerpt to take available space */
}

.page-blog__read-more-button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-blog__view-all-button-container {
  text-align: center;
  margin-top: 40px;
}

.page-blog__view-all-button {
  display: inline-block;
  color: #FFFFFF;
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-blog__view-all-button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Featured Article Section */
.page-blog__featured-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.page-blog__featured-image {
  width: 100%;
  min-width: 200px;
  min-height: 200px;
  height: auto;
  object-fit: cover;
  max-height: 400px;
}

.page-blog__featured-content {
  padding: 30px;
}

.page-blog__featured-title {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-blog__featured-meta {
  font-size: 1rem;
  margin-bottom: 20px;
}

.page-blog__featured-excerpt {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

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

.page-blog__category-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.page-blog__category-image {
  width: 100%; /* Ensure category images are responsive */
  min-width: 200px;
  min-height: 200px;
  height: 150px; /* Fixed height for consistency */
  object-fit: contain; /* Use contain to show full image without cropping */
  margin-bottom: 15px;
  display: block;
}

.page-blog__category-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

/* FAQ Section */
.page-blog__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-blog__faq-item {
  border-radius: 10px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none; /* For details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for Webkit browsers */
}

.page-blog__faq-item[open] .page-blog__faq-question {
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' or just change to '-' */
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
}

/* CTA Bottom Section */
.page-blog__cta-bottom-section {
  text-align: center;
  padding: 80px 20px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.page-blog__cta-bottom-section .page-blog__section-title {
  margin-bottom: 25px;
}

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

.page-blog__cta-button--large {
  padding: 18px 40px;
  font-size: 1.25rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    max-width: 700px;
  }
  .page-blog__main-title {
    font-size: clamp(2rem, 4vw, 3rem);
  }
  .page-blog__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__featured-card {
    flex-direction: column;
  }
  .page-blog__featured-image {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
  }
  .page-blog__hero-content {
    margin-top: 20px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
  }
  .page-blog__intro-text {
    font-size: 1rem;
  }
  .page-blog__cta-button {
    padding: 12px 25px;
    font-size: 1rem;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-blog__cta-bottom-section .page-blog__cta-button {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__latest-articles-section,
  .page-blog__featured-article-section,
  .page-blog__categories-section,
  .page-blog__faq-section,
  .page-blog__cta-bottom-section {
    padding: 40px 15px;
  }
  .page-blog__section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
  .page-blog__articles-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__article-title {
    font-size: 1.2rem;
  }
  .page-blog__featured-title {
    font-size: 1.5rem;
  }
  .page-blog__featured-excerpt {
    font-size: 1rem;
  }
  .page-blog__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .page-blog__category-image {
    height: 100px;
  }
  .page-blog__category-title {
    font-size: 1.1rem;
  }
  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.95rem;
  }
  .page-blog__cta-description {
    font-size: 1rem;
  }
  .page-blog__cta-button--large {
    font-size: 1.1rem;
  }

  /* Image responsive rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-articles-section,
  .page-blog__featured-article-section,
  .page-blog__categories-section,
  .page-blog__faq-section,
  .page-blog__cta-bottom-section,
  .page-blog__article-card,
  .page-blog__featured-card,
  .page-blog__category-card,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__hero-section {
    padding-top: 10px !important; /* body has header offset, this is for decorative top padding */
    padding-left: 0;
    padding-right: 0;
  }
  .page-blog__hero-image {
    padding-left: 0;
    padding-right: 0;
  }
  .page-blog__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Button responsive rules */
  .page-blog__cta-button,
  .page-blog__btn-primary,
  .page-blog a[class*="button"],
  .page-blog a[class*="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__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-blog__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 769px) {
  .page-blog__featured-card {
    flex-direction: row;
    align-items: center;
  }
  .page-blog__featured-image {
    width: 50%;
    height: auto;
  }
  .page-blog__featured-content {
    width: 50%;
  }
  .page-blog__hero-image {
    width: 100%;
  }
}

/* Ensure content area images have at least 200px in one dimension, and are not tiny */
.page-blog__article-image,
.page-blog__featured-image,
.page-blog__category-image {
  min-width: 200px;
  min-height: 200px; /* Enforcing minimum 200px for both dimensions for content images, as per rules */
  object-fit: cover; /* Use cover for most content images */
}
.page-blog__category-image { /* Override for category image to contain if needed */
  object-fit: contain;
}