/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-blog__section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__section-title {
  font-size: clamp(2em, 4vw, 2.8em);
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  color: #26A9E0; /* Brand color for titles */
}

.page-blog__subsection-title {
  font-size: clamp(1.5em, 3vw, 2em);
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.3;
  color: #26A9E0;
}

.page-blog__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* Color contrast specific styles */
.page-blog__dark-bg {
  background-color: rgba(38, 169, 224, 0.1); /* Slightly transparent brand color for dark sections */
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: rgba(255, 255, 255, 0.05); /* Very slight white for light sections on dark body */
  color: #ffffff;
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__subsection-title {
  color: #26A9E0;
}

.page-blog__light-bg p,
.page-blog__light-bg li {
  color: #f0f0f0;
}

.page-blog__light-bg a {
  color: #26A9E0;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  overflow: hidden;
  text-align: center;
}

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

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 100px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  color: #ffffff;
}

.page-blog__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em);
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  color: #ffffff;
}

.page-blog__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

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

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

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

.page-blog__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

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

/* Blog Post Grid */
.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__post-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #ffffff;
}

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

.page-blog__post-thumbnail {
  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.4em;
  margin-bottom: 10px;
  font-weight: bold;
  line-height: 1.3;
}

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

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

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

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

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

.page-blog__faq-image {
  max-width: 100%;
  height: auto;
  margin-bottom: 40px;
  border-radius: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: #26A9E0;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: #26A9E0;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}

.page-blog__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  color: #f0f0f0;
  line-height: 1.6;
}

.page-blog__faq-answer p {
  margin-bottom: 10px;
  color: #f0f0f0;
}

/* Conclusion Section */
.page-blog__conclusion p {
  color: #f0f0f0;
}

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

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-blog__hero-content {
    padding: 60px 15px;
    padding-top: 10px !important; /* body handles --header-offset, small top padding for hero */
  }

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

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

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

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

  .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: 5px 0 !important;
    padding: 12px 20px;
  }

  .page-blog__cta-group {
    flex-direction: column;
    gap: 10px;
  }

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

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

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

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

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section {
    padding: 0;
    min-height: 400px;
  }

  .page-blog__hero-image-wrapper {
    height: 100%;
  }

  .page-blog__faq-image {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure images in content areas are not too small */
.page-blog__content-area img,
.page-blog__post-card img {
  min-width: 200px;
  min-height: 200px;
}

/* No filter properties on images */
.page-blog img:not(.page-blog__hero-image) {
  filter: none;
}

/* Specific filter for hero image for readability */
.page-blog__hero-image {
  filter: brightness(0.5);
}

/* Ensure all content containers are responsive */
.page-blog__introduction p,
.page-blog__introduction li,
.page-blog__why-follow p,
.page-blog__why-follow li,
.page-blog__link-safety p,
.page-blog__link-safety li,
.page-blog__conclusion p {
  text-align: justify;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px; /* Limit paragraph width for readability */
}

.page-blog__introduction ul,
.page-blog__link-safety ul,
.page-blog__link-safety ol {
  list-style-position: inside;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
  padding-left: 20px;
}

.page-blog__introduction li,
.page-blog__link-safety li {
  margin-bottom: 8px;
}