/* CSS cho trang Blog vipvin */

/* Biến màu sắc */
:root {
  --primary-color: #FF8C1A;
  --secondary-color: #FFA53A;
  --card-bg: #17191F;
  --background-dark: #0D0E12;
  --text-main: #FFF3E6;
  --border-color: #A84F0C;
  --glow-color: #FFB04D;
  --deep-orange: #D96800;
  --light-grey-bg: #f5f5f5;
  --dark-text: #333333;
}

/* General body styling for contrast, assuming shared.css sets body background to --background-dark */
.page-blog {
  color: var(--text-main);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Assuming body padding-top is handled by shared.css */
  padding-bottom: 60px;
  background: var(--background-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

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

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

.page-blog__hero-content {
  position: relative;
  z-index: 10;
  padding-top: 40px;
  max-width: 800px;
}

.page-blog__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: var(--text-main);
  margin-bottom: 30px;
  line-height: 1.8;
  opacity: 0.9;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
  color: var(--text-main);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 140, 26, 0.4);
}

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

.page-blog__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: none;
}

.page-blog__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-main);
  box-shadow: 0 2px 10px rgba(255, 140, 26, 0.3);
}

/* Featured Posts Section */
.page-blog__featured-posts {
  padding: 80px 0;
  background: var(--light-grey-bg);
  color: var(--dark-text);
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3vw, 2.8em);
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: var(--dark-text);
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__post-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--dark-text);
}

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

.page-blog__post-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

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

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

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #666;
  margin-bottom: 20px;
  min-height: 70px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-blog__read-more {
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
}

.page-blog__read-more span {
  margin-left: 5px;
  transition: margin-left 0.3s ease;
}

.page-blog__post-link:hover .page-blog__read-more span {
  margin-left: 10px;
}

.page-blog__view-all-wrapper {
  text-align: center;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background: var(--background-dark);
  text-align: center;
  color: var(--text-main);
  background-image: url('[GALLERY:blog_section_cta:1920x400:vipvin,cta,join_now,community]');
  background-size: cover;
  background-position: center;
  position: relative;
}

.page-blog__cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 14, 18, 0.7);
  z-index: 1;
}

.page-blog__cta-section > .page-blog__container {
  position: relative;
  z-index: 2;
}

.page-blog__cta-title {
  font-size: clamp(2em, 3.5vw, 3em);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.15em;
  color: var(--text-main);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-button {
  min-width: 250px;
}

/* About Section */
.page-blog__about-section {
  padding: 80px 0;
  background: var(--light-grey-bg);
  color: var(--dark-text);
}

.page-blog__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.page-blog__text-content {
  flex: 2;
}

.page-blog__text-content p {
  margin-bottom: 20px;
  font-size: 1.05em;
  line-height: 1.8;
  color: #555;
}

.page-blog__image-content {
  flex: 1;
  min-width: 300px;
}

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

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background: var(--card-bg);
  color: var(--text-main);
}

.page-blog__faq-section .page-blog__section-title {
  color: var(--text-main);
  margin-bottom: 50px;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--background-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  color: var(--text-main);
}

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

details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: rgba(255, 140, 26, 0.1);
  border-color: var(--primary-color);
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}

.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 20px;
  width: 30px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: var(--card-bg);
  border-radius: 0 0 8px 8px;
  color: var(--text-main);
  opacity: 0.9;
}

.page-blog__faq-answer p {
  margin: 0;
  font-size: 1em;
  line-height: 1.7;
}

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

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding-left: 20px;
    padding-right: 20px;
  }

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

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

  .page-blog__posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }

  .page-blog__about-image {
    height: 400px;
    object-fit: cover;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-blog__hero-section {
    padding-top: 10px;
    padding-bottom: 40px;
  }

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

  .page-blog__hero-image {
    object-fit: contain !important;
    aspect-ratio: unset !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__hero-content {
    padding-top: 30px;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-blog__hero-description {
    font-size: 0.95em;
    margin-bottom: 25px;
  }

  /* 产品展示图区域 (Blog page uses posts grid, not product grid) */
  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    overflow-x: hidden;
  }

  .page-blog__post-image {
    height: 180px;
  }

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

  .page-blog__post-title {
    font-size: 1.2em;
  }

  .page-blog__post-excerpt {
    font-size: 0.9em;
    min-height: 60px;
  }

  .page-blog__section-title {
    font-size: clamp(1.5em, 6vw, 2em);
    margin-bottom: 15px;
  }

  .page-blog__section-description {
    font-size: 0.9em;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  /* 装饰主标题 + 长文 SEO 区 */
  .page-blog__cta-section {
    padding: 50px 0;
  }

  .page-blog__cta-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
    margin-bottom: 15px;
  }

  .page-blog__cta-description {
    font-size: 1em;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  .page-blog__about-section,
  .page-blog__faq-section {
    padding: 50px 0;
  }

  .page-blog__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .page-blog__image-content {
    min-width: unset;
  }

  .page-blog__about-image {
    height: auto;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  .page-blog__text-content p {
    font-size: 0.95em;
    padding: 0 15px;
  }

  /* 通用图片与容器 */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-blog__container,
  .page-blog__card,
  .page-blog__post-card,
  .page-blog__content-area,
  .page-blog__text-block,
  .page-blog__dark-section,
  .page-blog__light-bg,
  .page-blog__medium-bg {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* 按钮与按钮容器 */
  .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: 12px 15px !important;
    font-size: 1em !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 !important;
    padding-right: 15px !important;
    display: flex;
    flex-direction: column !important;
    gap: 10px;
  }

  /* FAQ */
  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px 20px;
  }

  .page-blog__faq-qtext {
    font-size: 1em;
  }

  .page-blog__faq-toggle {
    font-size: 24px;
    margin-left: 15px;
    width: 25px;
  }

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