/* ========== 首页专用样式 ========== */

/* Hero Section */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 400px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .hero {
    min-height: 500px;
  }
}

@media (max-width: 767px) {
  .hero {
    background-size: auto 100%;
    background-position: center center;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  max-width: 896px;
  margin: 0 auto;
  padding: 5rem 1rem;
  text-align: center;
  color: white;
}

.hero h1 {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }
}

.hero p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .hero p {
    font-size: 1.25rem;
  }
}

.hero .btn-primary {
  display: inline-block;
  background: #88619a;
  color: white;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-size: 1.125rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(136, 97, 154, 0.3);
  transition: all 0.3s;
}

.hero .btn-primary:hover {
  background: #6d4d7d;
  box-shadow: 0 15px 30px rgba(136, 97, 154, 0.4);
  transform: translateY(-2px);
}

/* MBTI 简介 */
.intro-section {
  max-width: 896px;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.intro-section h2 {
  font-size: 1.875rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

.intro-section .prose {
  color: #4b5563;
  font-size: 1.125rem;
  line-height: 1.75;
}

.intro-section .prose p {
  margin-bottom: 1rem;
}

.intro-section .prose strong {
  font-weight: 700;
  color: #111827;
}

/* 16种类型预览 */
.categories-section {
  padding: 0;
  background: white;
}

.categories-grid {
  display: flex;
  flex-direction: column;
}

.category-group {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.category-group-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 4rem;
  position: relative;
  z-index: 1;
}

.category-group-title {
  position: absolute;
  left: 50%;
  top: 2.4rem;
  transform: translateX(-50%);
  font-size: 7rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.category-types {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 1rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .category-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .category-types {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .category-types {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .category-group-title {
    font-size: 5.4rem;
  }
}

@media (max-width: 768px) {
  .category-group-inner {
    padding: 3.75rem 1rem 3rem;
  }

  .category-group-title {
    top: 2rem;
    font-size: 3.4rem;
    letter-spacing: 0.08em;
  }
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  min-width: 0;
}

.type-card:hover .type-card-image img {
  transform: translateY(-4px) scale(1.02);
}

.type-card-image {
  width: 100%;
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1rem;
}

.type-card-image img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.type-card-content {
  width: 100%;
  padding: 0.75rem 0 0;
}

.type-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.2rem;
  color: var(--type-title-color, #88619a);
}

.type-card-code {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-bottom: 0.45rem;
  color: #343c4b;
}

.type-card-desc {
  max-width: 220px;
  margin: 0 auto;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #787f8d;
}

@media (max-width: 768px) {
  .type-card-image {
    height: 170px;
  }

  .type-card-title {
    font-size: 1rem;
  }

  .type-card-desc {
    font-size: 0.8rem;
    max-width: 240px;
  }
}
