/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: #26A9E0; /* Brand color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-blog__section-title--light {
  color: #FFFFFF; /* White text for dark backgrounds */
}

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

.page-blog__description--light {
  color: #f0f0f0; /* Light text for dark backgrounds */
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #FFFFFF;
  color: #333333;
}

.page-blog__hero-image {
  width: 100%;
  max-width: 1200px; /* Match container width */
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

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

/* CTA Buttons */
.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background: #EA7C07; /* Login color for primary action */
  color: #FFFFFF;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background: #d46c05;
  transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
  background: #26A9E0;
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #f8f9fa; /* Light background for contrast */
}

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

.page-blog__blog-card {
  background: #FFFFFF;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

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

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

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

.page-blog__card-title a {
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
}

.page-blog__card-title a:hover {
  text-decoration: underline;
}

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

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

.page-blog__read-more {
  color: #EA7C07;
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

.page-blog__read-more span {
  margin-left: 5px;
}

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

/* Category Section */
.page-blog__category-section {
  padding: 60px 0;
  background-color: #26A9E0; /* Brand color as dark background */
  color: #FFFFFF;
}

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

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: #FFFFFF;
  transition: background 0.3s ease, transform 0.3s ease;
}

.page-blog__category-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.page-blog__category-image {
  width: 100%;
  max-width: 180px; /* Smaller image for categories */
  height: auto;
  border-radius: 4px;
  margin-bottom: 15px;
  object-fit: cover;
  display: block;
}

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

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

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: #26A9E0;
  cursor: pointer;
  background: #eaf6fc; /* Lighter shade of brand color */
  border-bottom: 1px solid #d0e7f5;
  list-style: none; /* Remove default marker for details summary */
}

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

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #555555;
  background: #FFFFFF;
  border-top: 1px solid #e0e0e0;
}

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

/* Bottom CTA Section */
.page-blog__cta-bottom {
  padding: 80px 0;
  background-color: #26A9E0;
  color: #FFFFFF;
  text-align: center;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 2.8em);
  }

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

  .page-blog__hero-image {
    height: 450px;
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }

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

  .page-blog__hero-image {
    height: 300px;
  }

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to container */
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-blog__blog-card,
  .page-blog__category-card {
    margin-left: 15px;
    margin-right: 15px;
  }

  /* Mobile image specific rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Mobile video specific rules - No video on this page, but keeping for robustness */
  .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__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 {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
  
  .page-blog__video-section { /* If video section existed */
    padding-top: 10px !important;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: clamp(1.6em, 7vw, 2.2em);
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__description {
    font-size: 1em;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    font-size: 1em;
    padding: 12px 20px;
  }
}