/* style/blog.css */

/* Custom Colors */
:root {
  --color-primary: #11A84E;
  --color-secondary: #22C768;
  --color-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --color-card-bg: #11271B;
  --color-background: #08160F;
  --color-text-main: #F2FFF6;
  --color-text-secondary: #A7D9B8;
  --color-border: #2E7A4E;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-divider: #1E3A2A;
  --color-deep-green: #0A4B2C;
}

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default for light body background */
  background-color: #f8f8f8; /* A light background for the overall page content */
}

.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;
  align-items: center;
  text-align: center;
  background-color: var(--color-background); /* Dark background for hero */
  padding-bottom: 60px; /* Space below content */
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  max-height: 500px; /* Limit height for aesthetic */
  margin-bottom: 30px;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  padding: 0 20px;
  max-width: 900px;
  color: var(--color-text-main);
}

.page-blog__main-title {
  font-size: clamp(2em, 5vw, 3.2em);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--color-gold);
  letter-spacing: 0.05em;
}

.page-blog__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--color-text-secondary);
}

/* CTA Button Base */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--color-button-gradient);
  color: var(--color-text-main);
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__cta-button--centered {
    margin: 30px auto 0 auto;
    display: block;
    width: fit-content;
}

.page-blog__cta-button--final {
    margin-top: 40px;
}

/* General Section Styles */
.page-blog__section-title {
  font-size: clamp(1.8em, 4vw, 2.5em);
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 40px;
  padding-top: 40px;
  position: relative;
}

.page-blog__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--color-gold);
  margin: 15px auto 0;
  border-radius: 2px;
}

.page-blog__sub-title {
  font-size: clamp(1.4em, 3vw, 1.8em);
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 30px;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__text-block {
  font-size: 1.1em;
  margin-bottom: 1em;
  color: #333333;
}

.page-blog__text-block strong {
    color: var(--color-deep-green);
}

.page-blog__dark-section .page-blog__text-block,
.page-blog__dark-section .page-blog__sub-title {
    color: var(--color-text-main);
}

.page-blog__dark-section .page-blog__text-block strong {
    color: var(--color-gold);
}

.page-blog__dark-section .page-blog__section-title {
    color: var(--color-gold);
}

.page-blog__dark-section {
    background-color: var(--color-card-bg);
    padding: 60px 0;
    color: var(--color-text-main);
}

/* Image Styling */
.page-blog__image-wrapper {
    margin: 30px 0;
    text-align: center;
}

.page-blog__content-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 0 auto;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #f0f0f0;
}

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  background-color: #eaf7ed;
  border-bottom: 1px solid var(--color-border);
  list-style: none;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Safari */
  -khtml-user-select: none;    /* Konqueror HTML */
  -moz-user-select: none;      /* Old versions of Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

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

.page-blog__faq-question:hover {
  background-color: #e0f2e4;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--color-deep-green);
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  color: #555555;
  border-top: 1px solid #e9e9e9;
}

.page-blog__faq-item:not([open]) .page-blog__faq-answer {
    border-top: none;
}

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

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

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

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

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

  .page-blog__cta-button {
    padding: 12px 20px;
    font-size: 0.9em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__cta-button--centered,
  .page-blog__cta-button--final {
      margin-left: 0;
      margin-right: 0;
  }

  .page-blog__section-title {
    font-size: clamp(1.5em, 6vw, 2em);
    padding-top: 30px;
  }

  .page-blog__sub-title {
    font-size: clamp(1.2em, 5vw, 1.5em);
    margin-top: 25px;
  }

  .page-blog__text-block {
    font-size: 0.95em;
  }

  .page-blog__intro-section, 
  .page-blog__why-choose-section,
  .page-blog__products-section,
  .page-blog__guide-section,
  .page-blog__promotions-section,
  .page-blog__strategy-section,
  .page-blog__support-section,
  .page-blog__conclusion-section,
  .page-blog__faq-section {
    padding: 30px 0;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  .page-blog__faq-answer {
    padding: 12px 20px 15px;
    font-size: 0.95em;
  }

  .page-blog__video-section {
    padding-top: 10px !important; /* body đã承担 --header-offset，此处禁止 var(--header-offset) */
  }
}

/* Ensure images within content areas are responsive */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsive override for image containers */
@media (max-width: 768px) {
  .page-blog__image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}