/* style/blog.css */
/* Base Styles */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #ffffff; /* Assuming default white body background from shared.css */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #C91F17; /* Main brand color for titles */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-blog__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  color: #333333; /* Dark text for light gradient button for contrast */
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 100%; /* For responsive buttons */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-blog__btn-secondary {
  display: inline-block;
  background-color: #ffffff;
  color: #C91F17;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: 2px solid #C91F17;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  max-width: 100%; /* For responsive buttons */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, assuming body has padding-top from shared.css */
  padding-bottom: 60px;
  background-color: #B71C1C; /* Background color for the hero section */
  color: #FFF5E1; /* Light text for dark background */
}

.page-blog__hero-content-wrapper {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 60px 16px;
}

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

.page-blog__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive font size */
  font-weight: 800;
  color: #FFF5E1; /* Light text for dark background */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.15em;
  margin-bottom: 30px;
  color: #FFF5E1; /* Light text for dark background */
}

.page-blog__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

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

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

/* Featured Posts Section */
.page-blog__featured-posts-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

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

.page-blog__post-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

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

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

.page-blog__post-thumbnail {
  width: 100%;
  height: 200px; /* Fixed height for thumbnails */
  object-fit: cover;
}

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

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

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

.page-blog__post-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Pushes read more to bottom */
}

.page-blog__read-more {
  display: inline-block;
  color: #E53935;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #C91F17;
}

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

/* Guide Section */
.page-blog__guide-section {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-blog__guide-item {
  background-color: #fefefe;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding-bottom: 25px; /* Padding for content */
  height: 100%; /* Ensure items have equal height */
  display: flex;
  flex-direction: column;
}

.page-blog__guide-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.page-blog__guide-thumbnail {
  width: 100%;
  height: 220px; /* Fixed height for guide thumbnails */
  object-fit: cover;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px; /* Space between image and title */
}

.page-blog__guide-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__guide-title {
  font-size: 1.3em;
  font-weight: 700;
  color: #C91F17;
  margin-bottom: 10px;
  padding: 0 25px;
  line-height: 1.3;
}

.page-blog__guide-text {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  padding: 0 25px;
  flex-grow: 1;
}

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

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #fefefe;
  border-bottom: 1px solid #eee;
  list-style: none; /* For details/summary */
}

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

.page-blog__faq-question:hover {
  background-color: #f0f0f0;
}

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: 1px solid #ddd;
}

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

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

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

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #555555;
  border-top: 1px solid #eee; /* For visual separation */
  animation: fadein 0.3s ease-out;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content-wrapper {
    flex-direction: column;
    text-align: center;
    padding: 40px 16px;
  }

  .page-blog__hero-text {
    flex: none;
    width: 100%;
    text-align: center;
  }

  .page-blog__hero-image-wrapper {
    flex: none;
    width: 100%;
    margin-top: 30px;
  }

  .page-blog__cta-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* General mobile padding and max-width */
  .page-blog__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  /* Buttons */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden; /* Ensure no overflow */
  }

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

  .page-blog__hero-content-wrapper {
    padding: 30px 15px;
    gap: 20px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em); /* Adjust clamp for smaller screens */
    margin-bottom: 15px;
  }

  .page-blog__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  /* Featured Posts Section */
  .page-blog__featured-posts-section {
    padding: 40px 0;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
  }

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

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

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

  /* Guide Section */
  .page-blog__guide-section {
    padding: 40px 0;
  }

  .page-blog__guide-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
  }

  .page-blog__guide-thumbnail {
    height: 180px; /* Slightly smaller height for mobile thumbnails */
  }

  .page-blog__guide-title {
    font-size: 1.15em;
    padding: 0 20px;
  }

  .page-blog__guide-text {
    padding: 0 20px;
  }

  /* FAQ Section */
  .page-blog__faq-section {
    padding: 40px 0;
  }

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

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

  /* Universal image responsive styles for content area */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}