/* style/blog.css */
/* Body background is #0a0a0a (dark), so main text color should be light */
.page-blog {
  color: #ffffff; /* Light text for dark body background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Main content background is transparent to show body background */
}

/* Fixed header padding handled by shared.css on body, so first section needs minimal top padding */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  padding-top: 10px; /* Small top padding, not var(--header-offset) */
  box-sizing: border-box;
  text-align: center;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

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

.page-blog__hero-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
  font-weight: 700;
  line-height: 1.2;
  color: #26A9E0; /* Brand color for H1, good contrast on dark background */
  margin-bottom: 15px;
}

.page-blog__hero-description {
  font-size: 1.1rem;
  color: #f0f0f0; /* Slightly off-white for description */
  max-width: 700px;
  margin: 0 auto;
}

.page-blog__introduction-section,
.page-blog__category-overview,
.page-blog__faq-section {
  background-color: #ffffff; /* Light background for these sections */
  color: #333333; /* Dark text for light background */
  padding: 60px 20px;
  box-sizing: border-box;
}

.page-blog__featured-posts,
.page-blog__cta-section {
  background-color: #0a0a0a; /* Dark background, same as body */
  color: #ffffff; /* Light text */
  padding: 60px 20px;
  box-sizing: border-box;
}

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

.page-blog__section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #26A9E0; /* Brand color for titles */
  text-align: center;
  margin-bottom: 40px;
}

.page-blog__section-text {
  font-size: 1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 20px auto;
  color: inherit; /* Inherit color from parent section */
}

.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-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

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

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

.page-blog__post-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  display: block;
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to grow and fill space */
  display: flex;
  flex-direction: column;
  color: #ffffff; /* Light text for card content */
}

.page-blog__post-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #26A9E0; /* Brand color for post titles */
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 0.95rem;
  color: #cccccc;
  margin-bottom: 15px;
  flex-grow: 1; /* Allow excerpt to grow */
}

.page-blog__post-meta {
  font-size: 0.85rem;
  color: #999999;
  display: block;
  margin-top: auto; /* Push meta to the bottom */
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-blog__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-blog__btn-primary:hover {
  background-color: #1e87c0;
  border-color: #1e87c0;
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

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

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

.page-blog__category-card {
  background-color: #f8f8f8;
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__category-icon {
  width: 100px; /* Adjust size for category icons */
  height: 75px; /* Maintain aspect ratio */
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
}

.page-blog__category-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #26A9E0;
  margin-bottom: 10px;
}

.page-blog__category-description {
  font-size: 0.95rem;
  color: #555555;
  flex-grow: 1;
  margin-bottom: 15px;
}

.page-blog__category-link {
  display: inline-block;
  margin-top: auto;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid #26A9E0;
  padding-bottom: 2px;
}

.page-blog__category-link:hover {
  color: #1e87c0;
  border-color: #1e87c0;
}

/* FAQ Section */
.page-blog__faq-list {
  max-width: 800px;
  margin: 40px auto 0 auto;
  text-align: left;
}

.page-blog__faq-item {
  background-color: #f0f0f0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  background-color: #e8e8e8;
  border-bottom: 1px solid #dcdcdc;
}

/* Remove default details marker */
.page-blog__faq-item > summary {
  list-style: none;
}
.page-blog__faq-item > summary::-webkit-details-marker {
  display: none;
}

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

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
}

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: #dcdcdc;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}

.page-blog__faq-answer {
  padding: 15px 25px;
  font-size: 1rem;
  color: #555555;
  background-color: #ffffff;
}

.page-blog__faq-answer p {
  margin-bottom: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 30px 15px;
  }

  .page-blog__hero-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .page-blog__hero-description {
    font-size: 1rem;
  }

  .page-blog__section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .page-blog__post-grid,
  .page-blog__category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-image {
    height: 180px;
  }

  .page-blog__post-title {
    font-size: 1.1rem;
  }

  .page-blog__post-excerpt {
    font-size: 0.9rem;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 300px !important; /* Limit width for stacked buttons */
    padding: 10px 20px;
  }

  .page-blog__category-card {
    padding: 20px;
  }

  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }

  .page-blog__faq-answer {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  /* Mobile image, video, button, and container overflow prevention */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__faq-item,
  .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 !important;
    padding-right: 15px !important;
    overflow: hidden !important; /* Ensure no overflow */
  }

  .page-blog__hero-section,
  .page-blog__introduction-section,
  .page-blog__featured-posts,
  .page-blog__category-overview,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* body already has padding-top */
  }

  /* Specific for buttons to wrap text */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    white-space: normal !important;
    word-wrap: break-word !important;
  }
}