/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #333333); /* Default to dark text for light background */
  background-color: var(--bg-color, #F5F7FA); /* Default to light background */
}

/* Ensure container has max-width for content alignment */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Section styling */
.page-blog__section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #E53935; /* Brand primary color for titles */
  font-weight: bold;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: #333333;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: #F5F7FA; /* Light background for the section */
}

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

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

.page-blog__hero-content {
  max-width: 800px;
  text-align: center;
}

.page-blog__hero-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #E53935; /* Brand primary color */
  margin-bottom: 20px;
  /* No fixed font-size for H1, rely on weight/line-height/color for hierarchy */
  /* If absolutely needed, use clamp: clamp(2.5rem, 5vw, 3.5rem) */
}

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

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* For responsiveness */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

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

/* Blog Post Grid */
.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-blog__post-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  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.1);
}

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__post-thumbnail {
  width: 100%;
  height: 225px; /* Fixed height for thumbnails */
  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.4em;
  color: #333333;
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: bold;
  flex-grow: 1; /* Make title take available space */
}

.page-blog__post-title:hover {
  color: #E53935; /* Hover effect for titles */
}

.page-blog__post-date {
  font-size: 0.9em;
  color: #666666;
  margin-bottom: 15px;
  display: block;
}

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

.page-blog__read-more {
  display: inline-flex;
  align-items: center;
  color: #E53935;
  font-weight: bold;
  font-size: 0.95em;
}

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

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

.page-blog__view-all-button {
  margin-top: 50px;
}

/* Dark Section for Featured Guides */
.page-blog__dark-section {
  background-color: #E53935; /* Primary brand color */
  color: #ffffff; /* White text for contrast */
}

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

.page-blog__dark-section .page-blog__section-description {
  color: #f0f0f0; /* Slightly off-white for description */
}

.page-blog__dark-section .page-blog__post-card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white card background */
  box-shadow: none; /* No shadow for dark background */
}

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

.page-blog__dark-section .page-blog__post-title,
.page-blog__dark-section .page-blog__post-excerpt,
.page-blog__dark-section .page-blog__post-date {
  color: #ffffff;
}

.page-blog__dark-section .page-blog__read-more {
  color: #FF5A4F; /* Accent color for read more link */
}

.page-blog__dark-section .page-blog__post-title:hover {
  color: #FF5A4F; /* Accent color on hover */
}

/* Why Choose Section */
.page-blog__why-choose {
  background-color: #F5F7FA; /* Light background */
}

.page-blog__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-blog__feature-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.page-blog__feature-item:hover {
  transform: translateY(-5px);
}

.page-blog__feature-title {
  font-size: 1.5em;
  color: #E53935;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-blog__feature-description {
  color: #555555;
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: #ffffff; /* Explicit white background for FAQ */
  padding-bottom: 80px;
}

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

.page-blog__faq-item {
  margin-bottom: 15px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background-color: #F5F7FA;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: #333333;
  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-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #E53935;
  margin-left: 15px;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−'; /* Change to minus when open */
}

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

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

/* Final CTA Section */
.page-blog__cta-section {
  padding-bottom: 80px;
}

.page-blog__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__hero-title {
    font-size: 2.8em;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .page-blog__container {
    padding: 0 15px !important; /* Ensure padding on mobile */
  }

  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* Small top padding for mobile */
  }

  .page-blog__hero-title {
    font-size: 2.2em;
  }

  .page-blog__hero-description {
    font-size: 1em;
  }

  .page-blog__hero-cta-buttons,
  .page-blog__button-group {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  /* Images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Image containers */
  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__feature-item,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent overflow from children */
  }

  .page-blog__post-grid,
  .page-blog__features-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }

  .page-blog__post-thumbnail {
    height: 180px; /* Adjust height for mobile */
  }

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

  .page-blog__faq-answer {
    padding: 15px 20px;
  }
}

/* Ensure no filter on images */
.page-blog img {
  filter: none !important;
}

/* Ensure content area images are not too small */
.page-blog__content-area img,
.page-blog__post-card img {
  min-width: 200px;
  min-height: 200px;
}