/* General styles for the Blog page content */
.page-blog {
  font-family: Arial, sans-serif;
  color: #FFF5E1; /* Text Main */
  background: #B71C1C; /* Background */
  line-height: 1.6;
}

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

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

.page-blog__hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background: #7A0E0E; /* Deep Red */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-blog__hero-image {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover; /* Default cover for desktop */
  display: block;
  min-height: 200px; /* Ensure min size */
}

.page-blog__hero-content {
  max-width: 900px;
  padding: 0 15px 40px;
  z-index: 1;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  color: #FFD86A; /* Gold-like for title */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

/* Section Titles */
.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #FFD86A; /* Gold for titles */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-blog__section-title--light {
  color: #FFD86A; /* Gold for titles on dark background */
}

/* Blog Post Grid */
.page-blog__latest-posts {
  background: #B71C1C; /* Background */
}

.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: #D32F2F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  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 8px 20px rgba(0, 0, 0, 0.4);
}

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

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

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: #FFF5E1; /* Text Main */
}

.page-blog__post-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFD86A; /* Gold */
  line-height: 1.3;
}

.page-blog__post-meta {
  font-size: 0.9rem;
  color: #F4D34D; /* Gold */
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  font-weight: 600;
  color: #FFD86A; /* Gold */
  text-decoration: underline;
}

/* In-depth Article Section */
.page-blog__in-depth-article {
  background: #7A0E0E; /* Deep Red */
  color: #FFF5E1; /* Text Main */
}

.page-blog__article-body {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.page-blog__article-body p {
  margin-bottom: 20px;
}

.page-blog__article-body strong {
  color: #FFD86A; /* Gold */
}

.page-blog__article-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  color: #FFD86A; /* Gold */
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-blog__article-body ul {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
}

.page-blog__article-body li {
  margin-bottom: 10px;
}

.page-blog__article-figure {
  margin: 30px 0;
  text-align: center;
}

.page-blog__article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto;
  min-height: 200px; /* Ensure min size */
}

.page-blog__article-figcaption {
  font-size: 0.9rem;
  color: #F4D34D; /* Gold */
  margin-top: 10px;
}

/* FAQ Section */
.page-blog__faq-section {
  background: #B71C1C; /* Background */
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #F2B544; /* Border */
  overflow: hidden;
  background: #D32F2F; /* Card BG */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #C91F17; /* Main color */
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFF5E1; /* Text Main */
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFD86A; /* Gold */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #7A0E0E; /* Deep Red */
  border-radius: 0 0 5px 5px;
  color: #FFF5E1; /* Text Main */
  font-size: 1rem;
}
.page-blog__faq-answer p {
  margin-bottom: 0;
}

/* CTA Banner Section */
.page-blog__cta-banner {
  background: linear-gradient(135deg, #C91F17 0%, #E53935 100%); /* Main colors */
  text-align: center;
  padding: 50px 0;
}

.page-blog__cta-banner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-blog__cta-banner-image {
  max-width: 500px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  min-height: 200px; /* Ensure min size */
}

.page-blog__cta-text-wrapper {
  max-width: 700px;
  color: #FFF5E1; /* Text Main */
}

.page-blog__cta-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #FFD86A; /* Gold */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__cta-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.page-blog__cta-buttons-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

/* Buttons */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent text wrapping by default for desktop */
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow in flex container */
}

.page-blog__cta-button--primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button custom color */
  color: #7A0E0E; /* Deep Red for text on gold button */
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-button--primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__cta-button--secondary {
  background: #7A0E0E; /* Deep Red */
  color: #FFD86A; /* Gold */
  border: 2px solid #FFD86A; /* Gold border */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-button--secondary:hover {
  background: #C91F17; /* Main color */
  border-color: #FFD86A;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-image img {
    object-fit: contain;
  }
}

@media (max-width: 849px) {
  .page-blog__hero-image img {
    object-fit: contain !important;
    aspect-ratio: unset !important;
  }
}

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

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

  .page-blog__main-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .page-blog__section-title {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
    margin-bottom: 30px;
  }

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

  .page-blog__post-image {
    height: 200px;
    min-height: 200px;
  }

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

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

  .page-blog__article-body {
    font-size: 1rem;
    padding: 0 10px;
  }
  
  .page-blog__article-body p {
    margin-bottom: 15px;
  }

  .page-blog__article-subtitle {
    font-size: 1.5rem;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-blog__article-figure img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    min-height: 200px;
  }

  details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
  .page-blog__faq-qtext { font-size: 1rem; }
  details.page-blog__faq-item .page-blog__faq-answer { padding: 0 15px 15px; }

  .page-blog__cta-banner {
    padding: 40px 0;
  }

  .page-blog__cta-title {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
    margin-bottom: 15px;
  }

  .page-blog__cta-description {
    font-size: 1rem;
    margin-bottom: 25px;
    padding: 0 10px;
  }

  .page-blog__cta-buttons-group {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    width: 100%; /* Ensure container takes full width */
    max-width: 100%;
    padding: 0 15px; /* Add padding to container */
    box-sizing: border-box;
  }
  
  .page-blog__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important; /* Allow text wrap */
    word-wrap: break-word !important; /* Allow text wrap */
    padding: 12px 20px; /* Adjust padding for mobile */
    font-size: 1rem;
  }

  /* General image and container responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__cta-banner-content,
  .page-blog__cta-text-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  .page-blog__latest-posts .page-blog__container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .page-blog__in-depth-article .page-blog__container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .page-blog__faq-section .page-blog__container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .page-blog__cta-banner .page-blog__container {
    padding-left: 10px;
    padding-right: 10px;
  }
}