/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF6D6; /* Main text color on dark body background */
  background-color: transparent; /* Body background is handled by shared.css (#0A0A0A) */
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column; /* Image above text on mobile */
  align-items: center;
  text-align: center;
  padding-bottom: 40px;
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
  background: linear-gradient(135deg, #F2C14E, #FFD36B); /* Brand gradient */
  color: #111111; /* Dark text on light gradient background */
}

.page-blog__hero-content {
  max-width: 800px;
  padding: 20px;
  order: 2; /* Content below image on mobile, default */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1600px;
  overflow: hidden;
  box-sizing: border-box;
  order: 1; /* Image above content on mobile, default */
}

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

.page-blog__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive H1 font size */
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #111111; /* Dark text on light gradient background */
}

.page-blog__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #333333; /* Darker text for readability */
}

/* Buttons in Hero */
.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 15px; /* Padding for button containers */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 100%; /* Ensure buttons don't overflow */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #ffffff; /* White text on gradient button */
  border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
  background: #111111; /* Card BG color */
  color: #FFD36B; /* Glow color for text */
  border: 2px solid #3A2A12; /* Border color */
}

.page-blog__btn-secondary:hover {
  background: #3A2A12; /* Border color on hover */
  color: #ffffff;
}

/* General Section Styles */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

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

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: #FFF6D6; /* Main text color */
}

/* Latest Articles Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #0A0A0A; /* Body background color */
}

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

.page-blog__article-card {
  background-color: #111111; /* Card BG color */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
}

.page-blog__article-thumbnail {
  width: 100%;
  height: 200px; /* Fixed height for thumbnails */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-blog__article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-blog__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: #FFF6D6; /* Text Main color */
}

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

.page-blog__article-title a {
  color: #F2C14E; /* Main brand color for linked titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #FFD36B; /* Glow color on hover */
}

.page-blog__article-meta {
  font-size: 0.9em;
  color: #FFD36B; /* Glow color for meta info */
  margin-bottom: 15px;
}

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

.page-blog__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #3A2A12; /* Border color as background */
  color: #FFF6D6; /* Text Main color */
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
  align-self: flex-start;
}

.page-blog__read-more-btn:hover {
  background: #F2C14E; /* Main brand color on hover */
  color: #111111; /* Dark text on hover */
}

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

/* In-depth Guide Section */
.page-blog__in-depth-guide-section {
  padding: 60px 0;
  background-color: #111111; /* Card BG color */
}

.page-blog__guide-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__guide-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 30px;
}

.page-blog__in-depth-guide-section h3 {
  font-size: 1.8em;
  color: #F2C14E; /* Main brand color */
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-blog__in-depth-guide-section p {
  margin-bottom: 15px;
  color: #FFF6D6; /* Text Main color */
}

.page-blog__in-depth-guide-section p a {
  color: #FFD36B; /* Glow color for links */
  text-decoration: underline;
}

.page-blog__in-depth-guide-section p a:hover {
  color: #F2C14E; /* Main brand color on hover */
}

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

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background-color: #111111; /* Card BG color */
  color: #FFF6D6; /* Text Main color */
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: #3A2A12; /* Border color on hover */
}

.page-blog__faq-question h3 {
  font-size: 1.2em;
  margin: 0;
  color: #FFF6D6; /* Text Main color */
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #F2C14E; /* Main brand color */
}

.page-blog__faq-item.active .page-blog__faq-toggle {
  transform: rotate(45deg); /* Plus sign rotates to a cross/minus */
}

.page-blog__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px; /* Adjust padding for collapsed state */
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #FFF6D6; /* Text Main color */
}

.page-blog__faq-item.active .page-blog__faq-answer {
  max-height: 1000px !important; /* Use !important as required */
  padding: 15px 20px; /* Adjust padding for expanded state */
}

.page-blog__faq-answer p {
  margin-bottom: 0;
  color: #FFF6D6; /* Text Main color */
}

.page-blog__faq-answer a {
  color: #FFD36B; /* Glow color for links */
  text-decoration: underline;
}

.page-blog__faq-answer a:hover {
  color: #F2C14E; /* Main brand color on hover */
}

/* Call to Action Section (bottom) */
.page-blog__cta-section {
  padding: 60px 0;
  background-color: #111111; /* Card BG color */
  text-align: center;
}

/* Responsive Design */
@media (min-width: 769px) {
  .page-blog__hero-section {
    flex-direction: row;
    text-align: left;
    padding-top: var(--header-offset, 120px);
  }

  .page-blog__hero-content {
    order: 1;
    padding-left: 40px;
    padding-right: 20px;
    flex: 1;
  }

  .page-blog__hero-image-wrapper {
    order: 2;
    flex: 1;
  }

  .page-blog__cta-buttons {
    justify-content: flex-start;
    padding: 0;
  }

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

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: var(--header-offset, 120px) !important;
  }

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

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .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__hero-content,
  .page-blog__container,
  .page-blog__guide-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Images responsive on mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  .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__article-thumbnail {
    height: 180px;
  }

  .page-blog__faq-question {
    padding: 15px;
  }

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

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