.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #000; /* Assuming body background is black from shared.css */
}

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

.page-blog__dark-bg {
  background-color: #1A202C;
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #f0f0f0;
  color: #333333;
}

.page-blog__section-title {
  font-size: 3em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #FFD700; /* Accent color for titles */
}

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__text-block {
  line-height: 1.8;
  text-align: justify;
}

/* 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: var(--header-offset, 120px); /* Ensures content is below fixed header */
  overflow: hidden;
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-blog__hero-image {
  width: 100%;
  margin-top: 30px; /* Space between content and image */
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.page-blog__btn-primary {
  background: #FFD700;
  color: #1A202C;
  border: 2px solid #FFD700;
}

.page-blog__btn-primary:hover {
  background: #e6c200;
  border-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-secondary {
  background: #1A202C;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.page-blog__btn-secondary:hover {
  background: #0d1016;
  border-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Blog Posts Section */
.page-blog__blog-posts {
  padding: 80px 0;
}

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

.page-blog__post-card {
  background: #1A202C;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

.page-blog__post-thumbnail img {
  width: 100%;
  height: 220px; /* Fixed height for thumbnails */
  object-fit: cover;
  display: block;
}

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

.page-blog__post-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-blog__post-title a:hover {
  color: #e6c200;
}

.page-blog__post-summary {
  font-size: 0.95em;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  align-self: flex-start;
  margin-top: auto; /* Push to bottom */
}

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

/* About Blog Section */
.page-blog__about-blog {
  padding: 80px 0;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
}

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

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ item styles */
.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: #1A202C; /* Dark background for FAQ items */
  color: #ffffff;
}

/* FAQ default state - answer hidden */
.page-blog__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter background for answer */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-blog__faq-item.active .page-blog__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough to contain any content */
  padding: 20px 25px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

/* Question styles */
.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #1A202C;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-blog__faq-question:hover {
  background: #0d1016;
  border-color: rgba(255, 255, 255, 0.2);
}

.page-blog__faq-question:active {
  background: #0a0c0f;
}

/* Question title styles */
.page-blog__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click event */
  color: #FFD700; /* Accent color for FAQ questions */
}

/* Toggle icon */
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-blog__faq-item.active .page-blog__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Change to X or rotate */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2.5em;
  }
  .page-blog__hero-image img {
    height: 500px;
  }
}

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

  .page-blog__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__hero-container {
    flex-direction: column-reverse; /* Image above content on mobile */
  }
  .page-blog__hero-image {
    margin-bottom: 20px;
    margin-top: 0;
  }
  .page-blog__hero-image img {
    height: auto;
  }

  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__section-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__post-card {
    margin-left: 15px;
    margin-right: 15px;
  }
  .page-blog__post-thumbnail img {
    
  }

  .page-blog__blog-posts,
  .page-blog__about-blog,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }
  .page-blog__container {
    padding: 0 15px;
  }

  /* Mobile image handling */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-blog__post-thumbnail {
    width: 100%;
    overflow: hidden;
  }

  /* Mobile button handling */
  .page-blog__cta-button,
  .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__view-all-posts,
  .page-blog__cta-section .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-blog__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-blog__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-blog__faq-answer {
    padding: 0 15px;
  }
  .page-blog__faq-item.active .page-blog__faq-answer {
    padding: 15px !important;
  }
}