/* style/blog.css */

/* General styles for the blog page, respecting the dark body background */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for the page content, contrasting with dark body bg */
  background-color: transparent; /* Rely on body background from shared.css */
}

.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: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #ffffff; /* Default for dark sections */
}

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

.page-blog__subtitle {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* Color contrast sections */
.page-blog__dark-section {
  background-color: rgba(38, 169, 224, 0.1); /* Slightly transparent primary color for dark sections */
  padding: 60px 0;
  color: #ffffff;
}

.page-blog__dark-section .page-blog__section-title {
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #ffffff; /* White background for light sections */
  padding: 60px 0;
  color: #333333; /* Dark text for light backgrounds */
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__dark-text {
  color: #333333;
}

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

.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;
  text-align: center;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
}

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

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

.page-blog__btn-secondary {
  background-color: transparent;
  color: #26A9E0; /* Primary color for text */
  border: 2px solid #26A9E0;
}

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

.page-blog__btn-small {
  padding: 10px 20px;
  font-size: 0.9em;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #0a0a0a; /* Match body background for seamless look */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Max width for the image */
  margin-bottom: 30px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  z-index: 1; /* Ensure content is above any background layers */
}

/* Recent Posts Section */
.page-blog__recent-posts {
  padding: 80px 0;
}

.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.08); /* Semi-transparent white on dark bg */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__post-image-wrapper {
  width: 100%;
  height: 220px; /* Fixed height for consistent card appearance */
  overflow: hidden;
}

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

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

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

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

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

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

.page-blog__category-link {
  color: #26A9E0;
  text-decoration: none;
}

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

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

.page-blog__read-more {
  display: inline-flex;
  align-items: center;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #1e87b5;
}

.page-blog__arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-blog__read-more:hover .page-blog__arrow {
  transform: translateX(5px);
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 80px 0;
}

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

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5; /* Light background for categories on light section */
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: #333333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

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

.page-blog__category-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-blog__category-name {
  font-size: 1.2em;
  font-weight: bold;
  color: #333333; /* Dark text on light background */
}

/* About Blog Section */
.page-blog__about-blog {
  padding: 80px 0;
}

.page-blog__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-blog__text-content {
  flex: 1;
  color: #e0e0e0;
}

.page-blog__text-content h3 {
  font-size: 1.8em;
  color: #ffffff;
  margin-bottom: 20px;
}

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

.page-blog__image-content {
  flex: 1;
  text-align: center;
}

.page-blog__about-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
}

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

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

.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 backgrounds */
  position: relative;
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
  background-color: #e0e0e0;
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #333333;
}

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

/* CTA Section (bottom) */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #26A9E0; /* Primary brand color for strong CTA */
  color: #ffffff;
}

.page-blog__cta-section .page-blog__section-title {
  color: #ffffff;
}

.page-blog__cta-section .page-blog__subtitle {
  color: #f0f0f0;
}

.page-blog__cta-section .page-blog__btn-primary {
  background-color: #EA7C07; /* Login color for strong CTA */
  border-color: #EA7C07;
}

.page-blog__cta-section .page-blog__btn-primary:hover {
  background-color: #d46f06;
  border-color: #d46f06;
}

.page-blog__cta-section .page-blog__btn-secondary {
  color: #ffffff;
  border-color: #ffffff;
}

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

/* Responsive styles */
@media (max-width: 992px) {
  .page-blog__content-wrapper {
    flex-direction: column;
  }
  .page-blog__image-content {
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .page-blog__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

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

  .page-blog__hero-section,
  .page-blog__recent-posts,
  .page-blog__categories-section,
  .page-blog__about-blog,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px;
  }

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

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

  /* Images responsive */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers holding images or content */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-image-wrapper,
  .page-blog__hero-image-wrapper,
  .page-blog__image-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons responsive */
  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  .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-left: 15px; /* Add padding to button text */
    padding-right: 15px;
  }

  /* Video responsive (if any, though not in this specific HTML yet, but for future proofing) */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-blog__video-section {
    padding-top: 10px !important; /* Small top padding for video section */
  }
}

@media (max-width: 480px) {
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__hero-content {
    padding: 0 10px;
  }
  .page-blog__faq-item summary {
    padding: 15px 20px;
    font-size: 1em;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }
  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}