/* style/blog.css */
/* 
  Body padding-top is handled by shared.css with var(--header-offset).
  This page must NOT add another padding-top with this variable.
  First section (e.g., hero or video) should only have a small decorative top padding (e.g., 10px).
*/

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small decorative top padding */
  background-color: #08160F; /* Background */
  overflow: hidden; /* Ensure content does not overflow */
}

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

.page-blog__hero-content {
  max-width: 900px;
  z-index: 1;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.15rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Section Header */
.page-blog__section-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-blog__section-description {
  font-size: 1.1rem;
  color: #A7D9B8; /* Text Secondary */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Video Section */
.page-blog__video-section {
  padding: 80px 20px;
  background-color: #08160F; /* Background */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__video-container {
  width: 100%; /* Desktop width: 100% and max-width must be present */
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  position: relative;
  background-color: #000;
}

.page-blog__video-link {
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  cursor: pointer;
}

.page-blog__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Articles Section */
.page-blog__articles-section {
  padding: 80px 20px;
  background-color: #08160F; /* Background */
}

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

.page-blog__article-card {
  background-color: #11271B; /* Card BG */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
}

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

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

.page-blog__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: #F2FFF6; /* Text Main */
}

.page-blog__article-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.3;
  color: #F2FFF6; /* Text Main */
}

.page-blog__article-title a {
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #2AD16F; /* Lighter green for hover */
}

.page-blog__article-excerpt {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #A7D9B8; /* Text Secondary */
  margin-top: auto;
}

.page-blog__read-more {
  color: #2AD16F; /* Lighter green */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #57E38D; /* Glow */
  text-decoration: underline;
}

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

/* CTA Section */
.page-blog__cta-section {
  background-color: #11271B; /* Card BG */
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 1200px;
  margin: 80px auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__cta-content {
  max-width: 700px;
  margin-bottom: 30px;
}

.page-blog__cta-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
  font-weight: 700;
}

.page-blog__cta-description {
  font-size: 1.1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
}

.page-blog__cta-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 20px;
  background-color: #08160F; /* Background */
}

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  color: #F2FFF6; /* Text Main */
  background-color: #11271B; /* Card BG */
  transition: background-color 0.3s ease;
  list-style: none; /* Remove default marker for <summary> */
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: #1E3A2A; /* Deep Green for open state */
}

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

.page-blog__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  color: #2AD16F; /* Lighter green */
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
  color: #57E38D; /* Glow */
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  max-height: 0; /* Hidden by default for custom JS implementation, <details> handles this natively */
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

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

.page-blog__faq-answer p {
  margin: 0;
  color: #A7D9B8; /* Text Secondary */
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Ensure padding is included in width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #F2FFF6; /* Text Main */
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #57E38D 0%, #2AD16F 100%); /* Lighter gradient on hover */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #2AD16F; /* Lighter green */
  border: 2px solid #2AD16F; /* Lighter green border */
}

.page-blog__btn-secondary:hover {
  background-color: #2AD16F; /* Lighter green background on hover */
  color: #F2FFF6; /* Text Main */
}

/* 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 15px;
    padding-top: 10px !important;
  }

  .page-blog__main-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .page-blog__description {
    font-size: 1rem;
  }

  .page-blog__section-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .page-blog__section-description {
    font-size: 0.95rem;
  }

  .page-blog__video-section,
  .page-blog__articles-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 15px;
  }

  .page-blog__video-container,
  .page-blog__article-card,
  .page-blog__cta-section,
  .page-blog__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important; /* Remove container specific padding */
    padding-right: 0 !important; /* Remove container specific padding */
  }
  
  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Mobile video responsiveness */
  .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 !important;
    padding-right: 15px !important;
    overflow: hidden !important;
  }
  .page-blog__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile button responsiveness */
  .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 !important; /* Add internal padding for text */
    padding-right: 15px !important; /* Add internal padding for text */
  }
  .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 !important;
    padding-right: 15px !important;
    flex-wrap: wrap !important;
    gap: 10px; /* Space between buttons if they wrap */
    display: flex; /* Ensure flex context for wrap */
    flex-direction: column; /* Stack buttons vertically on mobile */
  }
  .page-blog__cta-section {
    flex-direction: column;
    margin: 40px auto;
  }
  .page-blog__cta-image {
    order: -1; /* Image above content on mobile */
    margin-bottom: 20px;
  }
  .page-blog__faq-question {
    font-size: 1.1rem;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px;
  }
}

/* Ensure text colors are maintained for links within content */
.page-blog a {
  color: #2AD16F; /* Lighter green for general links */
  text-decoration: underline;
}
.page-blog a:hover {
  color: #57E38D; /* Glow on hover */
}

/* Specific contrast fixes if needed */
.page-blog__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-blog__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}