/* style/index.css */

/* General Styles for page-index */
.page-index {
  font-family: 'Arial', sans-serif;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
  line-height: 1.6;
}

/* Section Titles */
.page-index__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #2F6BFF; /* Main Color */
  text-align: center;
}

.page-index__section-title--center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: #ed9107; /* Title/Emphasis Gold Orange */
  margin-bottom: 40px;
}

.page-index__section-title--center span {
  white-space: nowrap;
}

.page-index__section-title--center b {
  display: block;
  width: 50px;
  height: 3px;
  background: #ed9107; /* Title/Emphasis Gold Orange */
  border-radius: 2px;
}

.page-index__section-title--normal {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #ed9107; /* Title/Emphasis Gold Orange */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.page-index__section-title--normal b {
  display: block;
  width: 40px;
  height: 2px;
  background: #ed9107; /* Title/Emphasis Gold Orange */
  border-radius: 1px;
}

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

.page-index__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.3);
}

.page-index__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.4);
}

.page-index__btn-secondary {
  background: #ffffff;
  color: #2F6BFF;
  border: 2px solid #2F6BFF;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.1);
}

.page-index__btn-secondary:hover {
  background: #F4F7FB;
  color: #2F6BFF;
  border-color: #4A8BFF;
  box-shadow: 0 6px 15px rgba(47, 107, 255, 0.2);
}

/* All images responsive */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Module 0: Hero Banner */
.page-index__hero-section {
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  width: 100%;
  overflow: hidden;
}

.page-index__hero-banner {
  width: 100%;
  line-height: 0;
}

/* Module 1: Dark Content Area - Intro Section */
.page-index__intro-section {
  background-color: #252b38; /* Dark content area */
  color: #f0f0f0; /* Light text for dark background */
  padding: 60px 20px;
}

.page-index__intro-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.page-index__intro-quote {
  font-size: 1.15rem;
  line-height: 1.8;
  margin: 0 auto 30px;
  max-width: 900px;
  color: #d0d0d0;
}

.page-index__intro-quote p strong {
  color: #ed9107;
}

.page-index__intro-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Module 2: FAQ Hand-accordion */
.page-index__faq-section {
  background-color: #F4F7FB; /* Background */
  padding: 60px 20px;
}

.page-index__faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-index__faq-list {
  margin-top: 40px;
}

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #D6E2FF; /* Border Color */
  overflow: hidden;
  background: #ffffff; /* Card BG */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

details.page-index__faq-item summary.page-index__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;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1F2D3D; /* Text Main */
}

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

details.page-index__faq-item summary.page-index__faq-question:hover {
  background: #f0f5ff;
}

.page-index__faq-qtext {
  flex: 1;
  line-height: 1.5;
  text-align: left;
}

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #2F6BFF; /* Main Color */
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 25px 20px;
  background: #f9fbfc;
  border-top: 1px solid #D6E2FF;
  border-radius: 0 0 8px 8px;
  color: #1F2D3D; /* Text Main */
}

.page-index__faq-answer p {
  margin-bottom: 0;
}

/* Module 3: Blog Article Grid */
.page-index__blog-section {
  background-color: #252b38; /* Dark content area */
  padding: 60px 20px;
  color: #f0f0f0;
}

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 40px auto 0;
}

.page-index__blog-card {
  background: #181b1f; /* Blog card background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-index__blog-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.page-index__blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-index__blog-date {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(47, 107, 255, 0.9); /* Main Color */
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.page-index__blog-day {
  display: block;
  font-size: 1.2em;
}

.page-index__blog-month {
  display: block;
  text-transform: uppercase;
}

.page-index__blog-body {
  padding: 20px;
  color: #d0d0d0;
}

.page-index__blog-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  color: #ffffff;
  line-height: 1.4;
}

.page-index__blog-card-link:hover .page-index__blog-title {
  color: #6FA3FF; /* Accent Color */
}

.page-index__blog-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
  color: #b0b0b0;
}

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

/* Mobile Responsiveness */
@media (max-width: 849px) {
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-index__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .page-index__hero-banner img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* 深色导语区 */
  .page-index__intro-section {
    padding: 30px 15px;
  }

  .page-index__section-title--center {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    margin-bottom: 25px;
    gap: 10px;
  }

  .page-index__section-title--center b {
    width: 30px;
    height: 2px;
  }

  .page-index__intro-quote {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-index__intro-cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-index__btn-primary,
  .page-index__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  /* FAQ 与其他模块 */
  .page-index__faq-section {
    padding: 30px 15px;
  }

  .page-index__section-title--normal {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    margin-bottom: 25px;
    gap: 10px;
  }

  .page-index__section-title--normal b {
    width: 25px;
    height: 1px;
  }

  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-index__faq-toggle {
    font-size: 24px;
    width: 25px;
  }

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

  /* 博客网格 */
  .page-index__blog-section {
    padding: 30px 15px;
  }

  .page-index__blog-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
    margin-top: 25px;
  }

  .page-index__blog-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  .page-index__blog-title {
    font-size: 1.1rem;
  }

  .page-index__blog-excerpt {
    font-size: 0.9rem;
  }

  .page-index__view-all-posts {
    margin-top: 30px;
  }

  /* 通用图片与容器 */
  .page-index__intro-inner,
  .page-index__faq-container,
  .page-index__blog-grid,
  .page-index__blog-card,
  .page-index__blog-media {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }

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

  /* Ensure no horizontal scroll */
  body {
    overflow-x: hidden;
  }
  .page-content.page-index {
    overflow-x: hidden;
  }
  .page-index > section {
    overflow-x: hidden;
  }
}

@media (max-width: 549px) {
  .page-index__blog-grid {
    grid-template-columns: 1fr;
  }
}