/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  color: #1F2D3D;
  background-color: #F4F7FB;
  line-height: 1.6;
}

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

.page-blog__section-title {
  font-size: 32px;
  color: #1F2D3D;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding as body handles header offset */
  padding-bottom: 40px;
  background-color: #F4F7FB;
  text-align: center;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 30px;
  overflow: hidden;
  border-radius: 10px;
}

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

.page-blog__hero-content {
  max-width: 800px;
  padding: 0 20px;
}

.page-blog__hero-title {
  font-size: clamp(28px, 4vw, 38px);
  color: #2F6BFF;
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 18px;
  color: #1F2D3D;
  margin-bottom: 30px;
}

/* Latest Posts Grid */
.page-blog__posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__post-card {
  background-color: #FFFFFF;
  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;
  display: flex;
  flex-direction: column;
}

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

.page-blog__post-link-wrapper {
  display: block;
  width: 100%;
  height: 200px; /* Fixed height for consistent card appearance */
  overflow: hidden;
}

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

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

.page-blog__post-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

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

.page-blog__post-meta {
  font-size: 14px;
  color: #6FA3FF;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 15px;
  color: #1F2D3D;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-btn {
  display: inline-block;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
  text-align: center;
}

.page-blog__read-more-btn:hover {
  opacity: 0.9;
}

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

.page-blog__view-all-btn {
  display: inline-block;
  background: #FFFFFF;
  color: #2F6BFF;
  padding: 12px 25px;
  border: 2px solid #2F6BFF;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__view-all-btn:hover {
  background-color: #2F6BFF;
  color: #FFFFFF;
}

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

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

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}

.page-blog__category-card:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.page-blog__category-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  font-size: 30px;
  color: #A5C4FF;
  /* Placeholder for actual icon */
}

.page-blog__category-card .page-blog__category-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.page-blog__category-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

/* Why Read Section */
.page-blog__why-read-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-blog__why-read-text {
  flex: 1;
}

.page-blog__why-read-text p {
  font-size: 16px;
  margin-bottom: 20px;
  color: #1F2D3D;
}

.page-blog__why-read-text ul {
  list-style: disc;
  margin-left: 20px;
  padding-left: 0;
  color: #1F2D3D;
}

.page-blog__why-read-text ul li {
  margin-bottom: 10px;
  font-size: 16px;
}

.page-blog__why-read-image-wrapper {
  flex: 1;
  max-width: 50%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__why-read-image {
  width: 100%;
  height: auto;
  display: block;
}

/* CTA Section */
.page-blog__cta-section {
  background-color: #2F6BFF;
  color: #ffffff;
  text-align: center;
  padding: 60px 20px;
}

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

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

.page-blog__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #D6E2FF;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
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: #F4F7FB;
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #1F2D3D;
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #2F6BFF;
  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 10px 10px;
  color: #1F2D3D;
}

/* Responsive Styles */
@media (max-width: 1023px) {
  /* This section is primarily for homepage elements, but ensuring no conflicts */
  .page-blog__hero-section { padding-bottom: 30px; }
  .page-blog__hero-title { font-size: clamp(24px, 5vw, 36px); }
  .page-blog__hero-description { font-size: 16px; }
}

@media (max-width: 768px) {
  .page-blog__section {
    padding: 30px 15px;
  }

  .page-blog__section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }

  .page-blog__hero-section {
    padding-top: 10px; /* Small top padding as body handles header offset */
    padding-bottom: 20px;
  }

  .page-blog__hero-title {
    font-size: clamp(24px, 6vw, 30px);
  }

  .page-blog__hero-description {
    font-size: 15px;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-link-wrapper {
    height: 180px;
  }

  .page-blog__post-title {
    font-size: 18px;
  }

  .page-blog__post-excerpt {
    font-size: 14px;
  }

  .page-blog__read-more-btn {
    padding: 8px 15px;
    font-size: 14px;
  }

  .page-blog__view-all-btn {
    padding: 10px 20px;
    font-size: 15px;
  }

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

  .page-blog__category-card {
    padding: 15px;
    min-height: 120px;
  }

  .page-blog__category-icon {
    width: 50px;
    height: 50px;
    font-size: 25px;
    margin-bottom: 10px;
  }

  .page-blog__category-title {
    font-size: 16px;
  }

  .page-blog__why-read-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-blog__why-read-image-wrapper {
    max-width: 100%;
  }

  .page-blog__why-read-text p,
  .page-blog__why-read-text ul li {
    font-size: 15px;
  }

  .page-blog__cta-section {
    padding: 40px 15px;
  }

  .page-blog__cta-description {
    font-size: 16px;
  }

  .page-blog__btn-primary {
    padding: 12px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  /* Mobile image adaptation */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__why-read-image-wrapper,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile button container adaptation */
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-blog__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}

/* Fixed header spacing - handled by shared.css body padding, so no additional padding-top on first main child here */

/* Color Contrast Adjustments */
.page-blog__dark-bg {
  background: #2F6BFF;
  color: #ffffff;
}

.page-blog__dark-section {
  background: #2F6BFF;
  color: #ffffff;
}

.page-blog__light-bg {
  background: #ffffff;
  color: #1F2D3D;
}