/* style/blog.css */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Dark text for light body background */
  background-color: #ffffff; /* Body background is white */
  line-height: 1.6;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  box-sizing: border-box;
  background-color: #f8f8f8;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Max width for the image container */
  margin-bottom: 30px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box; /* Crucial for button responsiveness */
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

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

.page-blog__btn-primary:hover {
  background-color: #1e87b7;
  border-color: #1e87b7;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(38, 169, 224, 0.3);
}

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

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87b7;
  border-color: #1e87b7;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(38, 169, 224, 0.1);
}

/* Container for general content */
.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;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
  padding-top: 40px;
}

.page-blog__section-title--light {
  color: #ffffff; /* For dark sections */
}

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

.page-blog__posts-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;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  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 8px 25px 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-thumbnail {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1; /* Allows content to expand and push footer down */
  display: flex;
  flex-direction: column;
}

.page-blog__post-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #26A9E0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 0.95rem;
  color: #666666;
  margin-bottom: 15px;
  flex-grow: 1; /* Allows excerpt to take available space */
}

.page-blog__post-date {
  font-size: 0.85rem;
  color: #999999;
  margin-bottom: 10px;
  display: block;
}

.page-blog__read-more {
  font-size: 0.95rem;
  color: #26A9E0;
  font-weight: 600;
  text-decoration: underline;
  align-self: flex-start; /* Align to the start within flex column */
}

.page-blog__read-more:hover {
  color: #1e87b7;
}

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

/* About Section */
.page-blog__about-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Dark section with brand color */
  color: #ffffff;
}

.page-blog__dark-section {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-blog__about-content {
  text-align: center;
  margin-bottom: 40px;
}

.page-blog__about-section .page-blog__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.page-blog__text-block {
  font-size: 1.1rem;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__text-block--light {
  color: #f0f0f0; /* Lighter text for dark background */
}

.page-blog__about-image-wrapper {
  width: 100%;
  max-width: 600px;
  text-align: center;
}

.page-blog__about-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  display: block;
}

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

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
  border-top: 1px solid #e0e0e0;
}

.page-blog__faq-item {
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.page-blog__faq-item details {
  margin-bottom: 0;
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 15px 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #333333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 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 {
  color: #26A9E0;
}

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

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

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

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #f0f5f8;
  text-align: center;
}

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

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

  .page-blog__section-title {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px;
  }
}

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

  /* Images responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Containers for images/content */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-posts-section,
  .page-blog__about-section,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__hero-image-wrapper,
  .page-blog__about-image-wrapper,
  .page-blog__posts-grid,
  .page-blog__faq-list,
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Specific top padding for hero section */
  .page-blog__hero-section {
    padding-top: 10px !important;
  }

  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-blog__hero-content {
    padding: 0;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-thumbnail {
    height: 180px; /* Adjust height for mobile */
  }

  .page-blog__about-section .page-blog__container {
    flex-direction: column;
  }

  .page-blog__about-content {
    order: 2; /* Content below image on mobile */
    margin-bottom: 0;
  }

  .page-blog__about-image-wrapper {
    order: 1; /* Image above content on mobile */
    margin-bottom: 30px;
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
  
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    margin-right: 0;
    width: 100% !important;
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    font-size: 1rem;
    padding: 10px 15px;
  }
}