/* General styles for .page-blog */
.page-blog {
  font-family: Arial, sans-serif;
  color: #FFF6D6; /* Text Main */
  background-color: #0A0A0A; /* Background */
  line-height: 1.6;
  padding-bottom: 60px; /* Ensure some space above footer */
}

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

/* Section Titles */
.page-blog__section-title {
  font-size: 2.5em;
  color: #F2C14E; /* Main Color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-blog__section-intro {
    font-size: 1.1em;
    color: #FFF6D6;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    line-height: 1.7;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  margin-bottom: 60px;
  text-align: center;
}

.page-blog__hero-image-wrapper {
  margin-bottom: 30px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.page-blog__hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-blog__hero-title {
  font-size: 2.8em;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.2em;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button Color */
  color: #FFF6D6; /* Text Main */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
  max-width: 100%; /* Button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__hero-cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

/* Featured Posts Section */
.page-blog__featured-posts-section {
  margin-bottom: 60px;
  padding-top: 40px;
}

.page-blog__featured-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  align-items: stretch; /* Ensures cards have same height */
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  margin-bottom: 60px;
  padding-top: 40px;
}

.page-blog__latest-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  align-items: stretch; /* Ensures cards have same height */
}

/* Blog Card */
.page-blog__blog-card {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border Color */
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-blog__blog-card-content {
  padding: 20px;
  flex-grow: 1; /* Allows content to take available space */
  display: flex;
  flex-direction: column;
}

.page-blog__blog-card-title {
  font-size: 1.4em;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 10px;
  font-weight: bold;
}

.page-blog__blog-card-meta {
  font-size: 0.9em;
  color: rgba(255, 246, 214, 0.7); /* Lighter Text Main for meta */
  margin-bottom: 15px;
}

.page-blog__blog-card-excerpt {
  font-size: 1em;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 20px;
  flex-grow: 1; /* Allows excerpt to take available space */
}

.page-blog__blog-card-read-more {
  display: inline-block;
  color: #F2C14E; /* Main Color */
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
  margin-top: auto; /* Pushes to the bottom */
}

.page-blog__blog-card-read-more:hover {
  color: #FFD36B; /* Accent Color */
}

/* View All Button */
.page-blog__view-all-button-wrapper {
  text-align: center;
  margin-top: 40px;
}

.page-blog__view-all-button {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button Color */
  color: #FFF6D6; /* Text Main */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 10px rgba(242, 193, 78, 0.3);
  max-width: 100%; /* Button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__view-all-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 193, 78, 0.5);
}

/* Categories Section */
.page-blog__categories-section {
  margin-bottom: 60px;
  padding-top: 40px;
}

.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.page-blog__category-card {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border Color */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #FFF6D6; /* Text Main */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.page-blog__category-title {
  font-size: 1.5em;
  color: #F2C14E; /* Main Color */
  margin-bottom: 10px;
  font-weight: bold;
}

.page-blog__category-description {
  font-size: 0.95em;
  color: #FFF6D6; /* Text Main */
}

/* CTA Section */
.page-blog__cta-section {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border Color */
  border-radius: 10px;
  padding: 50px 30px;
  text-align: center;
  margin-bottom: 60px;
}

.page-blog__cta-title {
  font-size: 2em;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__cta-description {
  font-size: 1.1em;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* For mobile responsiveness */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 100%; /* Button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button Color */
  color: #FFF6D6; /* Text Main */
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #F2C14E; /* Main Color */
  border: 2px solid #F2C14E; /* Main Color Border */
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.2);
}

.page-blog__btn-secondary:hover {
  transform: translateY(-3px);
  background-color: rgba(242, 193, 78, 0.1);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.4);
}

/* FAQ Section */
.page-blog__faq-section {
  margin-bottom: 60px;
  padding-top: 40px;
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border Color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: #FFF6D6; /* Text Main */
  cursor: pointer;
  list-style: none; /* For details/summary */
}

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

.page-blog__faq-qtext {
  flex-grow: 1;
}

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

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

.page-blog__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: rgba(255, 246, 214, 0.8); /* Lighter Text Main */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Sufficient height for content */
  padding-top: 10px;
  transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

.page-blog__faq-answer p {
    margin-bottom: 10px;
}
.page-blog__faq-answer p:last-child {
    margin-bottom: 0;
}


/* Responsive styles for mobile */
@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__container {
    padding: 0 15px;
  }

  /* Hero Section */
  .page-blog__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
    margin-bottom: 40px;
  }
  .page-blog__hero-title {
    font-size: 2em;
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__hero-cta-button {
    padding: 12px 20px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }
  .page-blog__hero-image {
    height: 250px; /* Adjust height for mobile hero */
  }
  .page-blog__blog-card-image {
    height: 180px; /* Adjust height for mobile blog cards */
  }

  /* Card and Container responsiveness */
  .page-blog__featured-posts-grid,
  .page-blog__latest-posts-grid,
  .page-blog__categories-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
  }

  .page-blog__blog-card {
    margin: 0 auto;
  }

  .page-blog__view-all-button {
    padding: 10px 20px;
    font-size: 0.9em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 30px 15px;
    margin-bottom: 40px;
  }
  .page-blog__cta-title {
    font-size: 1.5em;
  }
  .page-blog__cta-description {
    font-size: 0.95em;
  }
  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* FAQ Section */
  .page-blog__faq-question {
    font-size: 1em;
    padding: 15px;
  }
  .page-blog__faq-answer {
    padding: 0 15px 15px 15px;
    font-size: 0.9em;
  }
}

/* Generic image and container overflow prevention for mobile */
@media (max-width: 768px) {
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__featured-posts-section,
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }
}