/* style/blog.css */
/* Body background is dark (#000000), so content text should be light by default. */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background: #000000; /* Ensure main content area respects body background */
}

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image then text */
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom padding */
  text-align: center;
  overflow: hidden; /* Ensure content doesn't spill */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 30px; /* Space between image and text */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 300px; /* Ensure images are not too small */
}

.page-blog__hero-content {
  max-width: 900px;
  padding: 0 20px;
  color: #ffffff;
}

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

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 10px;
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
}

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

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

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

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

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff; /* Default to light for dark body */
}

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: #f0f0f0; /* Default to light for dark body */
}

/* Section specific background/text colors for contrast */
.page-blog__light-bg {
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text for light background */
  padding: 60px 0;
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__section-description,
.page-blog__light-bg .page-blog__post-title,
.page-blog__light-bg .page-blog__post-excerpt,
.page-blog__light-bg .page-blog__post-date,
.page-blog__light-bg .page-blog__faq-qtext,
.page-blog__light-bg .page-blog__faq-answer p {
  color: #333333; /* Ensure dark text on light background */
}

.page-blog__dark-bg {
  background-color: #26A9E0; /* Brand primary color */
  color: #ffffff; /* White text for brand color background */
  padding: 60px 0;
}

.page-blog__dark-bg .page-blog__section-title,
.page-blog__dark-bg .page-blog__section-description,
.page-blog__dark-bg .page-blog__category-name {
  color: #ffffff; /* Ensure white text on brand color background */
}


/* Latest Posts Section */
.page-blog__posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-blog__post-card {
  background-color: #f8f8f8; /* Light background for cards on light section */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  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: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-height: 200px; /* Min size requirement */
}

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

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  margin-bottom: 15px;
  flex-grow: 1; /* Allows excerpt to take available space */
}

.page-blog__post-date {
  font-size: 0.85em;
  color: #666;
  text-align: right;
  display: block;
}

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

/* Categories Section */
.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  text-align: center;
}

.page-blog__category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
  border-radius: 10px;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

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

.page-blog__category-icon {
  width: 200px; /* Display width for category icons */
  height: 150px; /* Display height for category icons */
  object-fit: contain;
  margin-bottom: 10px;
  min-width: 200px; /* Ensure actual image is large, display size can be smaller */
  min-height: 150px; /* Ensure actual image is large */
}

.page-blog__category-name {
  font-weight: bold;
  font-size: 1.1em;
}

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

.page-blog__faq-item {
  background-color: #f8f8f8; /* Light background for FAQ items */
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #333333; /* Dark text for light background */
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-blog__faq-qtext {
  flex-grow: 1;
  padding-right: 15px;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #26A9E0; /* Brand color for toggle */
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #555555; /* Slightly darker text for answer */
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(1.8em, 5vw, 3em);
  }

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

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

  .page-blog__hero-section {
    padding: 10px 0 40px 0;
  }

  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-blog__hero-content {
    padding: 0 15px;
  }

  .page-blog__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding: 12px 15px !important;
    margin: 5px 0 !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

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

  .page-blog__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column for posts */
    gap: 20px;
  }

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

  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Smaller categories grid */
  }

  .page-blog__category-item {
    padding: 15px 5px;
  }

  .page-blog__category-icon {
    width: 150px; /* Adjusted display width for category icons on mobile */
    height: 100px; /* Adjusted display height for category icons on mobile */
  }

  .page-blog__faq-item summary {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }
  
  /* Mobile image and container 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__hero-section,
.page-blog__latest-posts,
.page-blog__categories,
.page-blog__faq-section,
.page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-section {
    padding-top: 10px !important; /* body already has padding-top */
  }
}

@media (max-width: 480px) {
  .page-blog__category-grid {
    grid-template-columns: 1fr; /* Stack categories on very small screens */
  }
}