/* style/blog.css */

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

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

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

.page-blog__section-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

.page-blog__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #22C768; /* Auxiliary color */
  border-radius: 2px;
}

.page-blog__text-block {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #A7D9B8; /* Text Secondary */
  text-align: justify;
}

.page-blog__highlight {
  color: #F2C14E; /* Gold */
  font-weight: bold;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  overflow: hidden; /* Ensure no overflow */
}

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for text readability */
}

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

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

.page-blog__description {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-blog__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(34, 199, 104, 0.4);
}

.page-blog__cta-button--large {
  padding: 18px 40px;
  font-size: 1.2rem;
}

/* Intro Section */
.page-blog__intro-image {
  display: block;
  margin: 40px auto 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Featured Categories */
.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__category-card {
  background-color: #11271B; /* Card BG */
  padding: 30px;
  border-radius: 10px;
  text-decoration: none;
  color: #F2FFF6; /* Text Main */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(34, 199, 104, 0.2);
}

.page-blog__category-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #F2C14E; /* Gold */
}

.page-blog__category-description {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
}

/* Latest Posts */
.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

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

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

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

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

.page-blog__post-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__post-title a:hover {
  color: #22C768; /* Auxiliary color */
}

.page-blog__post-meta {
  font-size: 0.9rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
}

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

.page-blog__read-more {
  display: inline-block;
  color: #22C768; /* Auxiliary color */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #F2C14E; /* Gold */
}

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

.page-blog__view-all-button {
  display: inline-block;
  padding: 12px 25px;
  background-color: #0A4B2C; /* Deep Green */
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__view-all-button:hover {
  background-color: #1E3A2A; /* Divider */
}

/* FAQ Section */
.page-blog__faq-list {
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  cursor: pointer;
  list-style: none; /* Remove default marker */
  -webkit-touch-callout: none; /* Disable text selection on iOS */
  -webkit-user-select: none; /* Disable text selection on iOS */
  user-select: none;
}

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

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

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  width: 25px;
  text-align: center;
  color: #22C768; /* Auxiliary color */
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  text-align: justify;
}

.page-blog__faq-image {
  display: block;
  margin: 40px auto 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* CTA Bottom Section */
.page-blog__cta-bottom {
  text-align: center;
  padding-bottom: 80px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__section {
    padding: 40px 0;
  }
  .page-blog__post-image {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-blog__section {
    padding: 30px 0 !important;
  }

  .page-blog__hero-section {
    min-height: 400px;
    padding-bottom: 40px;
  }

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

  .page-blog__description {
    font-size: clamp(1rem, 3vw, 1.1rem);
  }

  .page-blog__cta-button {
    padding: 12px 25px;
    font-size: 1rem;
  }

  .page-blog__cta-button--large {
    padding: 15px 30px;
    font-size: 1.1rem;
  }

  .page-blog__category-grid,
  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-image {
    height: 200px !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  /* Button responsiveness */
  .page-blog__cta-button,
  .page-blog__view-all-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__cta-bottom .page-blog__container {
    padding: 0 15px !important;
  }

  .page-blog__faq-item summary {
    padding: 15px 20px;
    font-size: 1.1rem;
  }

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

  .page-blog__hero-section {
    padding-top: 10px !important; /* body handles header offset */
  }

  .page-blog__video-section {
    padding-top: 10px !important; /* body handles header offset */
  }

}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }
  .page-blog__section-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }
  .page-blog__post-title {
    font-size: 1.2rem;
  }
  .page-blog__faq-item summary {
    font-size: 1rem;
  }
}

/* Ensure contrast for all text elements */
.page-blog h1, .page-blog h2, .page-blog h3, .page-blog h4, .page-blog h5, .page-blog h6 {
  color: #F2FFF6; /* Text Main */
}

.page-blog p, .page-blog li, .page-blog span {
  color: #A7D9B8; /* Text Secondary */
}

.page-blog__cta-button, .page-blog__view-all-button {
  color: #F2FFF6; /* Text Main for buttons */
}

.page-blog__category-card {
  color: #F2FFF6; /* Text Main for category card */
}

.page-blog__category-description {
  color: #A7D9B8; /* Text Secondary for category description */
}

.page-blog__post-title a {
  color: #F2FFF6; /* Text Main for post title link */
}

.page-blog__read-more {
  color: #22C768; /* Auxiliary color for read more */
}

.page-blog__faq-item summary {
  color: #F2FFF6; /* Text Main for FAQ question */
}

.page-blog__faq-toggle {
  color: #22C768; /* Auxiliary color for FAQ toggle */
}

.page-blog__faq-answer {
  color: #A7D9B8; /* Text Secondary for FAQ answer */
}