/* ===== Homepage tokens: Blue White ===== */
.page-index {
  --btn-bg: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --bg-soft: #F4F7FB;
  --text-main: #1F2D3D;
  --text-black: #000000;
  --border: #D6E2FF;
  --glow: #A5C4FF;
  color: var(--text-main);
  background-color: var(--bg-soft);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}
/* width 100% max-width safe */
.page-index { width: 100%; max-width: 100%; }
/* Generic link color */
.page-index a { color: #2F6BFF; }
.page-index img { border: 0; max-width: 100%; height: auto; }

/* ===== Section 0: Hero (single image, no overlay text) ===== */
.page-index__hero-section { padding-top: 0; margin-top: 0; width: 100%; overflow: hidden; background: var(--bg-soft); }
.page-index__hero-container { width: 100%; max-width: 100%; margin: 0 auto; }
.page-index__hero-link { display: block; width: 100%; }
.page-index__hero-image { width: 100%; height: auto; display: block; object-fit: cover; aspect-ratio: 1020 / 300; }

/* ===== Section 1: Logo grid 4+2 layout (fixed 6 items) ===== */
.page-index__logo-grid-section {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 16px;
  box-sizing: border-box;
  background: var(--card-bg);
}
.page-index__logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  justify-items: center;
  width: 100%;
}
.page-index__logo-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; width: 100%; max-width: 280px; padding: 16px 8px; box-sizing: border-box;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.10);
  text-align: center;
}
.page-index__logo-image {
  width: 100%; height: auto; display: block;
  aspect-ratio: 2/1; object-fit: contain;
}
.page-index__logo-cta {
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.3px;
  color: #fff; text-decoration: none;
  padding: 10px 24px; border-radius: 999px;
  background: var(--btn-bg);
  box-shadow: 0 6px 18px rgba(47, 107, 255, 0.35);
  display: inline-block; width: fit-content; max-width: 100%;
  box-sizing: border-box; text-align: center;
}
.page-index__logo-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(47, 107, 255, 0.5); }
/* Row 2: items 5 & 6 centered */
.page-index__logo-item:nth-child(5) { grid-column: 2 / 3; }
.page-index__logo-item:nth-child(6) { grid-column: 3 / 4; }

/* ===== Section 2: Long-form guide ===== */
.page-index__guide-section { width: 100%; background: var(--card-bg); border-top: 1px solid var(--border); }
.page-index__guide-inner { width: 100%; max-width: 1000px; margin: 0 auto; padding: 24px 16px 56px; box-sizing: border-box; color: var(--text-main); }
.page-index__guide-title {
  text-align: center; color: #0477DB; margin: 12px 0 16px;
  font-weight: 800; letter-spacing: 0.4px;
  font-size: clamp(1.3rem, 4vw, 2.0rem); line-height: 1.3;
}
.page-index__guide-intro { font-size: 1.05rem; line-height: 1.8; text-align: center; max-width: 800px; margin: 0 auto 26px; }
.page-index__guide-section h2 {
  color: #1F3A8A; font-size: 1.55rem; font-weight: 700;
  border-left: 6px solid #2F6BFF; padding: 6px 14px; margin: 40px 0 20px; background: #F4F7FB;
}
.page-index__guide-section h3 { color: #1F2D3D; font-size: 1.20rem; font-weight: 700; margin-top: 28px; margin-bottom: 8px; }
.page-index__guide-section p { font-size: 1rem; line-height: 1.9; margin-bottom: 18px; color: #1F2D3D; }
.page-index__guide-figure { margin: 32px auto; text-align: center; max-width: 820px; padding: 8px; background: var(--card-bg); border-radius: 10px; }
.page-index__guide-figure img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; display: block; border-radius: 8px; }
.page-index__guide-figure figcaption { font-size: 0.9rem; color: #555; margin-top: 8px; font-style: italic; }
.page-index__guide-section summary { cursor: pointer; color: #1F3A8A; font-weight: 700; padding: 8px 0; }
.page-index__guide-section details {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 16px; margin-bottom: 12px;
  background: #F4F7FB;
}
.page-index__guide-section details p { margin: 10px 0 6px; }
.page-index__guide-section strong { color: #0477DB; }

/* ============================= */
/* ===== responsive 1024px  ===== */
/* ============================= */
@media (max-width: 1024px) {
  .page-index__logo-grid { gap: 18px; }
  .page-index__logo-item { max-width: 240px; }
}

/* ============================= */
/* ===== responsive 768px  ===== */
/* ============================= */
@media (max-width: 768px) {
  .page-index { max-width: 100%; overflow-x: hidden; }
  /* Hero ratio 2:1 mobile */
  .page-index__hero-image { aspect-ratio: 2 / 1; max-width: 100% !important; height: auto !important; }
  /* Logo grid -> 2 columns */
  .page-index__logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .page-index__logo-item:nth-child(5),
  .page-index__logo-item:nth-child(6) {
    grid-column: auto / auto;
  }
  .page-index__logo-item { max-width: 220px; padding: 12px 6px; }
  .page-index__logo-cta { font-size: 0.9rem; padding: 9px 18px; }
  /* Guide title smaller */
  .page-index__guide-title { font-size: clamp(1.1rem, 5vw, 1.4rem); margin: 8px 0 10px; }
  .page-index__guide-inner { padding: 14px 12px 48px; }
  .page-index__guide-section h2 { font-size: 1.3rem; margin-top: 32px; }
  .page-index__guide-section h3 { font-size: 1.1rem; }
  .page-index__guide-figure { margin: 22px auto; padding: 4px; }
  .page-index__guide-figure img { max-width: 100% !important; height: auto !important; }
  /* all page images safe */
  .page-index img { max-width: 100% !important; height: auto !important; }
}

/* ============================= */
/* ===== responsive 480px  ===== */
/* ============================= */
@media (max-width: 480px) {
  .page-index__logo-grid { gap: 8px; }
  .page-index__logo-item { max-width: 160px; gap: 8px; }
  .page-index__logo-cta { font-size: 0.78rem; padding: 8px 10px; width: auto; white-space: normal; word-wrap: break-word; max-width: 100%; box-sizing: border-box; }
  .page-index__guide-section p { font-size: 0.95rem; }
}