/* style/blog.css */

/* General styles for the Blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main color, chosen for contrast with body bg #B71C1C */
  background-color: transparent; /* Body background is handled by shared.css */
}

/* Container for sections */
.page-blog__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

/* Section titles */
.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #FFF5E1; /* Text Main color */
}

.page-blog__section-title--light {
    color: #FFF5E1; /* Ensures light text on darker CTA background */
}

/* Call to Action Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Ensure padding and border are included in width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
  max-width: 100%; /* For mobile responsiveness */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button custom color */
  color: #333333; /* Dark text for contrast on gold gradient */
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
  background: #D32F2F; /* Card BG color */
  color: #FFF5E1; /* Text Main color */
  border: 2px solid #F2B544; /* Border custom color */
}

.page-blog__btn-secondary:hover {
  background: #B71C1C; /* Background custom color */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

/* HERO Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, relying on body padding-top from shared.css */
  padding-bottom: 60px;
  background-color: #B71C1C; /* Background custom color */
  overflow: hidden; /* Prevent content overflow */
}

.page-blog__hero-container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  align-items: center;
  gap: 40px;
  box-sizing: border-box;
}

.page-blog__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
  text-align: left;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFF5E1; /* Text Main color */
  max-width: 600px; /* Prevent title from being too wide */
}

.page-blog__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #FFF5E1; /* Text Main color */
  max-width: 600px;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap */
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.page-blog__hero-image-wrapper {
  flex: 1 1 40%;
  min-width: 300px;
  text-align: center;
}

.page-blog__hero-image {
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #B71C1C; /* Background custom color */
}

.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: #D32F2F; /* Card BG color */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards are same height */
  display: flex;
  flex-direction: column;
}

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

.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: 20px;
  flex-grow: 1; /* Allow content to expand */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__post-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFF5E1; /* Text Main color */
  line-height: 1.3;
}

.page-blog__post-title:hover {
  color: #FFD86A; /* Highlight on hover */
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: rgba(255, 245, 225, 0.7); /* Lighter Text Main */
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: #FFF5E1; /* Text Main color */
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: #FFD86A; /* Gold color for read more link */
  font-weight: bold;
  text-decoration: none;
}

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

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

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

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

.page-blog__faq-item {
  background-color: #D32F2F; /* Card BG color */
  border: 1px solid #F2B544; /* Border custom color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: #FFF5E1; /* Text Main color */
  cursor: pointer;
  background-color: #D32F2F; /* Card BG color */
  list-style: none; /* Remove default marker for details summary */
  -webkit-touch-callout: none; /* Disable callout on iOS */
  -webkit-user-select: none; /* Disable text selection on iOS */
  -khtml-user-select: none; /* Disable text selection on Konqueror */
  -moz-user-select: none; /* Disable text selection on Firefox */
  -ms-user-select: none; /* Disable text selection on IE/Edge */
  user-select: none; /* Disable text selection */
}

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

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

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate to form an 'X' or similar */
}

.page-blog__faq-answer {
  padding: 0 25px 18px;
  font-size: 1em;
  color: #FFF5E1; /* Text Main color */
  line-height: 1.6;
}

/* CTA Section at the bottom */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #C91F17; /* Main brand color */
  text-align: center;
  overflow: hidden;
}

.page-blog__cta-container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  box-sizing: border-box;
}

.page-blog__cta-content {
  max-width: 800px;
  margin-bottom: 30px;
}

.page-blog__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: #FFF5E1; /* Text Main color */
}

.page-blog__cta-image-wrapper {
  width: 100%;
  max-width: 800px;
}

.page-blog__cta-image {
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Styles for Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* General mobile text adjustments */
  .page-blog {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-blog__container,
  .page-blog__hero-container,
  .page-blog__cta-container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-blog__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem); /* Smaller title on mobile */
    text-align: center;
  }

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

  .page-blog__hero-content {
    flex: 1 1 100%; /* Stack content vertically */
    text-align: center;
  }

  .page-blog__hero-image-wrapper {
    flex: 1 1 100%; /* Stack image vertically */
    order: -1; /* Place image above content on mobile */
  }

  /* Buttons mobile adaptation */
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 15px;
    font-size: 1em;
    margin-bottom: 10px; /* Add spacing between stacked buttons */
  }

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

  /* Section titles */
  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  /* Latest Posts Section */
  .page-blog__post-grid {
    grid-template-columns: 1fr; /* Single column for posts */
  }

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

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

  .page-blog__post-excerpt {
    font-size: 0.95em;
  }

  .page-blog__view-all-wrapper .page-blog__btn-secondary {
    width: auto !important;
    max-width: 250px !important;
    margin: 0 auto;
    display: block;
  }


  /* FAQ Section */
  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

  .page-blog__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.95em;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 60px 0;
  }

  .page-blog__cta-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  /* Universal image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}