/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF6D6; /* Text Main */
  background-color: #0A0A0A; /* Background */
}

/* Ensure body padding-top is handled by shared.css */
/* .page-blog should not have padding-top: var(--header-offset); */

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image above, content below */
  align-items: center;
  text-align: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding as per rules */
  background: linear-gradient(180deg, #111111 0%, #0A0A0A 100%); /* Card BG to Background */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Constrain image width */
  margin-bottom: 30px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

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

.page-blog__main-title {
  color: #F2C14E; /* Primary color */
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  /* No fixed large font-size, rely on clamp if needed, otherwise browser default for H1 */
}

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

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

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button color */
  color: #111111; /* Dark text for contrast */
  border: 2px solid transparent;
  margin-right: 15px;
}

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

.page-blog__btn-secondary {
  background: transparent;
  color: #F2C14E; /* Primary color */
  border: 2px solid #F2C14E; /* Border color */
}

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

.page-blog__button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 80px 0;
  background-color: #0A0A0A; /* Background */
}

.page-blog__section-title {
  color: #F2C14E; /* Primary color */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.3;
}

.page-blog__section-description {
  color: #FFF6D6; /* Text Main */
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
  font-size: 1.05em;
}

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

.page-blog__article-card {
  background-color: #111111; /* 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;
}

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

.page-blog__article-link {
  text-decoration: none;
  display: block;
  color: inherit;
}

.page-blog__article-thumbnail {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__card-content {
  padding: 25px;
}

.page-blog__card-title {
  color: #FFD36B; /* Auxiliary color for titles */
  font-size: 1.3em;
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: bold;
}

.page-blog__article-date {
  color: #999999; /* Lighter grey for date */
  font-size: 0.9em;
  margin-bottom: 15px;
  display: block;
}

.page-blog__card-excerpt {
  color: #FFF6D6; /* Text Main */
  font-size: 0.95em;
  line-height: 1.5;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: #111111; /* Card BG */
}

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

.page-blog__faq-item {
  background-color: #0A0A0A; /* Background */
  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 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #F2C14E; /* Primary color */
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

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

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

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #FFF6D6; /* Text Main */
  line-height: 1.6;
  max-height: 0; /* Hidden by default for JS fallback */
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

/* For <details> native behavior */
.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 2000px; /* Arbitrarily large value for smooth transition */
}
.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: rgba(242, 193, 78, 0.05);
}

.page-blog__faq-item summary {
  list-style: none; /* Remove default marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit */
}

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

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

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

.page-blog__faq-answer a:hover {
  color: #F2C14E;
}

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #F2C14E; /* Primary color */
  color: #0A0A0A; /* Dark text for contrast */
}

.page-blog__cta-section.page-blog__dark-bg { /* Using this class for the background color */
  background: #111111; /* Card BG */
  color: #FFF6D6; /* Text Main */
}

.page-blog__cta-content {
  max-width: 800px;
}

.page-blog__cta-title {
  color: #FFD36B; /* Auxiliary color */
  margin-bottom: 20px;
  font-weight: bold;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 40px 0;
    padding-top: 10px !important; /* Ensure small top padding on mobile */
  }

  .page-blog__hero-content-wrapper {
    padding: 0 15px;
  }

  .page-blog__main-title {
    font-size: 2em; /* Adjust H1 size for mobile, still not fixed large */
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 10px 20px;
    font-size: 0.9em;
  }

  .page-blog__button-group {
    flex-direction: column;
    gap: 10px;
    width: 100%; /* Ensure button group takes full width */
    padding: 0 15px; /* Add padding to button group */
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    margin-right: 0;
    width: 100% !important;
    max-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;
  }

  .page-blog__latest-articles,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

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

  .page-blog__article-thumbnail {
    height: 180px; /* Adjust thumbnail height */
  }

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

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

  /* Universal mobile image/video/container rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}