/* style/blog.css */

/* --- Base Styles --- */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #ffffff; /* Assuming body background is light/white, or overridden by shared.css var(--background-color) */
}

.page-blog__section {
  padding: 60px 20px;
  background-color: #ffffff;
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: #26A9E0; /* Primary brand color for titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  margin-bottom: 30px;
}

/* --- Buttons --- */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

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

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

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0; /* Primary brand color */
  border: 2px solid #26A9E0;
}

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

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 20px;
  padding-top: 10px; /* As per instruction */
  background-color: #f0f8ff; /* Light background for hero */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 30px; /* Space between image and content */
}

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

.page-blog__hero-content {
  max-width: 800px;
  z-index: 1;
  color: #333333; /* Ensure contrast on light background */
}

.page-blog__main-title {
  font-size: clamp(2.2em, 4vw, 3.2em); /* Clamp for h1 font size */
  color: #000000;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__hero-content .page-blog__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #444444;
}

/* --- Recent Posts / Post Grid --- */
.page-blog__recent-posts {
  background-color: #f9f9f9;
}

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

.page-blog__post-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  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.15);
}

.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 consistency */
  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: 1.4em;
  color: #26A9E0;
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: bold;
}

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

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

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

.page-blog__read-more-btn {
  display: inline-block;
  color: #26A9E0;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 2px solid #26A9E0;
  padding-bottom: 3px;
  align-self: flex-start;
}

.page-blog__read-more-btn:hover {
  color: #1a8cc4;
  border-color: #1a8cc4;
}

.page-blog__button-group {
  text-align: center;
}

/* --- Categories Section --- */
.page-blog__categories {
  background-color: #26A9E0; /* Primary brand color for this section */
  color: #ffffff;
}

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

.page-blog__categories .page-blog__description {
  color: #e0f2f7;
}

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.15); /* Semi-transparent white on blue */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.page-blog__category-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  font-weight: bold;
  color: #ffffff;
}

.page-blog__category-description {
  font-size: 1em;
  color: #f0f0f0;
}

/* --- FAQ Section --- */
.page-blog__faq-section {
  background-color: #f0f8ff; /* Light blue background */
}

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

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  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-size: 1.2em;
  font-weight: bold;
  color: #26A9E0;
  cursor: pointer;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}

.page-blog__faq-question::-webkit-details-marker {
  display: none;
}

.page-blog__faq-question::marker {
  display: none;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #26A9E0;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Plus sign rotates to X */
}

.page-blog__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1.05em;
  color: #555555;
  background-color: #fcfcfc;
}

/* --- CTA Section --- */
.page-blog__cta-section {
  background-color: #f9f9f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
}

.page-blog__cta-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.page-blog__cta-content {
  flex: 1;
  min-width: 300px;
  text-align: left;
}
.page-blog__cta-content .page-blog__section-title {
  text-align: left;
}
.page-blog__cta-content .page-blog__description {
  text-align: left;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  justify-content: flex-start; /* Align buttons to the left */
}

.page-blog__cta-image-wrapper {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-blog__cta-image {
  width: 100%;
  max-width: 600px; /* Limit image size */
  height: auto;
  border-radius: 10px;
  display: block;
  object-fit: cover;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2em;
  }

  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 2.8em);
  }

  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .page-blog__cta-container {
    flex-direction: column;
    text-align: center;
  }
  .page-blog__cta-content {
    text-align: center;
  }
  .page-blog__cta-content .page-blog__section-title,
  .page-blog__cta-content .page-blog__description {
    text-align: center;
  }
  .page-blog__cta-buttons {
    justify-content: center; /* Center buttons on smaller screens */
  }
}

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

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

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

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

  /* Responsive containers for images/videos/buttons */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__hero-image-wrapper,
  .page-blog__cta-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Responsive buttons */
  .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;
  }
  
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
    overflow: hidden !important;
  }

  .page-blog__post-card {
    flex-direction: column;
  }
  .page-blog__post-image {
    height: auto; /* Allow image height to adjust */
  }

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

@media (max-width: 480px) {
  .page-blog__section-title {
    font-size: 1.5em;
  }

  .page-blog__main-title {
    font-size: clamp(1.5em, 7vw, 2.2em);
  }

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

  .page-blog__post-content {
    padding: 15px;
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__post-excerpt {
    font-size: 0.95em;
  }
}

/* Contrast fixes for specific dark backgrounds if needed, though brand color is bright */
.page-blog__dark-section {
  background-color: #26A9E0; /* Primary brand color */
  color: #ffffff;
}
.page-blog__dark-section .page-blog__section-title {
  color: #ffffff;
}
.page-blog__dark-section .page-blog__description {
  color: #f0f8ff; /* Lighter text for contrast */
}