/* 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 backgrounds */
  background-color: var(--bg-color, #ffffff); /* Inherit from shared or default to white */
}

/* Color contrast specific classes */
.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

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

.page-blog__section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
  color: inherit; /* Inherit from parent section */
}

.page-blog__sub-heading {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #26A9E0;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding */
  background-color: #f0f0f0;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  background-color: #ffffff; /* Ensure readability */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: -80px; /* Overlap slightly for visual effect */
  position: relative;
  z-index: 1;
}

.page-blog__main-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 20px;
  color: #26A9E0;
  line-height: 1.2;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  margin: 5px;
  max-width: 100%;
  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: #1e87c2;
  border-color: #1e87c2;
}

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

.page-blog__btn-secondary:hover {
  background-color: #f0f8ff;
  color: #1e87c2;
  border-color: #1e87c2;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 40px;
}

/* Why Follow Section */
.page-blog__why-follow-section {
  padding: 60px 0;
  text-align: center;
}

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

.page-blog__grid-item {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__item-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 20px;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__item-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #26A9E0;
  text-align: center;
}

.page-blog__item-description {
  font-size: 1rem;
  color: #555555;
  text-align: center;
}

/* Featured Topics Section */
.page-blog__featured-topics {
  padding: 60px 0;
  text-align: center;
}

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

.page-blog__content-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  color: #333333;
  text-align: left;
}

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

.page-blog__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 15px 15px 10px 15px;
  color: #26A9E0;
}

.page-blog__card-description {
  font-size: 0.95rem;
  color: #555555;
  padding: 0 15px 15px 15px;
  flex-grow: 1;
}

.page-blog__read-more-link {
  display: inline-block;
  margin: 0 15px 15px 15px;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
}

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

/* Registration Guide Section */
.page-blog__registration-guide {
  padding: 60px 0;
}

.page-blog__content-area {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: left;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  text-align: center;
}

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #26A9E0;
  cursor: pointer;
  background-color: #f0f8ff;
  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.5rem;
  font-weight: 700;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 15px 25px 20px 25px;
  font-size: 1rem;
  color: #555555;
  background-color: #ffffff;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  text-align: center;
}

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

.page-blog__post-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  color: #333333;
  text-decoration: none;
  text-align: left;
}

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

.page-blog__post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__post-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 15px 15px 10px 15px;
  color: #26A9E0;
}

.page-blog__post-meta {
  font-size: 0.9rem;
  color: #888888;
  margin: 0 15px 10px 15px;
}

.page-blog__post-excerpt {
  font-size: 0.95rem;
  color: #555555;
  padding: 0 15px 15px 15px;
  flex-grow: 1;
}

.page-blog__view-all-button-wrapper {
  margin-top: 40px;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__cta-description {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -60px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }
  .page-blog__section-title {
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .page-blog__hero-section {
    padding: 40px 0 20px 0;
  }

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

  .page-blog__hero-content {
    margin-top: -40px;
    padding: 30px 15px;
    margin-left: 15px;
    margin-right: 15px;
  }

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

  .page-blog__subtitle {
    font-size: 1rem;
  }

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

  .page-blog__grid-layout,
  .page-blog__content-grid,
  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__grid-item,
  .page-blog__content-card,
  .page-blog__post-card {
    padding: 20px;
    margin-left: 15px;
    margin-right: 15px;
  }

  .page-blog__item-title,
  .page-blog__card-title,
  .page-blog__post-title {
    font-size: 1.1rem;
  }

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

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

  /* Image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Video responsiveness (if any, though none explicitly generated for this page) */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Containers for images/videos/buttons */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__grid-item,
  .page-blog__content-card,
  .page-blog__post-card,
  .page-blog__hero-image-wrapper,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .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;
    overflow: hidden !important; /* Prevent content overflow */
  }
  
  /* Specific padding for hero content, as it has negative margin */
  .page-blog__hero-content {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Buttons responsiveness */
  .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-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* Hero section padding for mobile to not be too large, body handles header offset */
  .page-blog__hero-section {
    padding-top: 10px !important; 
  }
}

@media (max-width: 480px) {
  .page-blog__hero-content {
    margin-top: -30px;
  }
  .page-blog__main-title {
    font-size: clamp(1.4rem, 7vw, 1.8rem);
  }
  .page-blog__cta-description {
    font-size: 1rem;
  }
}

/* Ensure min-width for images in content areas */
.page-blog__hero-image, 
.page-blog__item-image, 
.page-blog__card-image, 
.page-blog__post-image {
  min-width: 200px;
  min-height: 200px;
}

/* No filter on images */
.page-blog img {
  filter: none; 
}