/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--background-color, #ffffff); /* Ensure default light background */
}

/* 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 */
  background-color: #26A9E0; /* Brand primary color for hero background */
  color: #ffffff; /* White text for dark background */
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for text readability */
  display: block;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

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

.page-blog__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-blog__btn-primary {
  background-color: #EA7C07; /* Login/CTA color */
  color: #ffffff;
  border: 2px solid #EA7C07;
  margin: 10px;
}

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

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

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87b7;
  border-color: #1e87b7;
}

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

.page-blog__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand primary color */
}

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555555;
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  background-color: #ffffff; /* Light background */
  color: #333333;
}

.page-blog__posts-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;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  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: 220px;
  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.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #26A9E0; /* Brand primary color */
  line-height: 1.4;
}

.page-blog__post-meta {
  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 {
  display: inline-block;
  color: #EA7C07; /* Login/CTA color */
  font-weight: 600;
  text-decoration: none;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

/* Pagination */
.page-blog__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.page-blog__pagination-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  color: #26A9E0; /* Brand primary color */
  border: 1px solid #26A9E0;
  transition: all 0.3s ease;
}

.page-blog__pagination-link:hover,
.page-blog__pagination-link--active {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Categories Section */
.page-blog__categories-section {
  background-color: #26A9E0; /* Brand primary color */
  color: #ffffff;
  padding: 60px 20px;
}

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

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 120px;
}

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

.page-blog__category-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 5px;
}

.page-blog__category-count {
  font-size: 0.9em;
  opacity: 0.8;
}

/* CTA Section */
.page-blog__cta-section {
  background-color: #ffffff;
  color: #333333;
  padding: 60px 20px;
}

.page-blog__cta-content {
  text-align: center;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: #f8f8f8; /* Light grey background */
  color: #333333;
  padding: 60px 20px;
}

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

.page-blog__faq-item {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: 600;
  color: #26A9E0; /* Brand primary color */
  cursor: pointer;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: #eaf7ff; /* Lighter background when open */
}

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

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #EA7C07; /* Login/CTA color */
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

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

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

  .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;
    margin: 8px 0 !important; /* Adjust margin for stacked buttons */
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 0px; /* Gap handled by button margin */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__container,
  .page-blog__section,
  .page-blog__card,
  .page-blog__cta-section,
  .page-blog__categories-section,
  .page-blog__latest-posts-section,
  .page-blog__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

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

  .page-blog__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }

  .page-blog__post-image,
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .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__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }

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

@media (max-width: 480px) {
  .page-blog__hero-section {
    padding: 30px 10px;
    padding-top: 10px !important;
  }

  .page-blog__main-title {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .page-blog__container {
    padding: 30px 10px;
  }

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

  .page-blog__categories-grid {
    grid-template-columns: 1fr;
  }
}