/* style/blog.css */

/* Base styles and container */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color for dark body background */
  background-color: var(--background, #08160F);
}

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

/* Section spacing and colors */
.page-blog__hero-section,
.page-blog__introduction-section,
.page-blog__featured-topics,
.page-blog__latest-articles,
.page-blog__promotions-section,
.page-blog__faq-section,
.page-blog__conclusion-section {
  padding: 60px 0;
  box-sizing: border-box;
}

.page-blog__dark-bg {
  background-color: var(--background, #08160F);
  color: var(--text-main, #F2FFF6);
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: var(--text-main-dark, #333333);
}

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 700px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

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

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-blog__cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  min-width: 120px;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff; /* Explicit white for contrast */
  border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
  background: var(--card-bg, #11271B);
  color: var(--text-main, #F2FFF6);
  border: 2px solid var(--border, #2E7A4E);
}

.page-blog__btn-secondary:hover {
  background: var(--deep-green, #0A4B2C);
  color: var(--text-main, #F2FFF6);
}

/* Section titles and text blocks */
.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--text-main, #F2FFF6);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-blog__light-bg .page-blog__section-title {
  color: var(--text-main-dark, #333333);
}

.page-blog__text-block {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-secondary, #A7D9B8);
}

.page-blog__light-bg .page-blog__text-block {
  color: #555555;
}

/* Introduction Section Grid */
.page-blog__introduction-section .page-blog__container {
  text-align: center;
}

.page-blog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-blog__grid-item {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  color: #333333;
}

.page-blog__grid-title {
  font-size: 1.5em;
  color: var(--deep-green, #0A4B2C);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-blog__grid-text {
  font-size: 1em;
  line-height: 1.7;
  color: #555555;
  text-align: left;
}

/* Card styles (used in Featured Topics and Latest Articles) */
.page-blog__card {
  background-color: var(--card-bg, #11271B);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border, #2E7A4E);
  color: var(--text-main, #F2FFF6);
}

.page-blog__light-bg .page-blog__card {
  background-color: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-blog__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__card-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__card-link {
  color: var(--text-main, #F2FFF6);
  text-decoration: none;
}

.page-blog__light-bg .page-blog__card-link {
  color: var(--deep-green, #0A4B2C);
}

.page-blog__card-link:hover {
  text-decoration: underline;
}

.page-blog__card-text {
  font-size: 0.95em;
  line-height: 1.6;
  color: var(--text-secondary, #A7D9B8);
}

.page-blog__light-bg .page-blog__card-text {
  color: #666666;
}

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

/* Latest Articles Section */
.page-blog__article-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__read-more {
  margin-top: auto;
  align-self: flex-start;
  background-color: var(--deep-green, #0A4B2C);
  color: var(--text-main, #F2FFF6);
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9em;
}

.page-blog__light-bg .page-blog__read-more {
  background-color: var(--main-color, #11A84E);
  color: #ffffff;
}

.page-blog__read-more:hover {
  opacity: 0.8;
}

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

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

.page-blog__promotion-item {
  text-align: center;
}

.page-blog__promotion-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__promotion-text {
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
}

.page-blog__mt-40 {
  margin-top: 40px;
}

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

.page-blog__faq-item {
  background-color: var(--card-bg, #11271B);
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--text-main, #F2FFF6);
}

.page-blog__light-bg .page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  color: #333333;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--text-main, #F2FFF6);
}

.page-blog__light-bg .page-blog__faq-question {
  color: var(--deep-green, #0A4B2C);
}

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

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow, #57E38D);
}

.page-blog__faq-answer {
  padding: 0 25px 18px;
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-secondary, #A7D9B8);
}

.page-blog__light-bg .page-blog__faq-answer {
  color: #666666;
}

/* Conclusion Section */
.page-blog__conclusion-section {
  text-align: center;
}

/* Global image reset for responsive */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Ensures images fill their space without distortion */
}

/* Ensure content area images are not too small */
.page-blog__content-area img,
.page-blog__article-card img,
.page-blog__topic-card img {
  min-width: 200px;
  min-height: 200px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: 20px;
  }
  .page-blog__hero-image-wrapper {
    max-height: 500px;
  }
  .page-blog__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section,
  .page-blog__introduction-section,
  .page-blog__featured-topics,
  .page-blog__latest-articles,
  .page-blog__promotions-section,
  .page-blog__faq-section,
  .page-blog__conclusion-section {
    padding: 40px 0;
  }

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

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

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

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .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;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .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;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-blog__grid,
  .page-blog__topic-grid,
  .page-blog__article-list,
  .page-blog__promotion-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__card-image {
    height: 200px;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-blog__text-block {
    font-size: 1em;
    padding: 0 15px;
  }

  .page-blog__grid-item {
    padding: 20px;
  }

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

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

  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .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__hero-section {
    padding-top: 10px !important;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 2em;
  }
  .page-blog__section-title {
    font-size: 1.5em;
  }
  .page-blog__hero-image-wrapper {
    max-height: 250px;
  }
}