/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default to Text Main if var not set */
  background-color: var(--background-color, #08160F); /* Default to Background if var not set */
}

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

/* Section styling */
.page-blog__section {
  padding: 60px 0;
}

.page-blog__section--dark-bg {
  background-color: #08160F; /* Background */
  color: #F2FFF6; /* Text Main */
}

.page-blog__section--light-bg {
  background-color: #f8f9fa; /* Light background for contrast */
  color: #333333; /* Dark text for contrast */
}

/* Hero section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 60px 0;
  background-color: #08160F;
  color: #F2FFF6;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 30px;
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #F2FFF6;
  margin-bottom: 20px;
}

.page-blog__intro-text {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #A7D9B8; /* Text Secondary */
}

/* Headings */
.page-blog__heading {
  font-size: 2.5em;
  font-weight: 700;
  color: inherit;
  margin-bottom: 30px;
  text-align: center;
}

.page-blog__sub-heading {
  font-size: 1.8em;
  font-weight: 600;
  color: inherit;
  margin-top: 40px;
  margin-bottom: 20px;
}

/* Paragraphs and lists */
.page-blog p {
  margin-bottom: 1em;
}

.page-blog strong {
  color: #22C768;
}

.page-blog__step-list,
.page-blog__troubleshoot-list {
  list-style: decimal;
  margin-left: 20px;
  margin-bottom: 20px;
}

.page-blog__troubleshoot-list {
  list-style: disc;
}

.page-blog__step-item,
.page-blog__troubleshoot-item {
  margin-bottom: 10px;
}

/* Images */
.page-blog__image-full-width {
  width: 100%;
  height: auto;
  display: block;
  margin: 40px 0;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-blog__image-centered {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 40px auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

/* Call to Action Buttons */
.page-blog__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 30px;
  justify-content: flex-start;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  text-align: center;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: none;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #22C768;
  border: 2px solid #22C768;
}

.page-blog__btn-secondary:hover {
  background-color: #22C768;
  color: #ffffff;
}

.page-blog__btn-primary--large,
.page-blog__btn-secondary--large {
  padding: 18px 35px;
  font-size: 1.1em;
}

/* FAQ Section */
.page-blog__faq-list {
  margin-top: 30px;
}

.page-blog__faq-item {
  background-color: #11271B; /* Card BG */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #F2FFF6; /* Text Main */
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
  list-style: none;
  color: #F2FFF6;
}

.page-blog__faq-question::-webkit-details-marker {
  display: none;
}

.page-blog__faq-question:hover {
  background-color: rgba(34, 199, 104, 0.1);
}

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  color: #A7D9B8; /* Text Secondary */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-image {
    max-height: 500px;
  }

  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 2.5em); /* Use clamp for H1 */
  }

  .page-blog__heading {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
    padding-bottom: 40px;
  }

  .page-blog__hero-image {
    max-height: 300px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 6vw, 2.2em) !important; /* Adjust clamp for mobile H1 */
  }

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

  .page-blog__heading {
    font-size: 1.8em;
  }

  .page-blog__sub-heading {
    font-size: 1.4em;
  }

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

  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
    flex-wrap: wrap !important;
  }

  .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;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Force images to be responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
  }

  .page-blog__hero-image-wrapper,
  .page-blog__image-full-width,
  .page-blog__image-centered {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

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