/* Base styles for the Blog page */
.page-blog {
  font-family: Arial, sans-serif;
  color: var(--text-main-color, #FFF6D6); /* Default text color from palette */
  background-color: var(--bg-color, #0A0A0A); /* Default background from palette */
  line-height: 1.6;
  padding-bottom: 40px; /* General padding for main content */
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column; /* Image on top, text below */
  align-items: center;
  text-align: center;
  padding: 10px 20px 40px; /* Small top padding, larger bottom */
  max-width: 1200px;
  margin: 0 auto;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 10px;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.page-blog__hero-content-wrapper {
  max-width: 800px;
  margin-bottom: 20px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
  font-weight: bold;
  color: var(--text-main-color, #FFF6D6);
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: rgba(255, 246, 214, 0.8); /* Slightly lighter text */
}

/* General Section Styles */
.page-blog__section {
  padding: 40px 20px;
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: var(--text-main-color, #FFF6D6);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: rgba(255, 246, 214, 0.7);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Latest Articles Grid */
.page-blog__article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.page-blog__article-card {
  background-color: var(--card-bg-color, #111111); /* Card background from palette */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards in a row have equal height */
  display: flex;
  flex-direction: column;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

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

.page-blog__card-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to expand */
  display: flex;
  flex-direction: column;
}

.page-blog__card-category {
  display: inline-block;
  background: var(--primary-color, #F2C14E); /* Primary color for category tag */
  color: #0A0A0A; /* Dark text for contrast */
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.85em;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-blog__card-title {
  font-size: 1.4em;
  color: var(--text-main-color, #FFF6D6);
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1; /* Title can grow */
}

.page-blog__card-excerpt {
  font-size: 0.95em;
  color: rgba(255, 246, 214, 0.7);
  margin-bottom: 15px;
}

.page-blog__card-date {
  font-size: 0.8em;
  color: rgba(255, 246, 214, 0.5);
  margin-top: auto; /* Push date to bottom */
}

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

/* Primary Button */
.page-blog__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient from palette */
  color: #0A0A0A; /* Dark text for contrast */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  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, #FFD36B 0%, #F2C14E 100%);
  transform: translateY(-2px);
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: var(--card-bg-color, #111111);
  padding: 60px 20px;
}

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

.page-blog__faq-item {
  background-color: #1A1A1A; /* Slightly lighter than main background */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--border-color, #3A2A12); /* Border from palette */
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main-color, #FFF6D6);
  user-select: none;
  position: relative;
  list-style: none; /* For <summary> tag */
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Change to X or rotate for open state */
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: rgba(255, 246, 214, 0.8);
  line-height: 1.7;
}

.page-blog__faq-answer p {
  margin-bottom: 0;
}

/* CTA Section */
.page-blog__cta-section {
  background: linear-gradient(90deg, #F2C14E, #FFD36B); /* Gradient background for CTA */
  padding: 60px 20px;
  text-align: center;
}

.page-blog__cta-content .page-blog__section-title {
  color: #0A0A0A; /* Dark text on light background */
  margin-bottom: 15px;
}

.page-blog__cta-content .page-blog__section-description {
  color: rgba(0, 0, 0, 0.7); /* Dark text on light background */
  margin-bottom: 30px;
}

.page-blog__cta-content .page-blog__btn-primary {
  background: #0A0A0A; /* Dark button on light background */
  color: var(--text-main-color, #FFF6D6);
}

.page-blog__cta-content .page-blog__btn-primary:hover {
  background: #333333;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-blog__article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* General mobile adaptations */
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
    padding-bottom: 20px;
  }

  .page-blog__hero-section {
    padding: 10px 15px 30px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em);
    margin-bottom: 10px;
  }

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

  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }

  /* Section titles and descriptions */
  .page-blog__section {
    padding: 30px 0;
  }

  .page-blog__container {
    padding: 0 15px;
    max-width: 100% !important;
    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;
  }

  /* Blog Article Grid - Forced single column */
  .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .page-blog__card-excerpt {
    font-size: 0.9em;
  }

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

  /* Buttons responsive styles */
  .page-blog__btn-primary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    font-size: 1em !important;
  }

  .page-blog__view-all-button-wrapper {
    padding: 0 15px;
  }

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

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

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

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

  /* CTA Section */
  .page-blog__cta-section {
    padding: 40px 15px;
  }

  .page-blog__cta-content .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__cta-content .page-blog__section-description {
    font-size: 0.95em;
  }
}