/* style/blog.css */

/* Global page-blog styles for dark background and light text */
.page-blog {
  background-color: var(--background-color, #08160F); /* Default to the custom background color if --background-color is not set */
  color: var(--text-main, #F2FFF6); /* Default to the custom main text color */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Ensure headings inherit light color or are explicitly set */
.page-blog h1,
.page-blog h2,
.page-blog h3,
.page-blog h4,
.page-blog h5,
.page-blog h6 {
  color: var(--text-main, #F2FFF6);
  line-height: 1.2;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  padding: 60px 0; /* General padding, body handles top offset */
  padding-top: 10px; /* Small top padding for first section */
  text-align: center;
  overflow: hidden; /* Ensure nothing overflows */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Constrain image width for large screens */
  margin-bottom: 30px; /* Space between image and text */
}

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

.page-blog__hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 size */
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__description {
  font-size: 1.2rem;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff; /* White text for primary button */
  box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
}

.page-blog__btn-secondary {
  background: transparent;
  color: var(--primary-color, #11A84E); /* Primary color text for secondary button */
  border: 2px solid var(--primary-color, #11A84E);
}

.page-blog__btn-secondary:hover {
  background: var(--primary-color, #11A84E);
  color: #ffffff;
}

/* Articles Section */
.page-blog__articles-section {
  padding: 60px 0;
  background-color: var(--background-color, #08160F);
}

.page-blog__section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 40px;
  color: var(--text-main, #F2FFF6);
}

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

.page-blog__article-card {
  background-color: var(--card-bg, #11271B);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure card content fills the height */
}

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

.page-blog__article-content {
  padding: 25px;
  flex-grow: 1; /* Allow content to take available space */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__article-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text-main, #F2FFF6);
  line-height: 1.3;
}

.page-blog__article-excerpt {
  font-size: 1rem;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 15px;
  flex-grow: 1; /* Allow excerpt to grow */
}

.page-blog__article-date {
  font-size: 0.9rem;
  color: var(--text-secondary, #A7D9B8);
  opacity: 0.8;
}

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

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: var(--background-color, #08160F);
}

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

.page-blog__faq-item {
  background-color: var(--card-bg, #11271B);
  border: 1px solid var(--border-color, #2E7A4E);
  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.15rem;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  cursor: pointer;
  background-color: transparent;
  position: relative;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

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

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  margin-left: 20px;
  color: var(--gold-color, #F2C14E);
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' or similar */
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: var(--text-secondary, #A7D9B8);
  line-height: 1.6;
  max-height: 0; /* For JS-controlled collapse */
  overflow: hidden;
  transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Adjust as needed for content */
  padding-top: 15px;
}

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

.page-blog__text-link {
  color: var(--gold-color, #F2C14E); /* Gold color for text links */
  text-decoration: underline;
}

.page-blog__text-link:hover {
  color: #ffffff; /* Lighter on hover */
}


/* --- Responsive Styles --- */

/* Tablet and Mobile */
@media (max-width: 1024px) {
  .page-blog__hero-section {
    padding: 40px 0;
    padding-top: 10px;
  }
  .page-blog__main-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .page-blog__description {
    font-size: 1.1rem;
  }
  .page-blog__article-image {
    height: 180px; /* Adjust height for smaller screens */
  }
}

/* Mobile Specific */
@media (max-width: 768px) {
  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__hero-image-wrapper,
  .page-blog__article-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Video (if any) - applying general video responsive rules */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-blog__video-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
  }

  /* Buttons */
  .page-blog__cta-button,
  .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; /* Add padding to button itself for text */
    padding-right: 15px;
  }
  
  .page-blog__hero-content .page-blog__cta-button {
    margin: 0 auto; /* Center button if it's the only one */
  }

  .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;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-blog__cta-buttons {
    display: flex;
    flex-direction: column; /* Stack buttons vertically on mobile */
  }

  .page-blog__hero-section {
    padding: 30px 0;
    padding-top: 10px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  .page-blog__description {
    font-size: 1rem;
  }
  .page-blog__article-image {
    height: 160px;
  }
  .page-blog__article-title {
    font-size: 1.2rem;
  }
  .page-blog__article-excerpt {
    font-size: 0.9rem;
  }
  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    font-size: 0.95rem;
    padding: 0 20px 15px;
  }
}

/* Content area image size enforcement */
.page-blog__articles-section img,
.page-blog__hero-section img {
    min-width: 200px; /* Ensure images are not too small */
    min-height: 200px; /* Ensure images are not too small */
}

/* Override for specific card images that might be smaller due to aspect ratio, but still meet minimum overall dimensions */
.page-blog__article-image {
    min-width: 200px;
    min-height: 160px; 
    height: auto; /* Allow auto height on desktop for flexibility */
}
@media (max-width: 768px) {
  .page-blog__article-image {
    min-height: 200px !important; /* Force min-height on mobile */
    height: 200px !important; /* Fix height for mobile cards to meet min requirement */
  }
}