/* style/blog.css */

/* --- Base Styles --- */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for assumed light body background */
  background-color: var(--bg-color, #FFFFFF); /* Use shared var, fallback to white */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-blog__article-subtitle {
  font-size: 1.8em;
  color: #26A9E0;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-blog__sub-subtitle {
  font-size: 1.4em;
  color: #333333;
  margin-top: 25px;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-blog p {
  margin-bottom: 15px;
  color: #333333;
}

.page-blog ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: #333333;
}

.page-blog li {
  margin-bottom: 8px;
  color: #333333;
}

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

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

/* --- Buttons --- */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__read-more,
.page-blog__view-all-btn,
.page-blog__faq-link {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

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

.page-blog__read-more,
.page-blog__faq-link {
  background-color: transparent;
  color: #26A9E0;
  border: 1px solid #26A9E0;
  padding: 8px 15px;
  font-size: 0.9em;
}

.page-blog__read-more:hover,
.page-blog__faq-link:hover {
  background-color: #26A9E0;
  color: #FFFFFF;
}

.page-blog__view-all-btn {
  background-color: #26A9E0;
  color: #FFFFFF;
  border: 2px solid #26A9E0;
  padding: 15px 30px;
  font-size: 1.1em;
}

.page-blog__view-all-btn:hover {
  background-color: #1a7eb3;
  border-color: #1a7eb3;
  color: #FFFFFF;
}

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding as body handles --header-offset */
  background-color: #f0f8ff; /* Light background for the section */
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden; /* Ensure content does not overflow */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-width: 1920px; /* Ensure large images fit */
  margin-bottom: 30px; /* Space between image and content */
}

.page-blog__hero-content {
  max-width: 900px;
  text-align: center;
  padding: 0 20px 60px; /* Bottom padding for content */
}

.page-blog__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive font size */
  color: #000000; /* Darker color for high contrast on light background */
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* --- Latest Posts Section --- */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #FFFFFF;
}

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  color: #333333; /* Ensure dark text on light card background */
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

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

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

.page-blog__post-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

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

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

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

.page-blog__view-all-wrapper {
  text-align: center;
}

/* --- Main Article Section --- */
.page-blog__main-article {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.page-blog__article-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 30px 0;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

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

.page-blog__faq-item {
  background-color: #f0f8ff; /* Light blue background for FAQ item */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-weight: bold;
  font-size: 1.1em;
  color: #26A9E0; /* Brand color for question */
  cursor: pointer;
  list-style: none; /* For details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* For details/summary */
}

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: "−"; /* Visually update toggle for details */
}

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

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

.page-blog__faq-answer .page-blog__faq-link {
  margin-top: 10px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }
}

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

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

  .page-blog__article-subtitle {
    font-size: 1.5em;
  }

  .page-blog__sub-subtitle {
    font-size: 1.2em;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 40px;
  }

  .page-blog__hero-content {
    padding-bottom: 40px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em) !important; /* Smaller on mobile */
  }

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

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

  /* Force full width for buttons on mobile */
  .page-blog__cta-buttons .page-blog__btn-primary,
  .page-blog__cta-buttons .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;
    padding-left: 15px;
    padding-right: 15px;
  }
  .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__post-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  .page-blog__latest-posts,
  .page-blog__main-article,
  .page-blog__faq-section {
    padding: 40px 0;
  }

  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Mobile video responsiveness - no video element in this blog page */
  /* If there were video elements, they would follow the same pattern as images */

  /* Mobile container padding and width */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__main-article,
  .page-blog__faq-section,
  .page-blog__post-card,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__post-card {
    padding: 0; /* Remove internal padding if any, relying on container */
  }

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

  .page-blog__faq-answer {
    padding: 0 20px 15px;
  }
}

/* Ensure no filter is used on images */
.page-blog img {
  filter: none;
}