/* 汉恒教育官网样式 */
:root {
  --primary: #1a5276;
  --primary-light: #2980b9;
  --secondary: #f39c12;
  --text: #333333;
  --text-light: #666666;
  --bg-light: #f5f7fa;
  --white: #ffffff;
  --border: #e5e9ef;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --header-height: 68px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background-color: var(--white);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary);
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 82, 118, 0.97);
  backdrop-filter: blur(6px);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo img,
.logo svg {
  width: 40px;
  height: 40px;
}

.logo span {
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 6px;
}

.main-nav a {
  display: block;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.92);
  border-radius: 6px;
  font-size: 16px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.nav-cta {
  margin-left: 14px;
  padding: 8px 18px;
  background: var(--secondary);
  color: var(--white) !important;
  border-radius: 999px;
  font-weight: 600;
}

.nav-cta:hover {
  background: #e08e0b;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #143c5c 0%, #1a5276 50%, #2471a3 100%);
  color: var(--white);
  text-align: center;
  padding: 90px 20px 110px;
}

.hero .container {
  max-width: 860px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.3;
  margin-bottom: 16px;
  font-weight: 800;
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  opacity: 0.92;
  margin-bottom: 8px;
}

.hero-sub {
  font-size: 16px !important;
  opacity: 0.78 !important;
}

.hero-buttons {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(243, 156, 18, 0.35);
}

.btn-primary:hover {
  background: #e08e0b;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.btn-large {
  padding: 14px 40px;
  font-size: 18px;
}

/* ===== Sections ===== */
.section {
  padding: 72px 0;
}

.section.bg-light {
  background: var(--bg-light);
}

.section-title {
  text-align: center;
  margin-bottom: 14px;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--primary);
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 16px;
}

/* ===== Feature cards ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
}

.feature-icon {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--primary);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-light);
}

/* ===== Course cards ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.course-card-header {
  height: 8px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.course-card-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-card-body h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 8px;
}

.course-card-body .tag {
  display: inline-block;
  width: fit-content;
  padding: 4px 12px;
  background: #eaf2f8;
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 12px;
}

.course-card-body p {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 12px;
}

.course-card-body ul {
  padding-left: 18px;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 16px;
}

.course-card-body .btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 8px 20px;
  font-size: 14px;
}

.btn-small-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-small-primary:hover {
  background: var(--primary-light);
  color: var(--white);
}

/* ===== Stats ===== */
.stats {
  background: linear-gradient(135deg, #143c5c, #1a5276);
  color: var(--white);
  padding: 52px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stats-grid .number {
  font-size: 40px;
  font-weight: 800;
  color: var(--secondary);
}

.stats-grid .label {
  opacity: 0.85;
  margin-top: 4px;
}

/* ===== Why us ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
}

.why-text h2 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 16px;
}

.why-text p {
  color: var(--text-light);
  margin-bottom: 16px;
}

.why-text ul {
  list-style: none;
  padding: 0;
}

.why-text li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text);
}

.why-text li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #27ae60;
  font-weight: 700;
}

.why-image {
  background: #eaf2f8;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 72px;
}

/* ===== CTA ===== */
.cta {
  background: var(--secondary);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.cta h2 {
  font-size: clamp(22px, 3vw, 34px);
  margin-bottom: 10px;
}

.cta p {
  opacity: 0.95;
  margin-bottom: 24px;
}

.cta .btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: none;
}

.cta .btn-primary:hover {
  background: #f7f7f7;
  color: var(--primary);
}

/* ===== Page banner ===== */
.page-banner {
  background: linear-gradient(135deg, #143c5c, #2471a3);
  color: var(--white);
  text-align: center;
  padding: 60px 20px;
}

.page-banner h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 8px;
}

.page-banner p {
  opacity: 0.85;
  max-width: 640px;
  margin: 0 auto;
}

/* ===== Simple article list ===== */
.page-content {
  padding: 60px 0;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.info-box {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
}

.info-box h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 20px;
}

.info-box ul {
  padding-left: 20px;
}

.info-box li {
  margin-bottom: 8px;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-icon {
  width: 46px;
  height: 46px;
  background: #eaf2f8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.contact-item h3 {
  font-size: 16px;
  color: var(--primary);
}

.contact-item p {
  color: var(--text-light);
  font-size: 15px;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.12);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-note {
  font-size: 13px;
  color: #999;
  margin-top: 6px;
}

/* ===== Map placeholder / QR ===== */
.qr-placeholder {
  width: 160px;
  height: 160px;
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 13px;
  text-align: center;
  padding: 10px;
  margin-top: 8px;
}

/* ===== Footer ===== */
.site-footer {
  background: #123349;
  color: rgba(255, 255, 255, 0.82);
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-grid h3 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 12px;
}

.footer-grid a {
  color: rgba(255, 255, 255, 0.78);
  display: block;
  margin-bottom: 8px;
}

.footer-grid a:hover {
  color: var(--secondary);
}

.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.footer-copyright a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-copyright a:hover {
  color: var(--white);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    display: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .main-nav a {
    padding: 12px 14px;
    font-size: 17px;
  }

  .nav-cta {
    margin: 8px 0 0 0;
    text-align: center;
  }

  .hero {
    padding: 60px 16px 80px;
  }

  .section {
    padding: 48px 0;
  }

  .feature-grid,
  .course-grid,
  .stats-grid,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-copyright {
    flex-direction: column;
  }
}
