.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Default text color for light backgrounds */
  background-color: var(--background-color); /* Inherited from shared, assumed dark */
}

.page-blog__dark-bg {
  background-color: var(--background);
  color: var(--text-main);
}

.page-blog__light-bg {
  background-color: var(--text-main);
  color: var(--background);
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, header offset handled by body */
  min-height: 500px;
  overflow: hidden;
}

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

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

.page-blog__hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* min, preferred, max */
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 20px;
}

.page-blog__hero-description {
  font-size: 1.125rem;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

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

/* Section Titles & Descriptions */
.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main);
}

.page-blog__section-description {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-secondary);
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
}

.page-blog__btn-primary {
  background: var(--button-gradient);
  color: var(--text-main);
  border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
  background: transparent;
  color: var(--glow);
  border: 2px solid var(--border);
}

.page-blog__btn-secondary:hover {
  background: var(--glow);
  color: var(--background);
  border-color: var(--glow);
  transform: translateY(-2px);
}

/* Card Styles */
.page-blog__card {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
}

.page-blog__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
  padding: 80px 0;
}

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

.page-blog__article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--divider);
}

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

.page-blog__article-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--text-main);
}

.page-blog__article-title a {
  color: inherit;
  text-decoration: none;
}

.page-blog__article-title a:hover {
  color: var(--glow);
}

.page-blog__article-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-btn {
  align-self: flex-start;
  padding: 10px 20px;
  font-size: 0.95rem;
}

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

/* Featured Categories Section */
.page-blog__featured-categories-section {
  padding: 80px 0;
}

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

.page-blog__category-card {
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  padding-bottom: 20px;
}

.page-blog__category-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 20px;
}

.page-blog__category-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--glow);
}

.page-blog__category-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0 15px;
}

/* Guides & Tips Section */
.page-blog__guides-tips-section {
  padding: 80px 0;
}

.page-blog__content-wrapper {
  display: flex;
  gap: 40px;
  margin-top: 50px;
  align-items: flex-start;
}

.page-blog__text-block {
  flex: 2;
}

.page-blog__text-block h3 {
  font-size: 1.8rem;
  color: var(--deep-green);
  margin-bottom: 15px;
  border-bottom: 2px solid var(--divider);
  padding-bottom: 10px;
}

.page-blog__text-block p {
  font-size: 1rem;
  color: var(--background);
  margin-bottom: 20px;
}

.page-blog__guides-image {
  flex: 1;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  min-width: 200px; /* Ensure minimum size */
}

/* News & Updates Section */
.page-blog__news-updates-section {
  padding: 80px 0;
}

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

.page-blog__news-item {
  display: flex;
  flex-direction: column;
}

.page-blog__news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--divider);
}

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

.page-blog__news-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__news-title a {
  color: var(--text-main);
  text-decoration: none;
}

.page-blog__news-title a:hover {
  color: var(--glow);
}

.page-blog__news-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.page-blog__news-excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
}

.page-blog__faq-list {
  margin-top: 50px;
}

.page-blog__faq-item {
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--background);
  cursor: pointer;
  list-style: none; /* Remove default marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Hide Chrome/Safari marker */
}

.page-blog__faq-qtext {
  flex-grow: 1;
  color: var(--background);
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--deep-green);
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: var(--background);
  line-height: 1.7;
}

.page-blog__faq-cta {
  text-align: center;
  margin-top: 40px;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Final CTA Section */
.page-blog__final-cta-section {
  position: relative;
  padding: 80px 20px;
  text-align: center;
  overflow: hidden;
}

.page-blog__final-cta-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.2;
}

.page-blog__final-cta-buttons {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

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

  .page-blog__section-title {
    font-size: 2rem;
  }

  .page-blog__content-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .page-blog__guides-image {
    width: 80%;
    height: auto;
  }
}

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

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-blog__hero-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-blog__hero-cta-buttons,
  .page-blog__final-cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .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__container {
    padding: 0 15px;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .page-blog__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  .page-blog__latest-articles-section,
  .page-blog__featured-categories-section,
  .page-blog__guides-tips-section,
  .page-blog__news-updates-section,
  .page-blog__faq-section,
  .page-blog__final-cta-section {
    padding: 40px 0;
  }

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

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

  .page-blog__article-title,
  .page-blog__news-title {
    font-size: 1.2rem;
  }

  .page-blog__faq-item summary {
    font-size: 1rem;
    padding: 15px 20px;
  }

  .page-blog__faq-answer {
    padding: 0 20px 15px;
  }

  .page-blog__faq-cta {
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
  }

  /* Images responsiveness */
  .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-categories-section,
  .page-blog__guides-tips-section,
  .page-blog__news-updates-section,
  .page-blog__faq-section,
  .page-blog__final-cta-section,
  .page-blog__hero-cta-buttons,
  .page-blog__final-cta-buttons,
  .page-blog__faq-cta {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__guides-image {
    width: 100%;
    height: auto;
    min-width: unset;
  }

  .page-blog__text-block h3 {
    font-size: 1.5rem;
  }
}

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

/* Ensure contrast for text on light backgrounds */
.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__section-description,
.page-blog__light-bg .page-blog__text-block h3,
.page-blog__light-bg .page-blog__text-block p,
.page-blog__light-bg .page-blog__faq-item summary,
.page-blog__light-bg .page-blog__faq-qtext,
.page-blog__light-bg .page-blog__faq-answer {
  color: var(--background);
}

/* Ensure contrast for text on dark backgrounds */
.page-blog__dark-bg .page-blog__section-title,
.page-blog__dark-bg .page-blog__section-description,
.page-blog__dark-bg .page-blog__article-title a,
.page-blog__dark-bg .page-blog__news-title a {
  color: var(--text-main);
}

.page-blog__dark-bg .page-blog__article-meta,
.page-blog__dark-bg .page-blog__article-excerpt,
.page-blog__dark-bg .page-blog__news-meta,
.page-blog__dark-bg .page-blog__news-excerpt,
.page-blog__dark-bg .page-blog__category-desc {
  color: var(--text-secondary);
}

.page-blog__dark-bg .page-blog__category-title {
  color: var(--glow);
}