/* General Body and Main Content Styles */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Text Main */
  background: #F5F7FA; /* Background */
}

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

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  background: #E53935; /* Primary color as background for visual separation */
  color: #ffffff; /* White text for contrast */
  text-align: center;
  overflow: hidden; /* Ensure content doesn't spill */
}

.page-blog__hero-image-wrapper {
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.page-blog__hero-content {
  padding: 30px 15px 50px;
  background: #ffffff; /* Card BG */
  color: #333333; /* Text Main */
}

.page-blog__main-title {
  font-size: 2.8em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #E53935; /* Primary color for title */
}

.page-blog__subtitle {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Section General */
.page-blog__section {
  padding: 60px 0;
}

.page-blog__section-title {
  font-size: 2.2em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #333333; /* Text Main */
}

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #666666;
}

/* Buttons */
.page-blog__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* For responsiveness */
  box-sizing: border-box; /* For responsiveness */
  white-space: normal; /* For responsiveness */
  word-wrap: break-word; /* For responsiveness */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  color: #ffffff;
  border: none;
}

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

.page-blog__btn-secondary {
  background: #ffffff;
  color: #E53935; /* Primary color */
  border: 2px solid #E53935; /* Primary color border */
  margin-left: 15px;
}

.page-blog__btn-secondary:hover {
  background: #E53935;
  color: #ffffff;
}

.page-blog__button-group {
  text-align: center;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap; /* For mobile responsiveness */
}

/* Latest Posts Section */
.page-blog__latest-posts {
  background: #F5F7FA; /* Background */
}

.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: #ffffff; /* Card BG */
  border: 1px solid #E0E0E0; /* Border */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-blog__post-content {
  padding: 20px;
}

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 10px;
  color: #333333; /* Text Main */
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: #666666;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: #E53935; /* Primary color */
  font-weight: 600;
  text-decoration: underline;
}

/* Categories Section */
.page-blog__categories-section {
  background: #E53935; /* Primary color for dark section */
  color: #ffffff; /* White text for contrast */
}

.page-blog__categories-section .page-blog__section-title,
.page-blog__categories-section .page-blog__section-description {
  color: #ffffff;
}

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

.page-blog__category-card {
  background: rgba(255, 255, 255, 0.15); /* Slightly transparent white for dark background */
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.page-blog__category-card:hover {
  background: rgba(255, 255, 255, 0.25);
}

.page-blog__category-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
}

.page-blog__category-title {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 5px;
  color: #ffffff;
}

.page-blog__category-count {
  font-size: 0.9em;
  color: #f0f0f0;
  margin-bottom: 15px;
}

.page-blog__category-link {
  display: inline-block;
  background: #FF5A4F; /* Auxiliary color for button */
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-blog__category-link:hover {
  background: #E53935; /* Primary color on hover */
}

/* CTA Section */
.page-blog__cta-section {
  background: #F5F7FA; /* Background */
}

.page-blog__cta-section .page-blog__container {
  background: linear-gradient(135deg, #E53935 0%, #FF5A4F 100%); /* Gradient background */
  border-radius: 15px;
  padding: 50px 30px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-section .page-blog__section-title,
.page-blog__cta-section .page-blog__section-description {
  color: #ffffff;
}

/* FAQ Section */
.page-blog__faq-section {
  background: #F5F7FA; /* Background */
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #E0E0E0; /* Border */
  overflow: hidden;
  background: #ffffff; /* Card BG */
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #f5f5f5;
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Text Main */
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555;
}

/* Responsive Styles */
@media (max-width: 1023px) {
  .page-blog__main-title {
    font-size: 2.2em;
  }
  .page-blog__subtitle {
    font-size: 1.1em;
  }
  .page-blog__post-image {
    height: 180px;
  }
  .page-blog__category-image {
    height: 120px;
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* General image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* General button responsiveness */
  .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;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .page-blog__button-group {
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 15px !important;
  }

  /* Sections and cards */
  .page-blog__hero-content,
  .page-blog__latest-posts .page-blog__container,
  .page-blog__categories-section .page-blog__container,
  .page-blog__cta-section .page-blog__container,
  .page-blog__faq-section .page-blog__container {
    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;
  }

  .page-blog__main-title {
    font-size: 1.8em;
  }
  .page-blog__subtitle {
    font-size: 1em;
  }

  .page-blog__section-title {
    font-size: 1.8em;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .page-blog__category-image {
    height: 100px;
  }

  details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
  .page-blog__faq-qtext { font-size: 15px; }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }
}