/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  line-height: 1.6;
  background-color: #FFFFFF; /* Explicitly set for clarity, though body is default white */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px; /* Space below content */
  background-color: #f0f8ff; /* Light blue tint for hero background */
  padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%; /* Ensure image wrapper is full width */
  overflow: hidden; /* Hide overflow */
  box-sizing: border-box;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Cover the area, maintain aspect ratio */
  max-height: 675px; /* Limit height for large screens */
  filter: none !important; /* Ensure no CSS filters are used on images */
}

.page-blog__hero-content {
  max-width: 1200px;
  width: 100%;
  padding: 40px 20px 0;
  text-align: center;
  box-sizing: border-box;
}

.page-blog__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #555555;
}

/* CTA Buttons */
.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Ensure container takes full width */
  box-sizing: border-box;
  padding: 0 15px; /* Add padding to prevent overflow */
}

.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__btn-read-more,
.page-blog__btn-text {
  display: inline-flex; /* Use flex for button content alignment */
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  text-align: center;
  max-width: 100%; /* Ensure buttons don't overflow */
  min-width: 150px; /* Ensure buttons have a minimum width for readability */
}

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

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

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

.page-blog__btn-secondary:hover {
  background-color: #e0f2f7;
  color: #1a7bb7;
  border-color: #1a7bb7;
}

.page-blog__btn-read-more {
  background-color: #26A9E0;
  color: #FFFFFF;
  border: 1px solid #26A9E0;
  padding: 8px 15px;
  font-size: 0.9rem;
  border-radius: 5px;
}

.page-blog__btn-read-more:hover {
  background-color: #1a7bb7;
  border-color: #1a7bb7;
}

.page-blog__btn-text {
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
  padding: 5px 0;
  border-bottom: 2px solid transparent;
}

.page-blog__btn-text:hover {
  border-bottom-color: #26A9E0;
}

/* Section common styles */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #26A9E0;
}

.page-blog__section-title--white {
  color: #FFFFFF;
}

.page-blog__text-block {
  font-size: 1.05rem;
  margin-bottom: 15px;
  text-align: justify;
  color: #444444;
}

/* Introduction Section */
.page-blog__introduction-section {
  padding: 60px 0;
  background-color: #FFFFFF;
}

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: #26A9E0; /* Brand color as background */
  color: #FFFFFF; /* White text for brand color background */
}

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

.page-blog__category-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  color: #333333; /* Dark text for white card background */
}

.page-blog__category-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  filter: none !important;
  min-width: 200px;
  min-height: 200px;
}

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

.page-blog__category-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-blog__category-title a:hover {
  text-decoration: underline;
}

.page-blog__category-description {
  font-size: 0.95rem;
  margin: 0 20px 20px;
  flex-grow: 1; /* Allow description to take available space */
}

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

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

.page-blog__article-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  color: #333333; /* Dark text for white card background */
}

.page-blog__article-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  filter: none !important;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #777777;
  margin: 15px 20px 0;
}

.page-blog__article-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 10px 20px;
  color: #26A9E0;
}

.page-blog__article-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-blog__article-title a:hover {
  text-decoration: underline;
}

.page-blog__article-excerpt {
  font-size: 0.95rem;
  margin: 0 20px 20px;
  flex-grow: 1;
}

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

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #26A9E0; /* Brand color as background */
  color: #FFFFFF; /* White text for brand color background */
}

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

.page-blog__faq-item {
  background-color: #FFFFFF;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: #333333; /* Dark text for white card background */
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  color: #26A9E0;
  position: relative;
  list-style: none; /* Remove default marker for <summary> */
}

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

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  width: 20px;
  text-align: center;
  color: #26A9E0;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−'; /* Change to minus when open */
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: #555555;
}

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

.page-blog__faq-answer a {
  color: #26A9E0;
  text-decoration: underline;
}

/* CTA Section at the bottom */
.page-blog__cta-section {
  padding: 60px 0;
  text-align: center;
  background-color: #f0f8ff; /* Light blue tint */
}

.page-blog__cta-container {
  max-width: 900px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-image {
    max-height: 500px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
  }

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

  .page-blog__description {
    font-size: 1rem;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 20px; /* Adjust padding for mobile */
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__btn-read-more,
  .page-blog__btn-text {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding: 12px 15px !important;
    font-size: 1rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
    min-width: unset; /* Allow buttons to scale down */
  }

  .page-blog__section-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    margin-bottom: 30px;
  }

  .page-blog__introduction-section,
  .page-blog__categories-section,
  .page-blog__latest-articles,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px; /* Standard mobile padding */
  }

  .page-blog__category-list,
  .page-blog__article-list {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .page-blog__category-image,
  .page-blog__article-image {
    height: 180px; /* Slightly smaller image height on mobile */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: unset; /* Allow it to scale down */
    min-height: unset;
  }

  /* Image/Video/Container for mobile responsiveness */
  .page-blog__hero-image-wrapper,
  .page-blog__category-card,
  .page-blog__article-card,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .page-blog__section,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent content overflow */
  }

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

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

/* Ensure all images are responsive */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure video elements are responsive (if any) */
.page-blog video,
.page-blog__video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.page-blog__video-section {
  padding-top: 10px !important; /* body handles --header-offset, this is for visual spacing */
}

.page-blog__video-container {
  width: 100%; /* Ensure desktop width is 100% before max-width */
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

/* CSS for FAQ toggle icon */
.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}

/* Ensure no CSS filters are used on images */
.page-blog img {
  filter: none !important;
}