/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Light text on dark body background */
  background-color: #121212; /* Inherited from body, but good to specify for containers */
}

/* Section common styles */
.page-blog__section {
  padding: 60px 0;
  position: relative;
  overflow: hidden; /* Ensure content doesn't overflow */
}

.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: 40px;
  color: #26A9E0; /* Brand color for titles */
  line-height: 1.2;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  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;
  background-color: #121212; /* Ensure dark background */
}

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

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2; /* Subtle overlay for text readability */
  display: block;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 20px;
  color: #ffffff;
}

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

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

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Ensure long words break */
  box-sizing: border-box;
  max-width: 100%; /* Ensure button doesn't overflow */
}

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

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

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

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

/* Latest Posts Section */
.page-blog__latest-posts {
  background-color: #1a1a1a; /* Slightly lighter dark background for contrast */
}

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

.page-blog__post-card {
  background-color: #222222;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

.page-blog__post-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

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

.page-blog__post-content {
  padding: 20px;
}

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

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

.page-blog__post-description {
  font-size: 1em;
  color: #f0f0f0;
}

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

/* Categories Section */
.page-blog__dark-section {
  background-color: #121212; /* Darker background for contrast */
}

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

.page-blog__category-card {
  background-color: #26A9E0; /* Brand color background */
  color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__category-card:hover {
  background-color: #1e87c0;
}

.page-blog__category-title {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-blog__category-description {
  font-size: 0.95em;
  color: #f0f0f0;
}

/* Why Choose Section */
.page-blog__why-choose {
  background-color: #1a1a1a; /* Slightly lighter dark background */
}

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

.page-blog__feature-item {
  background-color: #222222;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__feature-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-blog__feature-description {
  font-size: 1em;
  color: #f0f0f0;
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: #121212; /* Dark background for FAQ */
}

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

.page-blog__faq-item {
  background-color: #222222;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: 600;
  color: #26A9E0;
  cursor: pointer;
  background-color: #2a2a2a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* For details tag, remove default marker */
.page-blog__faq-item[open] > .page-blog__faq-question {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #ffffff;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #f0f0f0;
  background-color: #222222;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__faq-answer p {
  margin: 0;
}

/* Bottom CTA Section */
.page-blog__cta-bottom {
  background-color: #1a1a1a;
  text-align: center;
}

.page-blog__cta-bottom .page-blog__section-title {
  color: #26A9E0;
}

.page-blog__cta-description {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-blog__section {
    padding: 40px 0;
  }

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

  .page-blog__hero-section {
    padding-bottom: 40px;
    padding-top: 10px !important; /* body already handles header offset */
  }

  .page-blog__main-title {
    font-size: 2em; /* Adjusted for smaller screens */
    margin-bottom: 15px;
  }

  .page-blog__intro-text {
    font-size: 1em;
    margin-bottom: 25px;
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

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

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

  .page-blog__post-image {
    height: 180px; /* Adjusted for mobile */
  }

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

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

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

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

  .page-blog__faq-answer {
    padding: 15px 20px;
  }
  
  /* Force responsive images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  /* Ensure all containers with images/buttons/videos are responsive */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__feature-item,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Specific padding for content containers in mobile to prevent edge-to-edge content */
  .page-blog__latest-posts .page-blog__container,
  .page-blog__categories .page-blog__container,
  .page-blog__why-choose .page-blog__container,
  .page-blog__faq-section .page-blog__container,
  .page-blog__cta-bottom .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* For hero content, specific padding */
  .page-blog__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure color contrast for elements */
.page-blog p,
.page-blog li,
.page-blog__post-description,
.page-blog__category-description,
.page-blog__feature-description,
.page-blog__faq-answer p,
.page-blog__cta-description {
  color: #f0f0f0; /* Ensure light text on dark backgrounds */
}

/* Links within text */
.page-blog a {
  color: #26A9E0; /* Brand color for links */
  text-decoration: underline;
}
.page-blog a:hover {
  color: #1e87c0;
}