/* style/blog.css */

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom */
  background-color: #f0f8ff; /* Light background for hero section */
  text-align: center;
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-blog__hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 20px;
}

.page-blog__hero-content {
  max-width: 900px;
  padding: 0 20px;
  z-index: 1; /* Ensure text is above image if any overlap */
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size */
  font-weight: bold;
  color: #26A9E0; /* Brand color for main title */
  margin-bottom: 15px;
  line-height: 1.2;
}

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

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

/* General Section Styling */
.page-blog__section {
  padding: 60px 0;
  background-color: #ffffff;
}

.page-blog__section:nth-of-type(even) {
  background-color: #f9f9f9;
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box; /* Ensure padding is included in width */
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  box-sizing: border-box; /* Include padding in width */
  max-width: 100%; /* Ensure button doesn't overflow */
  text-align: center;
}

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

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

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

.page-blog__btn-secondary:hover {
  background-color: #e0f2ff;
  color: #1f8ac9;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  background-color: #f9f9f9;
}

.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: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-blog__post-title a {
  color: #333333;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #26A9E0;
}

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

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

.page-blog__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-blog__read-more:hover {
  text-decoration: underline;
  color: #1f8ac9;
}

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

/* Featured Topics Section */
.page-blog__featured-topics {
  background-color: #ffffff;
}

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

.page-blog__topic-card {
  background-color: #f0f8ff; /* Light blue background for topic cards */
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__topic-icon {
  width: 100%;
  max-width: 150px; /* Constrain icon size */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-blog__topic-title {
  font-size: 1.3em;
  margin-bottom: 10px;
}

.page-blog__topic-title a {
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__topic-title a:hover {
  color: #1f8ac9;
  text-decoration: underline;
}

.page-blog__topic-description {
  font-size: 0.95em;
  color: #555555;
}

/* CTA Section */
.page-blog__cta-section {
  background-color: #26A9E0; /* Brand primary color for dark background */
  color: #ffffff; /* White text for dark background */
  text-align: center;
  padding: 80px 0;
}

.page-blog__cta-section .page-blog__section-title {
  color: #ffffff; /* Override for dark background */
  margin-bottom: 20px;
}

.page-blog__cta-section .page-blog__description {
  color: #e0f2ff; /* Lighter text for description on dark background */
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.page-blog__cta-section .page-blog__btn-primary {
  background-color: #ffffff;
  color: #26A9E0;
  border-color: #ffffff;
}

.page-blog__cta-section .page-blog__btn-primary:hover {
  background-color: #e0f2ff;
  color: #1f8ac9;
  border-color: #e0f2ff;
}

.page-blog__cta-section .page-blog__btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.page-blog__cta-section .page-blog__btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

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

.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;
  transition: all 0.3s ease;
}

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  outline: none;
  list-style: none; /* Hide default marker */
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
  background-color: #f5f5f5;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-blog__faq-qtext {
  flex-grow: 1;
  margin-right: 15px;
}

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate to form an 'x' or '-' */
}

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

/* Dark background classes for contrast fix */
.page-blog__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-blog__dark-bg .page-blog__section-title,
.page-blog__dark-bg .page-blog__description {
  color: #ffffff;
}

/* Responsive design */
@media (max-width: 992px) {
  .page-blog__hero-content {
    max-width: 700px;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-blog__hero-image {
    max-height: 400px;
  }

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

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

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    width: 100%;
    padding: 0 15px; /* Add padding to container */
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 10px; /* Space between stacked buttons */
  }

  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px !important; /* Force padding for mobile containers */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

  .page-blog__post-grid,
  .page-blog__topic-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }

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

  .page-blog__post-title {
    font-size: 1.2em;
  }

  .page-blog__topic-icon {
    max-width: 120px;
  }

  .page-blog__cta-section {
    padding: 60px 0;
  }

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

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

  /* Image responsiveness for all images in content area */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Video responsiveness (if any) */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__video-section {
    padding-top: 10px !important; /* Small top padding, not var(--header-offset) */
  }
}

/* Ensure content area images are not too small */
.page-blog__post-thumbnail,
.page-blog__topic-icon {
  min-width: 200px;
  min-height: 200px;
}