/* style/blog.css */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Text Main */
  background-color: #F5F7FA; /* Background */
}

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

.page-blog h1,
.page-blog h2,
.page-blog h3 {
  color: #E53935; /* Primary Color */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog h1 {
  font-size: clamp(2em, 5vw, 2.8em);
  font-weight: 700;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog h2 {
  font-size: clamp(1.8em, 4vw, 2.4em);
  font-weight: 600;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 30px;
}

.page-blog h3 {
  font-size: clamp(1.4em, 3vw, 1.8em);
  font-weight: 600;
  margin-bottom: 15px;
}

.page-blog p {
  margin-bottom: 15px;
  font-size: 16px;
}

/* 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 */
  background-color: #F5F7FA; /* Match body background */
}

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

.page-blog__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

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

.page-blog__hero-content p {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #333333; /* Text Main */
}

/* CTA Buttons */
.page-blog__cta-button,
.page-blog__btn-primary,
.page-blog__btn-secondary {
  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;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-blog__cta-button {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
}

.page-blog__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-blog__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 60px 0;
  background-color: #F5F7FA;
}

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

.page-blog__article-card {
  background: #FFFFFF; /* Card BG */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-blog__article-card img {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__article-card h3 {
  font-size: 20px;
  margin: 20px 20px 10px 20px;
  color: #E53935; /* Primary Color */
  flex-grow: 1;
}

.page-blog__article-card p {
  font-size: 15px;
  color: #555555;
  margin: 0 20px 15px 20px;
}

.page-blog__article-card time {
  font-size: 14px;
  color: #888888;
  margin: 0 20px 20px 20px;
  display: block;
}

.page-blog__read-more {
  display: inline-block;
  padding: 10px 20px;
  background-color: #E53935;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  margin: 0 20px 20px 20px;
  transition: background-color 0.3s ease;
}

.page-blog__read-more:hover {
  background-color: #FF5A4F;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-blog__category-card {
  background: #FFFFFF; /* Card BG */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  padding-bottom: 20px;
  text-decoration: none;
  color: #333333;
}

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

.page-blog__category-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-blog__category-card h3 {
  font-size: 18px;
  color: #E53935; /* Primary Color */
  margin: 0 15px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #F5F7FA;
}

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

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: #333333; /* Text Main */
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #E53935; /* Primary Color */
  color: #ffffff;
}

.page-blog__cta-section h2 {
  color: #ffffff;
  margin-bottom: 20px;
}

.page-blog__cta-section p {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #ffffff;
}

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

.page-blog__cta-section .page-blog__btn-primary {
  margin-top: 0;
}

.page-blog__cta-section .page-blog__btn-secondary {
  margin-top: 0;
  margin-left: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-blog__articles-grid,
  .page-blog__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

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

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

  .page-blog h1 {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }

  .page-blog h2 {
    font-size: clamp(1.6em, 6vw, 2em);
  }

  .page-blog h3 {
    font-size: clamp(1.2em, 5vw, 1.6em);
  }

  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-content p {
    font-size: 16px;
  }

  .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;
    margin-top: 15px; /* Adjust margin for stacked buttons */
    margin-left: 0 !important; /* Remove left margin for secondary button */
  }
  
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    flex-direction: column;
    gap: 15px;
  }

  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__latest-articles,
  .page-blog__categories-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__article-card img,
  .page-blog__category-card img {
     /* Smaller fixed height for mobile cards */
  }

  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; }

  .page-blog__cta-section p {
    font-size: 16px;
    margin-bottom: 30px;
  }
}