/* style/blog.css */

/* General Styling */
.page-blog {
  color: #FFF6D6; /* Text Main */
  background-color: #0A0A0A; /* Background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: 10px; /* Small top padding for the first section, body handles --header-offset */
}

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

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

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 60px;
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
  margin-bottom: 40px; /* Space between image and content */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 300px; /* Ensure a decent height even if content is short */
}

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* H1 font size with clamp */
  color: #FFD36B; /* Glow color for main title */
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__lead-text {
  font-size: 1.2em;
  color: #FFF6D6;
  margin-bottom: 30px;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button color */
  color: #111111; /* Dark text for bright button */
  border: none;
  margin: 10px;
}

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

.page-blog__btn-secondary {
  background: #111111; /* Card B G */
  color: #F2C14E; /* Main color */
  border: 2px solid #F2C14E; /* Main color border */
  margin: 10px;
}

.page-blog__btn-secondary:hover {
  background: #F2C14E;
  color: #111111;
}

/* Article Grid */
.page-blog__latest-articles,
.page-blog__deep-dives,
.page-blog__community-highlights,
.page-blog__newsletter,
.page-blog__faq,
.page-blog__cta-section {
  padding: 60px 0;
}

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

.page-blog__article-card,
.page-blog__feature-card,
.page-blog__community-card {
  background: #111111; /* Card B G */
  border: 1px solid #3A2A12; /* Border */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover,
.page-blog__feature-card:hover,
.page-blog__community-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.page-blog__card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

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

.page-blog__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #F2C14E; /* Main color */
  line-height: 1.3;
}

.page-blog__card-title a {
  color: #F2C14E;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

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

.page-blog__read-more {
  display: inline-block;
  color: #FFD36B; /* Glow color */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

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

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

/* Newsletter Form */
.page-blog__newsletter-form {
  display: flex;
  justify-content: center;
  gap: 15px;
  max-width: 600px;
  margin: 40px auto 0;
}

.page-blog__form-input {
  flex-grow: 1;
  padding: 12px 20px;
  border: 1px solid #3A2A12; /* Border */
  border-radius: 8px;
  background-color: #0A0A0A; /* Background */
  color: #FFF6D6; /* Text Main */
  font-size: 1em;
}

.page-blog__form-input::placeholder {
  color: #666;
}

/* CTA Section */
.page-blog__cta-section {
  text-align: center;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  gap: 20px;
  margin-top: 40px;
}

/* FAQ Section */
.page-blog__faq-list {
  max-width: 800px;
  margin: 40px auto 0;
}

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

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

.page-blog__faq-question:hover {
  background-color: rgba(242, 193, 78, 0.1); /* Light hover effect */
}

.page-blog__faq-question h3 {
  margin: 0;
  font-size: 1.1em;
  color: #F2C14E;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #FFD36B; /* Glow color */
  transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  color: #FFF6D6;
}

.page-blog__faq-item.active .page-blog__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 25px 25px;
}

.page-blog__faq-answer p {
  margin: 0;
  font-size: 0.95em;
  color: #FFF6D6;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-image {
    min-height: 250px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 5vw, 3em);
  }
  .page-blog__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
    padding-top: 10px !important; /* Ensure small top padding, body handles --header-offset */
  }

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

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

  .page-blog__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
  }

  .page-blog__lead-text {
    font-size: 1em;
  }

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

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

  .page-blog__article-grid,
  .page-blog__feature-grid,
.page-blog__community-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__article-card,
  .page-blog__feature-card,
  .page-blog__community-card {
    margin: 0 15px; /* Add horizontal padding to cards */
  }

  .page-blog__card-image {
    height: 180px;
  }

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

  .page-blog__newsletter-form {
    flex-direction: column;
    margin: 30px 15px 0;
  }

  .page-blog__form-input {
    margin-bottom: 10px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 10px 20px;
    font-size: 1em;
    margin: 5px 0; /* Adjust margin for vertical stack */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
    margin: 30px 15px 0;
  }

  .page-blog__faq-list {
    margin: 30px 15px 0;
  }

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

  .page-blog__faq-question h3 {
    font-size: 1em;
  }

  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .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__hero-section .page-blog__container {
    padding-left: 0;
    padding-right: 0;
  }

  .page-blog__hero-content {
    padding: 0 15px; /* Adjust padding for hero content on mobile */
  }

  /* Specific override for section padding on mobile to avoid double padding if container has it too */
  .page-blog__latest-articles,
  .page-blog__deep-dives,
  .page-blog__community-highlights,
  .page-blog__newsletter,
  .page-blog__faq,
  .page-blog__cta-section {
    padding: 40px 0; /* Adjust vertical padding */
  }
}

/* Ensure content area images are not too small */
.page-blog__article-card .page-blog__card-image,
.page-blog__feature-card .page-blog__card-image,
.page-blog__community-card .page-blog__card-image {
  min-width: 200px;
  min-height: 150px; /* Adjust based on aspect ratio */
}