/* ===========================================
   components.css — 卡片、按钮、标签等组件
   =========================================== */

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-size: var(--fs-base);
  font-weight: 500;
  border-radius: var(--r-full);
  transition: all var(--tr-base);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #3B6FFF 0%, #2D5BFF 100%);
  color: var(--c-text-white);
  box-shadow: var(--sh-blue);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4A7CFF 0%, #1E4DE8 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(45, 91, 255, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
}

.btn-outline:hover {
  background: var(--c-primary);
  color: var(--c-text-white);
}

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--c-primary);
}

.btn-large {
  padding: 16px 48px;
  font-size: var(--fs-md);
}

.btn-more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 28px;
  font-size: var(--fs-base);
  font-weight: 600;
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
  border-radius: var(--r-full);
  transition: all var(--tr-base);
}

.btn-more:hover {
  background: var(--c-primary);
  color: var(--c-text-white);
}

.btn-more::after {
  content: "›";
  font-size: 18px;
  transition: transform var(--tr-fast);
}

.btn-more:hover::after {
  transform: translateX(3px);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: var(--fs-sm);
  border-radius: var(--r-sm);
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.5;
}

.tag-blue {
  background: #E6F0FF;
  color: #2B66FF;
}

.tag-green {
  background: #E6FFF4;
  color: #14B866;
}

.tag-orange {
  background: #FFF0E0;
  color: #FF8A00;
}

.tag-purple {
  background: #F0E6FF;
  color: #7C5CFF;
}

.tag-pink {
  background: #FFE6F0;
  color: #FF5C9D;
}

.tag-outline {
  background: transparent;
  border: 1px solid currentColor;
}

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--c-text-white);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--tr-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

/* 课程卡片 */
.course-card {
  background: linear-gradient(180deg, #EEF5FF 0%, #FFFFFF 40%);
  border-radius: 16px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all var(--tr-base);
  box-shadow: 0 6px 18px rgba(43, 102, 255, 0.06);
  /* 预留透明底边，hover 变蓝条时不跳动 */
  border-bottom: 4px solid transparent;
  min-height: 380px;
}

.course-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(45, 91, 255, 0.08), rgba(45, 91, 255, 0.02));
  border-radius: 50%;
  pointer-events: none;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-blue-sm);
  border-bottom-color: #2B66FF;
  cursor: pointer;
}

.course-card h3 {
  font-size: 22px;
  color: #1F2937;
  margin-bottom: var(--sp-3);
  font-weight: 700;
  position: relative;
}

.course-card .course-tags {
  margin-bottom: 20px;
}

/* 胶囊标签组：同一浅蓝底内用 / 分隔 */
.course-card .tag-group {
  display: inline-flex;
  align-items: center;
  background-color: #E6F0FF;
  color: #2B66FF;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  width: fit-content;
  line-height: 1.4;
}

.course-card .course-meta {
  margin-bottom: var(--sp-4);
}

.course-card .course-meta dt {
  font-size: 14px;
  color: #2B66FF;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 4px;
}

.course-card .course-meta dd {
  font-size: 14px;
  color: #4B5563;
  line-height: 1.6;
  margin-bottom: var(--sp-3);
}

/* 底部预约咨询按钮：渐变胶囊、底部对齐 */
.course-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.course-card-link h3 {
  color: inherit;
}

.course-card .btn {
  margin-top: auto;
  align-self: center;
  width: 140px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #2B66FF 0%, #1A4BFF 100%);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(43, 102, 255, 0.35);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

/* 教师卡片 */
.teacher-card {
  background: linear-gradient(180deg, #EEF5FF 0%, #FFFFFF 42%);
  border-radius: 16px;
  padding: 20px 20px 24px;
  text-align: center;
  transition: all var(--tr-base);
  border: 1px solid #E4ECFB;
  box-shadow: 0 6px 18px rgba(43, 102, 255, 0.04);
  text-decoration: none;
  color: inherit;
  display: block;
}

.teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
  border-color: var(--c-primary-light);
}

.teacher-avatar {
  width: calc(100% + 40px);
  height: 260px;
  margin: -20px -20px 20px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: #EAF2FF;
  position: relative;
}

.teacher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}

.teacher-name {
  font-size: 22px;
  color: #222;
  font-weight: 700;
  margin-bottom: 12px;
}

.teacher-subject {
  margin-bottom: 16px;
}

.teacher-bio {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 资讯卡片（列表行） */
.news-item {
  display: flex;
  gap: var(--sp-6);
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--c-border-light);
  transition: all var(--tr-base);
  align-items: flex-start;
}

.news-item:hover {
  padding-left: var(--sp-2);
}

.news-item:hover .news-title {
  color: var(--c-primary);
}

.news-thumb {
  width: 280px;
  height: 180px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-primary-light);
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}

.news-item:hover .news-thumb img {
  transform: scale(1.05);
}

.news-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.news-title {
  font-size: var(--fs-xl);
  color: var(--c-text);
  font-weight: 600;
  line-height: 1.4;
  transition: color var(--tr-fast);
}

.news-excerpt {
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--c-text-tertiary);
  margin-top: auto;
}

.news-meta a {
  color: var(--c-primary);
}

/* 校区图片卡片 */
.campus-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--c-primary-light);
  cursor: pointer;
  transition: all var(--tr-base);
  display: block;
  text-decoration: none;
}

.campus-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}

.campus-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.campus-card:hover img {
  transform: scale(1.08);
}

/* 教学服务卡片 - 背景图样式 */
.service-card {
  border-radius: 20px;
  padding: 0;
  display: block;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  text-decoration: none;
  color: var(--c-text-white);
  background-color: var(--c-primary);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: all var(--tr-base);
}

/* 首页教学服务使用浅色信息卡，不复用详情页的图片遮罩。 */
.section-service .service-card,
.service-page .service-card {
  border-radius: 16px;
  padding: 24px 32px;
  color: #2b66ff;
  z-index: 0;
}

.section-service .service-card::before,
.service-page .service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--service-decoration);
  pointer-events: none;
}

.section-service .service-card > *,
.service-page .service-card > * {
  position: relative;
  z-index: 1;
}

.section-service .service-card:hover::before,
.service-page .service-card:hover::before {
  background: var(--service-decoration);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.7) 100%);
  transition: background var(--tr-base);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.service-card:hover::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.service-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-card-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--c-text-white);
  margin: 0;
  line-height: 1.4;
}

.service-card-link {
  font-size: var(--fs-base);
  color: var(--c-text-white);
  opacity: 0.9;
}

.service-large {
  min-height: 220px;
}

.service-card .service-icon {
  display: none;
}

.service-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.service-title {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin: 0;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.service-heading {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin-top: 18px;
  margin-bottom: 12px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-tag {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: inherit;
  border: 1px solid currentColor;
}

.service-desc {
  font-size: 15px;
  line-height: 1.7;
  color: #555;
  margin: 0;
}

.service-blue {
  --service-decoration: linear-gradient(135deg, transparent 58%, rgba(43, 102, 255, 0.1) 58%);
  background: linear-gradient(135deg, #E8F0FF 0%, #F4F7FF 100%);
  color: #2B66FF;
}

.service-blue .service-badge {
  background: #5B97FF;
}

.service-mint {
  --service-decoration:
    radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.14) 0 16%, transparent 16.5%),
    radial-gradient(circle at 100% 0, transparent 0 25%, rgba(45, 212, 191, 0.1) 25.5% 29%, transparent 29.5%);
  background: linear-gradient(135deg, #E6F7F0 0%, #F0FAF5 100%);
  color: #12B76A;
}

.service-mint .service-badge {
  background: #2DD4BF;
}

.service-warm {
  --service-decoration: radial-gradient(circle at 100% 100%, rgba(255, 169, 58, 0.13) 0 23%, transparent 23.5%);
  background: linear-gradient(135deg, #FFF4E6 0%, #FFF8EE 100%);
  color: #FF8A00;
}

.service-warm .service-badge {
  background: #FFA93A;
}

.service-purple {
  --service-decoration: radial-gradient(circle at 100% 0, rgba(139, 121, 255, 0.13) 0 25%, transparent 25.5%);
  background: linear-gradient(135deg, #F0E6FF 0%, #F7F0FF 100%);
  color: #7C5CFF;
}

.service-purple .service-badge {
  background: #8B79FF;
}

.service-blue-light {
  --service-decoration: linear-gradient(160deg, transparent 58%, rgba(59, 130, 246, 0.11) 58%);
  background: linear-gradient(135deg, #E8F2FF 0%, #EFF7FF 100%);
  color: #3B82F6;
}

.service-blue-light .service-badge {
  background: #3B82F6;
}

/* 优势图标卡片 */
.advantage-card {
  text-align: center;
  padding: 38px 22px 34px;
  border-radius: 18px;
  transition: all var(--tr-base);
  color: var(--c-text-white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  min-height: 254px;
  text-decoration: none;
  display: block;
}

.advantage-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.42);
}

.advantage-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-white);
}

.advantage-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.advantage-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--c-text-white);
}

.advantage-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
}

/* 校区地址卡片 */
.contact-card {
  background: var(--c-text-white);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  border: 1px solid var(--c-border-light);
  transition: all var(--tr-base);
  box-shadow: var(--sh-sm);
}

.contact-card:hover {
  border-color: var(--c-primary-light);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

.contact-card-title {
  font-size: var(--fs-xl);
  color: var(--c-text);
  font-weight: 700;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-border-light);
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
  line-height: 1.6;
}

.contact-row:last-child {
  margin-bottom: 0;
}

.contact-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--c-primary);
  margin-top: 2px;
}

.contact-row.phone a {
  color: var(--c-text);
  margin-right: var(--sp-4);
  font-weight: 500;
}

.contact-row.phone a:hover {
  color: var(--c-primary);
}

/* 数据统计 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-8);
  padding: var(--sp-12) 0;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 48px;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.stat-label {
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
}

/* 主营业务卡片 */
.biz-card {
  background: var(--c-bg-light);
  border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  transition: all var(--tr-base);
}

.biz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
  background: var(--c-text-white);
}

.biz-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--sp-4);
  color: var(--c-primary);
}

.biz-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.biz-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--sp-3);
}

.biz-desc {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  line-height: 1.7;
}
