/* ============================================
   留学广西国际教育展 - H5移动端样式
   设计基准: 375px, font-size: 14px
   ============================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  color: #333; background: #f5f5f5; line-height: 1.5;
  max-width: 750px; margin: 0 auto; min-height: 100vh;
  padding-bottom: 60px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
input, textarea, button { font-family: inherit; font-size: inherit; outline: none; border: none; }
ul, ol { list-style: none; }

/* ---------- Top Header ---------- */
.top-header {
  position: sticky; top: 0; z-index: 100;
  padding: 0; background: #1a73e8;
}
.header-inner {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
}
.search-box {
  flex: 1; display: flex; align-items: center;
  background: #fff; border-radius: 20px; padding: 6px 14px;
}
.search-box .s-icon { color: #999; flex-shrink: 0; margin-right: 6px; }
.search-box input {
  flex: 1; background: transparent; color: #333; font-size: .85rem;
}
.search-box input::placeholder { color: #bbb; }
.msg-icon { color: #fff; padding: 4px; display: flex; align-items: center; }

/* 搜索下拉 */
.search-dropdown {
  position: absolute; left: 12px; right: 12px; top: 100%;
  background: #fff; border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  max-height: 320px; overflow-y: auto; z-index: 200;
}
.search-results { padding: 8px 0; }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid #f5f5f5;
}
.search-result-item:last-child { border-bottom: none; }
.sr-thumb { width: 48px; height: 36px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.sr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sr-info { flex: 1; min-width: 0; }
.sr-info .sr-title { font-size: .85rem; color: #333; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-info .sr-type { font-size: .7rem; color: #999; margin-top: 2px; }
.sr-empty { padding: 30px 14px; text-align: center; color: #999; font-size: .8rem; }
.sr-all {
  display: block; text-align: center; padding: 10px;
  font-size: .8rem; color: #1a73e8; border-top: 1px solid #eee;
}

/* ---------- Page Header (subpages) ---------- */
.page-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  background: #1a73e8; color: #fff; padding: 12px 16px;
}
.page-header .back-btn { font-size: 1.5rem; line-height: 1; padding: 0 4px; }
.page-header h1 { flex: 1; text-align: center; font-size: 1.1rem; font-weight: 500; }
.page-header .header-right { width: 30px; }

/* ---------- Banner（纯图片，自适应高度） ---------- */
.banner-carousel {
  position: relative; margin: 10px 12px; border-radius: 10px; overflow: hidden;
  background: #eee; line-height: 0;
}
.carousel-wrapper { display: flex; overflow: hidden; width: 100%; }
.carousel-slide { min-width: 100%; transition: transform .4s ease; }
.carousel-slide img { width: 100%; height: auto; display: block; }
.carousel-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px;
}
.carousel-dots .dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); transition: .3s;
}
.carousel-dots .dot.active { width: 18px; border-radius: 3px; background: #fff; }

/* ---------- 四宫格导航（一体式四等分） ---------- */
.grid-nav-block {
  display: flex; margin: 0 12px; border-radius: 10px; overflow: hidden; line-height: 0;
}
.grid-part {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.grid-part .grid-img { width: 100%; height: auto; display: block; }

/* ---------- 预约咨询板块（纯图片自适应） ---------- */
.consult-section {
  margin: 10px 12px; border-radius: 10px; overflow: hidden; line-height: 0;
}
.consult-section .consult-img { width: 100%; height: auto; display: block; }

/* ---------- School Section ---------- */
.school-section { margin: 0 12px 10px; }
.section-title { font-size: 1.1rem; font-weight: 600; color: #222; margin-bottom: 8px; }

/* Category Tabs */
.category-tabs {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 0 10px; scrollbar-width: none; white-space: nowrap;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs .tab-item {
  flex-shrink: 0; padding: 5px 16px; border-radius: 14px;
  font-size: .8rem; background: #eee; color: #666; cursor: pointer; transition: .3s;
}
.category-tabs .tab-item.active { background: #1a73e8; color: #fff; }

/* School Cards (Grid) */
.school-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.school-card {
  background: #fff; border-radius: 10px; overflow: hidden; display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .2s;
}
.school-card:active { transform: scale(.97); }
.school-cover { overflow: hidden; line-height: 0; }
.school-cover img { width: 100%; height: auto; display: block; }
.school-info { padding: 8px 10px 10px; }
.school-info h4 { font-size: .85rem; font-weight: 500; color: #222; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.school-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: .65rem; background: #e8f0fe; color: #1a73e8;
}
.tag-lg { padding: 3px 10px; font-size: .75rem; }

/* ---------- School List (Horizontal Card) ---------- */
.school-list-container { margin: 0 12px; }
.school-card-h {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 10px; padding: 10px 12px;
  margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.school-card-h .card-cover { width: 72px; height: 54px; border-radius: 6px; overflow: hidden; flex-shrink: 0; line-height: 0; }
.school-card-h .card-cover img { width: 100%; height: 100%; object-fit: cover; }
.school-card-h .card-body { flex: 1; min-width: 0; }
.school-card-h .card-body h3 { font-size: .85rem; font-weight: 500; margin-bottom: 4px; }
.school-card-h .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.school-card-h .card-arrow { font-size: 1.2rem; color: #ccc; }
.search-bar { padding: 10px 12px; }
.search-bar form { display: flex; gap: 8px; }
.search-bar input {
  flex: 1; padding: 8px 14px; border-radius: 20px; background: #fff;
  border: 1px solid #ddd; font-size: .85rem;
}
.search-bar button {
  padding: 8px 18px; background: #1a73e8; color: #fff;
  border-radius: 20px; font-size: .85rem; cursor: pointer;
}
.empty-state { padding: 60px 20px; text-align: center; color: #999; font-size: .9rem; }
.scroll-tabs { margin: 0 12px; }

/* ---------- Detail Page ---------- */
.detail-cover { width: 100%; overflow: hidden; background: #eee; line-height: 0; }
.detail-cover img { width: 100%; height: auto; display: block; }
.detail-body { padding: 14px; }
.detail-title { font-size: 1.15rem; font-weight: 600; color: #222; margin-bottom: 8px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.detail-content { line-height: 1.8; font-size: .9rem; color: #444; }
.detail-content h3 { font-size: 1.05rem; color: #222; margin: 14px 0 8px; }
.detail-content p { margin-bottom: 8px; }
.detail-content img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.detail-actions {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 750px;
  display: flex; gap: 10px; padding: 10px 14px;
  background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.08);
}
.action-btn {
  flex: 1; padding: 10px 0; text-align: center; border-radius: 22px;
  font-size: .9rem; font-weight: 500; cursor: pointer;
}
.action-btn.primary { background: #1a73e8; color: #fff; }
.action-btn.secondary { background: #f0f0f0; color: #333; }

/* ---------- 底部功能按钮（纯图片） ---------- */
.bottom-func {
  display: flex; margin: 10px 12px; border-radius: 10px; overflow: hidden; line-height: 0;
}
.func-block { flex: 1; display: flex; align-items: center; justify-content: center; }
.func-block .func-img { width: 100%; height: auto; display: block; }

/* ---------- Bottom Tab ---------- */
.bottom-tab {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 750px;
  display: flex; background: #fff; border-top: 1px solid #eee;
  padding: 5px 0; padding-bottom: env(safe-area-inset-bottom, 6px);
  z-index: 200;
}
.bottom-tab .tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 1px; font-size: .65rem; color: #999; padding: 3px 0;
}
.bottom-tab .tab-item .tab-i { color: #999; }

/* IconPark: overrides for iconpark-icon to use currentColor */
iconpark-icon { display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; padding: 16px; font-size: .7rem; color: #999; }

/* ---------- Enquiry Form ---------- */
.form-page { padding: 14px; }
.enquiry-form { background: #fff; border-radius: 12px; padding: 18px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .85rem; color: #333; margin-bottom: 5px; font-weight: 500; }
.form-group input, .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd;
  border-radius: 8px; font-size: .85rem; background: #fafafa; transition: .2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: #1a73e8; background: #fff; }
.submit-btn {
  width: 100%; padding: 12px; background: #1a73e8; color: #fff;
  border-radius: 22px; font-size: .95rem; font-weight: 500; cursor: pointer; transition: .3s;
}
.submit-btn:active { opacity: .85; }

/* ---------- Bottom Safe Area ---------- */
.bottom-safe { height: 70px; }
