/* style/blog.css */

/* Base styling for the blog page */
.page-blog {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #ffffff; /* Light text for dark body background */
  background-color: transparent; /* Body background from shared.css */
}

.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; /* Image on top, content below */
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: rgba(0, 0, 0, 0.4); /* Slightly dark overlay for readability */
}

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

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

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

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

.page-blog__description {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-blog__hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0;
  max-width: 100%; /* Ensure buttons are responsive */
  box-sizing: border-box;
  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: #1e87b7;
  border-color: #1e87b7;
}

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

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

/* Latest Posts Section */
.page-blog__latest-posts-section,
.page-blog__categories-section,
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #1a1a2e; /* Dark background from body */
  color: #ffffff;
}

.page-blog__section-title {
  font-size: 2.5em;
  color: #ffffff;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

.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.1); /* Slightly lighter card background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: #ffffff; /* Ensure text is light */
}

.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.5em;
  color: #26A9E0; /* Brand color for titles */
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: bold;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #f0f0f0;
  margin-bottom: 15px;
  line-height: 1.5;
}

.page-blog__post-date {
  font-size: 0.85em;
  color: #cccccc;
}

.page-blog__view-all-button-wrapper {
  text-align: center;
}

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

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

.page-blog__category-image {
  width: 100px;
  height: 75px; /* Adjust height for category image */
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
  display: block; /* Ensure it's a block element */
}

.page-blog__category-title {
  font-size: 1.2em;
  color: #26A9E0;
  font-weight: bold;
}

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

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

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

/* FAQ Section */
.page-blog__faq-section {
  background-color: #1a1a2e; /* Dark background */
  padding: 60px 0;
}

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15em;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-blog__faq-qtext {
  flex-grow: 1;
  color: #26A9E0; /* Brand color for question text */
}

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

.page-blog__faq-answer {
  padding: 20px;
  font-size: 1em;
  line-height: 1.6;
  color: #f0f0f0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important; /* Reset margin from desktop to prevent extra spacing */
    padding: 12px 15px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  .page-blog__section-description {
    font-size: 0.95em;
  }

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

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

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

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

  .page-blog__category-image {
    width: 80px;
    height: 60px;
  }

  .page-blog__category-title {
    font-size: 1.1em;
  }

  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-section,
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding-left: 0;
    padding-right: 0;
  }

  .page-blog__video-section {
    padding-top: 10px !important; 
  }

  .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__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}