/* style/blog.css */

/* Reset for BEM scope */
.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 */
}

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

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent dark overlay for text readability */
  border-radius: 10px;
}

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

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

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

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

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

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 80px 0;
  background-color: #0a0a0a; /* Dark background from body */
  color: #ffffff;
}

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

.page-blog__post-card {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__post-thumbnail {
  width: 100%;
  height: 200px; /* Fixed height for thumbnails */
  object-fit: cover;
  display: block;
}

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

.page-blog__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__card-title a {
  color: #26A9E0; /* Brand color for link titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

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

.page-blog__card-readmore {
  align-self: flex-start;
}

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

/* About Blog Section */
.page-blog__about-blog {
  padding: 80px 0;
  background-color: #f8f9fa; /* Light background for contrast */
  color: #333333; /* Dark text for light background */
}

.page-blog__about-blog .page-blog__section-title {
  color: #000000;
}

.page-blog__about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-blog__about-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 900px;
  text-align: justify;
  color: #333333; /* Ensure dark text on light background */
}

.page-blog__about-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Categories Section */
.page-blog__categories {
  padding: 80px 0;
  background-color: #1a1a1a; /* Slightly lighter dark background */
  color: #ffffff;
}

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 30px;
  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: 100%;
}

.page-blog__category-card:hover {
  background-color: #26A9E0; /* Brand color on hover */
  transform: translateY(-5px);
}

.page-blog__category-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-blog__category-description {
  font-size: 1rem;
  color: #e0e0e0;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: #f8f9fa; /* Light background */
  color: #333333; /* Dark text */
}

.page-blog__faq-section .page-blog__section-title {
  color: #000000;
}

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

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  background-color: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.3s ease;
}

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

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

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

.page-blog__faq-answer {
  padding: 20px;
  font-size: 1rem;
  line-height: 1.7;
  color: #555555;
  background-color: #ffffff;
}
.page-blog__faq-answer p {
    margin: 0;
    padding: 0;
    color: #555555;
}
.page-blog__faq-answer a {
    color: #26A9E0;
    text-decoration: underline;
}

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

.page-blog__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__cta-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-blog__cta-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

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

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

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

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

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

  /* General container padding */
  .page-blog__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hero Section */
  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body handles --header-offset, this is decorative */
  }

  .page-blog__hero-content {
    padding: 25px;
  }

  .page-blog__hero-title {
    font-size: 2rem;
  }

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

  /* Images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

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

  .page-blog__about-image {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Sections */
  .page-blog__latest-posts,
  .page-blog__about-blog,
  .page-blog__categories,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
  }

  .page-blog__section-description {
    font-size: 1rem;
  }

  /* Post Grid */
  .page-blog__post-grid {
    grid-template-columns: 1fr;
  }

  /* Category Grid */
  .page-blog__category-grid {
    grid-template-columns: 1fr;
  }

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

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

  /* Buttons */
  .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;
    padding: 12px 15px;
  }

  .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;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column;
  }
}