/* style/blog.css */
/* 
  Body background is #0a0a0a (dark).
  Main text color for .page-blog should be #ffffff.
  Sections with light background (e.g., .page-blog__light-bg) should have dark text (e.g., #333333).
  Sections with dark background (e.g., .page-blog__dark-section) should have light text (e.g., #ffffff).
*/

.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 */
}

/* Base container for content */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

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

.page-blog__hero-image-wrapper {
    width: 100%;
    height: auto;
    overflow: hidden;
}

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

.page-blog__hero-content {
  background-color: #ffffff; /* Light background for content overlay */
  color: #333333; /* Dark text for light background */
  padding: 40px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: -80px; /* Overlap with image slightly */
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
}

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

.page-blog__description {
  font-size: 1.1em;
  margin-bottom: 30px;
}

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

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

.page-blog__btn-primary {
  background-color: #26A9E0; /* Brand primary color */
  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; /* Brand primary color */
  border: 2px solid #26A9E0;
}

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

/* Section Titles */
.page-blog__section-title {
  font-size: 2.2em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* Inherit color from parent section */
}

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

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

.page-blog__post-card {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter card background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have consistent height */
  display: flex;
  flex-direction: column;
}

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

.page-blog__post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-blog__post-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent image display */
  object-fit: cover;
  display: block;
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to fill available space */
  display: flex;
  flex-direction: column;
}

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

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #e0e0e0;
  margin-bottom: 15px;
  flex-grow: 1; /* Push meta to bottom */
}

.page-blog__post-meta {
  font-size: 0.85em;
  color: #aaaaaa;
  display: block;
  margin-top: auto; /* Aligns to bottom */
}

.page-blog__view-all-button-container {
  text-align: center;
  margin-top: 40px;
}

/* Categories Section */
.page-blog__categories-section {
  padding: 80px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text */
}

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

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333333;
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__category-image {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 5px;
  margin-bottom: 15px;
  display: block;
}

.page-blog__category-name {
  font-size: 1.1em;
  font-weight: 600;
  color: #26A9E0;
}

/* Featured Article Section */
.page-blog__featured-article {
  padding: 80px 0;
  background-color: #0a0a0a; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-blog__article-spotlight {
  display: flex;
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__article-image {
  width: 100%;
  height: auto;
  max-height: 450px; /* Limit height for featured image */
  object-fit: cover;
  display: block;
}

.page-blog__article-content {
  padding: 30px;
}

.page-blog__article-title {
  font-size: 2em;
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-blog__article-meta {
  font-size: 0.9em;
  color: #aaaaaa;
  margin-bottom: 20px;
}

.page-blog__article-excerpt {
  font-size: 1.05em;
  color: #e0e0e0;
  margin-bottom: 30px;
}

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

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

.page-blog__faq-item {
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: 600;
  color: #26A9E0;
  cursor: pointer;
  background-color: #eaf7fd; /* Lighter brand color for question background */
  user-select: none;
  list-style: none; /* Hide default marker for details summary */
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' or similar */
}

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

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

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

.page-blog__cta-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.2em;
  max-width: 800px;
  margin-bottom: 30px;
}

.page-blog__cta-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Responsive Design */
@media (min-width: 769px) {
  .page-blog__featured-article .page-blog__article-spotlight {
    flex-direction: row;
    text-align: left;
  }

  .page-blog__featured-article .page-blog__article-image {
    width: 60%;
    height: auto;
    max-height: none;
  }

  .page-blog__featured-article .page-blog__article-content {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .page-blog__cta-banner .page-blog__container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .page-blog__cta-banner .page-blog__cta-content {
    flex: 1;
    text-align: left;
  }

  .page-blog__cta-banner .page-blog__cta-image {
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-content {
    margin-top: -40px; /* Adjust overlap for mobile */
    padding: 30px 15px;
  }

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

  .page-blog__description {
    font-size: 1em;
  }

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

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

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

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

  .page-blog__category-card {
    padding: 15px;
  }

  .page-blog__article-title {
    font-size: 1.6em;
  }

  .page-blog__cta-title {
    font-size: 2em;
  }

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

  /* Images responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers for images, videos, buttons */
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__post-card,
  .page-blog__categories-section,
  .page-blog__category-card,
  .page-blog__featured-article,
  .page-blog__article-spotlight,
  .page-blog__faq-section,
  .page-blog__faq-item,
  .page-blog__cta-banner,
  .page-blog__cta-content,
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow for content areas */
  }

  /* Specific padding adjustments for main content areas */
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__categories-section,
  .page-blog__featured-article,
  .page-blog__faq-section,
  .page-blog__cta-banner {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding for hero */
  }

  /* Button specific mobile adjustments */
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: calc(100% - 30px) !important; /* Account for padding within the button itself */
  }

  .page-blog__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
  }
}