/* ============================================
   西安建筑工程技师学院 · 2026年招生简章
   Mobile H5 Page Styles — External CSS File
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --primary: #0369A1;
  --primary-light: #0EA5E9;
  --accent: #16A34A;
  --bg: #F0F9FF;
  --fg: #0C4A6E;
  --card: #FFFFFF;
  --muted: #E7F5FF;
  --muted-fg: #64748B;
  --border: #BAE6FD;
  --deep: #082F49;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(3,105,161,0.04);
  --shadow-md: 0 4px 16px rgba(3,105,161,0.06);
  --shadow-lg: 0 8px 32px rgba(3,105,161,0.08);

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.75rem;
}

/* ---- Reset & Base ---- */
* { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; font-size: 16px; }

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--fg); line-height: 1.8;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; font-weight: 400;
}

/* ---- Layout ---- */
.container { max-width: 480px; margin: 0 auto; background: var(--bg); min-height: 100vh; }

/* ============ Hero ============ */
.hero {
  position: relative; background: linear-gradient(165deg, #0369A1 0%, #075985 30%, #0C4A6E 60%, #082F49 100%);
  padding: 0; text-align: center; overflow: hidden;
}
.hero-bg-img {
  width: 100%; height: 280px; object-fit: cover; display: block;
}
.hero-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(3,105,161,0.5) 0%, rgba(8,47,73,0.85) 70%, rgba(8,47,73,0.95) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-bottom: 18px; }
.badge {
  font-size: 0.6rem; color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.12); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 16px; padding: 4px 10px;
}
.hero-title { font-size: 1.75rem; font-weight: 900; color: #FFF; letter-spacing: 2px; line-height: 1.3; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: var(--text-base); color: rgba(255,255,255,0.8); margin-top: 8px; font-weight: 300; }
.hero-code {
  display: inline-block; font-size: var(--text-sm); color: var(--primary-light);
  background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px; padding: 6px 18px; margin-top: 14px; letter-spacing: 1px;
}

/* ============ Section ============ */
.section { padding: 48px 24px; position: relative; }
.section-alt { background: var(--card); }
.section-label { font-size: var(--text-xs); font-weight: 700; color: var(--primary); letter-spacing: 2px; margin-bottom: 8px; text-transform: uppercase; }
.section-title { font-size: var(--text-2xl); font-weight: 800; color: var(--deep); letter-spacing: 0.25px; margin-bottom: 8px; line-height: 1.3; }
.divider { width: 32px; height: 3px; background: var(--primary); border-radius: 2px; margin: 8px 0 24px; opacity: 0.4; }
.section-desc { font-size: var(--text-sm); color: var(--muted-fg); line-height: 1.9; margin-bottom: 24px; }

/* ============ Stats ============ */
.stats-row { display: flex; gap: 8px; margin: 24px 0; }
.stat-card { flex: 1; background: var(--card); border-radius: var(--radius-md); padding: 16px 8px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.stat-num { font-size: var(--text-2xl); font-weight: 900; color: var(--primary); line-height: 1.1; }
.stat-unit { font-size: 0.55em; }
.stat-label { font-size: var(--text-xs); color: var(--muted-fg); margin-top: 4px; }

/* ============ Images ============ */
.img-block { width: 100%; border-radius: var(--radius-md); overflow: hidden; margin: 16px 0; box-shadow: var(--shadow-md); }
.img-block img { width: 100%; height: auto; display: block; }
.img-full { width: 100%; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); margin: 16px 0; }
.img-full img { width: 100%; height: auto; display: block; }

.img-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.img-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 16px 0; }
.img-grid-2 .img-block, .img-grid-3 .img-block { margin: 0; }

/* ============ Scroll Gallery ============ */
.scroll-gallery {
  display: flex; overflow-x: auto; gap: 8px; margin: 16px 0;
  padding: 4px 0; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-gallery::-webkit-scrollbar { display: none; }
.scroll-gallery .img-thumb {
  flex-shrink: 0; width: 140px; height: 105px; border-radius: var(--radius-sm);
  overflow: hidden; box-shadow: var(--shadow-sm); scroll-snap-align: start;
}
.scroll-gallery .img-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ============ Certificates Grid ============ */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.cert-grid .cert-item { border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.cert-grid .cert-item img { width: 100%; height: auto; display: block; }

/* ============ Info Cards ============ */
.info-card { background: var(--card); border-radius: var(--radius-md); padding: 16px; margin-bottom: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.info-card h4 { font-size: var(--text-base); font-weight: 700; color: var(--deep); margin-bottom: 8px; line-height: 1.4; }
.info-card p { font-size: var(--text-sm); color: var(--muted-fg); line-height: 1.8; }

/* ============ Honor List ============ */
.honor-list { list-style: none; }
.honor-list li {
  padding: 12px 16px; margin-bottom: 8px; background: var(--card);
  border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--fg);
  border-left: 3px solid var(--accent); box-shadow: var(--shadow-sm); line-height: 1.75;
}

/* ============ Policy Cards ============ */
.policy-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F0F9FF 100%);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 8px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.policy-card .amount { font-size: var(--text-xl); font-weight: 900; color: var(--accent); }
.policy-card .amount-inline { font-size: var(--text-base); }
.policy-card .title { font-size: var(--text-sm); font-weight: 600; color: var(--deep); margin-bottom: 4px; }
.policy-card .desc { font-size: var(--text-xs); color: var(--muted-fg); line-height: 1.7; }

/* ============ Steps ============ */
.steps { list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step); flex-shrink: 0; width: 28px; height: 28px;
  background: var(--primary); color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm); font-weight: 700;
}
.step-text { font-size: var(--text-sm); color: var(--fg); line-height: 1.75; }

/* ============ Apply Section ============ */
.apply-item {
  text-align: center;
  padding: 12px 16px 16px;
  margin-bottom: 16px;
}
.apply-phone {
  color: var(--primary);
  font-weight: 700;
}
.apply-contact {
  margin: 4px 0 0;
  font-size: var(--text-xs);
  color: var(--muted-fg);
}
.qr-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.qr-text {
  text-align: left;
  padding: 0.2rem 0;
}

/* ============ Contact ============ */
.contact-block {
  background: var(--card); border-radius: var(--radius-md); padding: 24px;
  text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.phone { font-size: var(--text-2xl); font-weight: 900; color: var(--primary); letter-spacing: 1px; text-decoration: none; display: block; }
.addr { font-size: var(--text-sm); color: var(--muted-fg); margin-top: 16px; line-height: 1.9; }
.qr-section { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.qr-section img { width: 96px; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.qr-info { font-size: var(--text-xs); color: var(--muted-fg); text-align: left; line-height: 1.6; }

/* ============ Major Cards ============ */
.major-card {
  background: var(--card); border-radius: var(--radius-md); overflow: hidden;
  margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.major-header {
  background: var(--primary); color: white; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.major-header .num {
  font-size: var(--text-xs); background: rgba(255,255,255,0.22);
  border-radius: 10px; padding: 2px 10px; font-weight: 700;
}
.major-header .name { font-size: var(--text-base); font-weight: 700; flex: 1; }
.major-body { padding: 16px; position: relative; }
.major-img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 12px; }
.goal-label, .course-label {
  font-size: var(--text-xs); font-weight: 700; color: var(--primary); margin-bottom: 4px; margin-top: 12px;
}
.goal-label:first-child { margin-top: 0; }
.goal-text, .course-text { font-size: var(--text-sm); color: var(--fg); line-height: 1.8; }
.goal-text, .course-text {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.major-body.expanded .goal-text, .major-body.expanded .course-text { display: block; -webkit-line-clamp: unset; }
.expand-btn {
  display: block; width: 100%; padding: 8px; margin-top: 4px;
  background: none; border: none; color: var(--primary); font-size: var(--text-xs);
  font-weight: 600; cursor: pointer; font-family: inherit;
}

/* ============ Req List ============ */
.req-list { list-style: none; }
.req-list li {
  font-size: var(--text-sm); color: var(--fg); padding: 12px 0 12px 20px;
  position: relative; border-bottom: 1px dashed var(--border); line-height: 1.75;
}
.req-list li:last-child { border-bottom: none; }
.req-list li::before {
  content: ''; position: absolute; left: 0; top: 17px; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
}

/* ============ Note Block ============ */
.note-block {
  background: linear-gradient(135deg, #FEFCE8 0%, #FEF9C3 100%);
  border-radius: var(--radius-md); padding: 16px; border: 1px solid #FDE68A;
  font-size: var(--text-sm); color: #854D0E; line-height: 1.85;
}

/* ============ Footer ============ */
.footer { background: var(--deep); color: rgba(255,255,255,0.7); padding: 40px 24px 130px; text-align: center; }
.logo-text { font-size: var(--text-lg); font-weight: 800; color: white; margin-bottom: 12px; letter-spacing: 1px; }
.footer .info { font-size: var(--text-xs); line-height: 2.1; margin-bottom: 16px; }
.footer a { color: var(--primary-light); text-decoration: none; }
.footer-copy { font-size: 0.65rem; opacity: 0.4; }

/* ============ Floating Phone FAB ============ */
.floating-cta {
  position: fixed; bottom: 104px; right: 16px; z-index: 100;
}

.phone-fab {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 4px; text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1);
}
.phone-fab:active { transform: scale(0.92); }

.phone-fab-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #0EA5E9 0%, #0369A1 100%);
  color: #FFF; padding: 15px; box-sizing: border-box;
  box-shadow: 0 6px 20px rgba(3,105,161,0.35), 0 2px 8px rgba(3,105,161,0.2);
  display: block; position: relative; z-index: 2;
}

.phone-fab-pulse {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(14,165,233,0.4); z-index: 1;
  animation: phonePulse 2.4s ease-out infinite;
}
@keyframes phonePulse {
  0% { transform: translateX(-50%) scale(1); opacity: 0.5; }
  70% { transform: translateX(-50%) scale(1.8); opacity: 0; }
  100% { transform: translateX(-50%) scale(1.8); opacity: 0; }
}

.phone-fab-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.62rem; font-weight: 600; color: var(--primary);
  background: rgba(255,255,255,0.92); padding: 2px 8px; border-radius: 10px;
  box-shadow: 0 1px 4px rgba(3,105,161,0.1); letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ============ Back to Top ============ */
.back-top {
  position: fixed; right: 22px; bottom: 216px; width: 40px; height: 40px;
  background: rgba(255,255,255,0.92); color: var(--primary);
  border: 1px solid var(--border); border-radius: 50%;
  font-size: 18px; cursor: pointer; box-shadow: 0 2px 12px rgba(3,105,161,0.12);
  z-index: 99; display: none; align-items: center; justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1);
  backdrop-filter: blur(8px);
}
.back-top.visible { display: flex; }
.back-top:active { transform: scale(0.9); }

/* ============ Bottom Navigation Bar ============ */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 200;
  display: flex; align-items: stretch;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 16px rgba(3,105,161,0.06);
}

@media (prefers-color-scheme: dark) {
  .bottom-nav {
    background: #111827;
    border-top-color: #1F2937;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.3);
  }
  .bottom-nav .nav-label { color: #9CA3AF; }
  .bottom-nav .nav-item.active .nav-label { color: #38BDF8; }
}

.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 4px 0; text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.16,1,0.3,1);
  -webkit-tap-highlight-color: transparent; position: relative;
}
.nav-item:active { transform: scale(0.92); }

.nav-icon {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  transition: color 0.24s cubic-bezier(0.16,1,0.3,1);
}
.nav-icon svg {
  width: 22px; height: 22px;
  transition: fill 0.24s cubic-bezier(0.16,1,0.3,1), stroke 0.24s cubic-bezier(0.16,1,0.3,1);
}
.nav-item .nav-icon svg { fill: none; stroke: var(--muted-fg); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active .nav-icon svg { stroke: var(--primary); }

@media (prefers-color-scheme: dark) {
  .nav-item .nav-icon svg { stroke: #9CA3AF; }
  .nav-item.active .nav-icon svg { stroke: #38BDF8; }
}

.nav-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.62rem; font-weight: 500; color: var(--muted-fg);
  transition: color 0.24s cubic-bezier(0.16,1,0.3,1), font-weight 0.24s cubic-bezier(0.16,1,0.3,1);
  letter-spacing: 0.3px;
}
.nav-item.active .nav-label { color: var(--primary); font-weight: 700; }

/* active indicator dot */
.nav-item::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%) scale(0);
  width: 4px; height: 4px; border-radius: 50%; background: var(--primary);
  transition: transform 0.24s cubic-bezier(0.16,1,0.3,1), background 0.24s cubic-bezier(0.16,1,0.3,1);
}
.nav-item.active::after { transform: translateX(-50%) scale(1); }

@media (prefers-color-scheme: dark) {
  .nav-item::after { background: #38BDF8; }
}

/* ripple on tap */
@keyframes navRipple {
  0% { transform: translate(-50%,-50%) scale(0); opacity: 0.25; }
  100% { transform: translate(-50%,-50%) scale(3.5); opacity: 0; }
}
.nav-item .ripple {
  position: absolute; top: 50%; left: 50%; width: 8px; height: 8px;
  border-radius: 50%; background: var(--primary); pointer-events: none;
  transform: translate(-50%,-50%) scale(0); opacity: 0;
}
.nav-item .ripple.run { animation: navRipple 0.5s cubic-bezier(0.16,1,0.3,1) forwards; }

@media (prefers-color-scheme: dark) {
  .nav-item .ripple { background: #38BDF8; }
}

/* Desktop: subtle width constraint & bigger padding */
@media (min-width: 769px) {
  .bottom-nav { padding: 8px 24px calc(8px + env(safe-area-inset-bottom)); }
  .nav-icon { width: 26px; height: 26px; }
  .nav-icon svg { width: 24px; height: 24px; }
  .nav-label { font-size: 0.68rem; }
}

/* ============ Footer bottom padding for nav ============ */
.footer { padding: 32px 20px 130px; }

/* ============ Animations ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.6s ease-out forwards; }

.dept-title {
  font-size: var(--text-lg); font-weight: 800; color: var(--primary);
  margin: 32px 0 16px; padding-left: 12px; border-left: 3px solid var(--primary); line-height: 1.3;
}

/* ============ Apply Section (inline style replacements) ============ */
.apply-item p:first-child {
  margin-bottom: 8px;
  font-size: var(--text-base);
  color: var(--fg);
}

/* ============ QR Info Hint ============ */
.qr-info .hint {
  opacity: 0.55;
  font-size: 0.72em;
}

.qr-text-title {
  margin: 0 0 4px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--primary);
}
.qr-text-desc {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted-fg);
  line-height: 1.6;
}

.apply-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
}

/* ============ Responsive ============ */
@media (min-width: 481px) { .container { box-shadow: 0 0 60px rgba(3,105,161,0.06); } }
