/* ============================================
   雅安市雨城区优立思科技培训学校有限公司 - 官网样式
   主色：教育蓝
   ============================================ */
:root {
  --primary: #185fa5;
  --primary-dark: #0c447c;
  --primary-deep: #042c53;
  --primary-light: #e6f1fb;
  --accent: #ef9f27;
  --accent-light: #faeeda;
  --text-main: #2c2c2a;
  --text-sub: #5f5e5a;
  --text-light: #ffffff;
  --bg-gray: #f5f7fa;
  --border: #e3e8ee;
  --radius: 10px;
  --maxw: 1100px;
}

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

html { scroll-behavior: smooth; }

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

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部通栏 ---------- */
.topbar {
  background: var(--primary-deep);
  color: #cfe0f2;
  font-size: 13px;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 34px; flex-wrap: wrap; gap: 4px;
}
.topbar span { white-space: nowrap; }

/* ---------- 导航头部 ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 6px rgba(4, 44, 83, 0.06);
}
.site-header .container {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 72px; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: bold; letter-spacing: 1px;
  flex-shrink: 0;
}
.logo-text .logo-name {
  font-size: 20px; font-weight: bold; color: var(--primary-deep);
  line-height: 1.3;
}
.logo-text .logo-sub {
  font-size: 11px; color: var(--text-sub); letter-spacing: 0.5px;
}
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: block; padding: 10px 18px; border-radius: 6px;
  font-size: 16px; color: var(--text-main); transition: all 0.2s;
}
.main-nav a:hover { color: var(--primary); background: var(--primary-light); }
.main-nav a.active {
  color: #fff; background: var(--primary);
}
.nav-toggle { display: none; }

/* ---------- 页面横幅 ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 48px 0; text-align: center;
}
.page-banner h1 { font-size: 30px; font-weight: bold; letter-spacing: 2px; }
.page-banner p { margin-top: 8px; color: #cfe0f2; font-size: 14px; }
.breadcrumb { margin-top: 14px; font-size: 13px; color: #9fc3e8; }
.breadcrumb a { color: #cfe0f2; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- 通用区块 ---------- */
.section { padding: 60px 0; }
.section.gray { background: var(--bg-gray); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head .en {
  font-size: 13px; color: var(--primary); letter-spacing: 3px;
  text-transform: uppercase; font-weight: bold;
}
.section-head h2 {
  font-size: 28px; color: var(--primary-deep); margin-top: 4px; letter-spacing: 1px;
}
.section-head .line {
  width: 48px; height: 3px; background: var(--accent);
  margin: 14px auto 0; border-radius: 2px;
}
.section-head p.desc { color: var(--text-sub); margin-top: 14px; font-size: 15px; }

/* ---------- 首页轮播 ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--primary-deep) 0%, var(--primary) 60%, #378add 100%);
  color: #fff;
}
.hero-slides { position: relative; min-height: 420px; }
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0; transition: opacity 0.8s ease;
  padding: 0;
}
.hero-slide.show { opacity: 1; position: relative; }
.hero-slide .container { padding-top: 60px; padding-bottom: 60px; }
.hero-slide h2 {
  font-size: 38px; letter-spacing: 3px; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.hero-slide p {
  font-size: 17px; color: #dbeafe; margin-bottom: 28px; max-width: 560px;
}
.hero-slide .btn {
  display: inline-block; padding: 12px 34px; border-radius: 24px;
  font-size: 16px; transition: all 0.2s;
}
.hero-slide .btn-primary { background: var(--accent); color: #fff; }
.hero-slide .btn-primary:hover { background: #d98b1a; }
.hero-slide .btn-ghost { border: 1px solid #fff; color: #fff; margin-left: 12px; }
.hero-slide .btn-ghost:hover { background: rgba(255,255,255,0.15); }
.hero-dots {
  position: absolute; bottom: 22px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px;
}
.hero-dots button {
  width: 12px; height: 12px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.4); cursor: pointer;
  transition: all 0.2s;
}
.hero-dots button.on { background: var(--accent); width: 28px; border-radius: 6px; }

/* ---------- 卡片网格 ---------- */
.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(4, 1fr);
}
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all 0.25s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(4, 44, 83, 0.12);
  border-color: #b5d4f4;
}
.card-cover {
  height: 130px; display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: #fff;
}
.card-cover.c1 { background: linear-gradient(135deg, #0c447c, #378add); }
.card-cover.c2 { background: linear-gradient(135deg, #0f6e56, #5dcaa5); }
.card-cover.c3 { background: linear-gradient(135deg, #534ab7, #af12ec); }
.card-cover.c4 { background: linear-gradient(135deg, #854f0b, #fac775); }
.card-body { padding: 20px 22px 24px; }
.card-body h3 { font-size: 18px; color: var(--primary-deep); margin-bottom: 8px; }
.card-body p { font-size: 14px; color: var(--text-sub); }
.card-body .tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.card-body .tag {
  font-size: 12px; padding: 2px 10px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary);
}

/* ---------- 简介区 ---------- */
.intro-flex {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.intro-text h2 { font-size: 26px; color: var(--primary-deep); margin-bottom: 16px; }
.intro-text p { color: var(--text-sub); font-size: 15px; margin-bottom: 12px; }
.intro-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px;
}
.stat {
  background: var(--primary-light); border-radius: var(--radius);
  text-align: center; padding: 20px 10px;
}
.stat .num { font-size: 28px; font-weight: bold; color: var(--primary); }
.stat .label { font-size: 13px; color: var(--text-sub); margin-top: 2px; }
.intro-visual {
  background: linear-gradient(160deg, var(--primary-light), #b5d4f4);
  border-radius: var(--radius); min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-dark); font-size: 60px; flex-direction: column; gap: 12px;
}
.intro-visual span { font-size: 14px; color: var(--text-sub); }

/* ---------- 新闻列表 ---------- */
.news-list { max-width: 860px; margin: 0 auto; }
.news-item {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 22px 18px; border-bottom: 1px dashed var(--border);
  transition: background 0.2s; border-radius: 6px;
}
.news-item:hover { background: var(--bg-gray); }
.news-date {
  flex-shrink: 0; text-align: center; width: 74px;
  background: var(--primary-light); border-radius: 8px; padding: 10px 0;
}
.news-date .d { font-size: 24px; font-weight: bold; color: var(--primary); line-height: 1.1; }
.news-date .m { font-size: 12px; color: var(--text-sub); }
.news-info h3 { font-size: 17px; color: var(--text-main); margin-bottom: 6px; }
.news-item:hover .news-info h3 { color: var(--primary); }
.news-info p { font-size: 14px; color: var(--text-sub); }

/* ---------- 流程步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  text-align: center; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 18px;
}
.step .no {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--primary); color: #fff; font-size: 20px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 17px; color: var(--primary-deep); margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--text-sub); }

/* ---------- 课程表格式 ---------- */
.course-table { width: 100%; border-collapse: collapse; background: #fff; }
.course-table th, .course-table td {
  border: 1px solid var(--border); padding: 14px 16px; font-size: 14px; text-align: left;
}
.course-table th { background: var(--primary-light); color: var(--primary-dark); font-size: 15px; }
.course-table tr:hover td { background: #f8fbfe; }
.course-table .hot { color: #d85a30; font-weight: bold; }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info li {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px;
}
.contact-info .ico {
  width: 42px; height: 42px; border-radius: 8px; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.contact-info h4 { font-size: 16px; color: var(--primary-deep); }
.contact-info p { font-size: 14px; color: var(--text-sub); }
.map-placeholder {
  border-radius: var(--radius); border: 1px solid var(--border);
  min-height: 280px; background: var(--bg-gray);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  color: var(--text-sub); gap: 8px;
}

/* ---------- 表单 ---------- */
.form {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px;
}
.form .field { margin-bottom: 18px; }
.form label {
  display: block; font-size: 14px; color: var(--text-main); margin-bottom: 6px;
}
.form label .req { color: #d85a30; }
.form input[type="text"], .form input[type="tel"], .form select, .form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; font-family: inherit; outline: none;
  transition: border 0.2s;
}
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--primary); }
.form textarea { min-height: 100px; resize: vertical; }
.form .submit {
  display: inline-block; width: 100%; padding: 12px; border: none;
  background: var(--primary); color: #fff; font-size: 16px;
  border-radius: 6px; cursor: pointer; transition: background 0.2s;
  font-family: inherit; letter-spacing: 2px;
}
.form .submit:hover { background: var(--primary-dark); }
.form-tip { font-size: 12px; color: var(--text-sub); margin-top: 10px; }

/* ---------- CTA ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--primary-deep), var(--primary));
  color: #fff; text-align: center; padding: 56px 20px;
}
.cta-band h2 { font-size: 26px; letter-spacing: 2px; margin-bottom: 10px; }
.cta-band p { color: #cfe0f2; margin-bottom: 24px; font-size: 15px; }
.cta-band .btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 12px 38px; border-radius: 24px; font-size: 16px;
}
.cta-band .btn:hover { background: #d98b1a; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--primary-deep); color: #9fc3e8; padding: 48px 0 0; font-size: 14px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px;
}
.footer-grid h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-grid p, .footer-grid li { margin-bottom: 8px; line-height: 1.8; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); text-align: center;
  padding: 18px 0; font-size: 13px; color: #7aa5cc;
}
.footer-bottom a { color: #9fc3e8; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom p { margin: 0; }

/* ---------- 通知条 ---------- */
.notice-tip {
  background: var(--accent-light); border: 1px dashed var(--accent);
  border-radius: var(--radius); padding: 14px 20px; font-size: 14px;
  color: #633806; margin-bottom: 28px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .card-grid, .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .intro-flex, .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-slide h2 { font-size: 28px; }
}
@media (max-width: 640px) {
  .card-grid, .card-grid.cols-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .main-nav {
    display: none; width: 100%; flex-direction: column;
    padding-bottom: 14px;
  }
  .main-nav.open { display: flex; }
  .nav-toggle {
    display: block; border: none; background: none; cursor: pointer;
    font-size: 26px; color: var(--primary-deep); padding: 6px 10px;
  }
  .site-header .container { flex-wrap: wrap; min-height: 60px; }
  .logo-text .logo-name { font-size: 16px; }
  .page-banner h1 { font-size: 22px; }
  .hero-slide h2 { font-size: 24px; }
  .news-item { flex-direction: column; gap: 10px; }
  .news-date { display: flex; align-items: baseline; gap: 6px; padding: 4px 10px; width: auto; }
}

/* ===== 证照扫描件展示 ===== */
.cert-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 32px;
}
.cert-item {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line, #e5e8f0);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(30, 60, 120, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cert-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(30, 60, 120, .14);
}
.cert-item a { display: block; }
.cert-item img {
  display: block;
  width: 100%;
  height: auto;
}
.cert-item figcaption {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary, #1e56a0);
  text-align: center;
  border-top: 1px solid var(--line, #e5e8f0);
}
.cert-note {
  margin-top: 14px;
  font-size: 13px;
  color: #8a93a6;
  text-align: center;
}

/* ===== 校区环境相册 ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.photo-grid .ph {
  position: relative;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 4px 14px rgba(30, 60, 120, .10);
  background: #eef1f6;
}
.photo-grid .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.photo-grid .ph:hover img { transform: scale(1.05); }
.photo-grid .ph figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 12px 8px;
  background: linear-gradient(transparent, rgba(10, 30, 60, .68));
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
@media (max-width: 768px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ===== 双校区到访指引 ===== */
.visit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}
.visit-grid .ph { aspect-ratio: 3 / 4; }
@media (max-width: 768px) {
  .visit-grid { grid-template-columns: 1fr; max-width: 360px; margin-left: auto; margin-right: auto; }
}

/* ===== 新闻内文配图 ===== */
.news-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.news-photos .ph { aspect-ratio: 3 / 4; }
.news-photos .ph figcaption { font-size: 12px; padding: 16px 8px 6px; }
@media (max-width: 768px) {
  .news-photos { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
