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

:root {
  --primary: #0C447C;
  --primary-light: #185FA5;
  --primary-lighter: #378ADD;
  --accent: #EF9F27;
  --accent-dark: #BA7517;
  --danger: #E24B4A;
  --danger-bg: #FCEBEB;
  --success: #1D9E75;
  --text: #1a1a2e;
  --text-muted: #5F5E5A;
  --text-light: #8a8a8a;
  --bg: #ffffff;
  --bg-alt: #F4F6F9;
  --bg-dark: #0a2540;
  --border: #e2e8f0;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(12,68,124,0.08);
  --shadow-lg: 0 12px 40px rgba(12,68,124,0.12);
  --container: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }

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

/* ===== Layout ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head .eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent-dark);
  background: #FAEEDA; padding: 5px 14px; border-radius: 20px; margin-bottom: 16px;
}
.section-head h2 { font-size: 32px; font-weight: 700; color: var(--primary); margin-bottom: 14px; line-height: 1.3; }
.section-head p { font-size: 16px; color: var(--text-muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: var(--radius); font-size: 15px; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s; font-family: var(--font);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-blue { background: var(--primary-light); color: #fff; }
.btn-blue:hover { background: var(--primary); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; }
.btn-lg { padding: 16px 36px; font-size: 16px; }

/* ===== Navbar ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); transition: box-shadow .3s;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; color: var(--primary); }
.nav-brand .logo-mark {
  width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 800;
}
.nav-brand .logo-img {
  height: 36px; width: auto; object-fit: contain;
}
.nav-brand span { color: var(--accent); }
.nav-menu { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-menu a { font-size: 15px; font-weight: 500; color: var(--text); position: relative; }
.nav-menu a:hover { color: var(--primary-light); }
.nav-menu a.active { color: var(--primary-light); }
.nav-menu a.active::after {
  content: ''; position: absolute; bottom: -22px; left: 0; right: 0; height: 2.5px;
  background: var(--accent); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--primary); }

/* ===== Hero ===== */
.hero {
  position: relative; padding: 150px 0 100px; overflow: hidden;
  background: linear-gradient(135deg, #0a2540 0%, #0C447C 50%, #185FA5 100%);
  color: #fff;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(239,159,39,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 100px;
  background: linear-gradient(to top, var(--bg), transparent);
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero .tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  background: rgba(239,159,39,0.18); color: var(--accent); padding: 7px 16px; border-radius: 20px; margin-bottom: 24px;
  border: 1px solid rgba(239,159,39,0.3);
}
.hero h1 { font-size: 46px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { font-size: 18px; line-height: 1.8; color: rgba(255,255,255,0.85); margin-bottom: 36px; max-width: 600px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Page Hero (inner pages) ===== */
.page-hero {
  padding: 130px 0 70px; background: linear-gradient(135deg, #0a2540, #0C447C);
  color: #fff; text-align: center;
}
.page-hero h1 { font-size: 38px; font-weight: 800; margin-bottom: 14px; }
.page-hero p { font-size: 17px; color: rgba(255,255,255,0.8); max-width: 620px; margin: 0 auto; }
.breadcrumb { margin-top: 20px; font-size: 14px; color: rgba(255,255,255,0.6); }
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb a:hover { color: var(--accent); }

/* ===== Features Grid ===== */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px 28px; transition: all .3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-card .icon {
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 20px;
}
.icon-blue { background: #E6F1FB; color: var(--primary-light); }
.icon-amber { background: #FAEEDA; color: var(--accent-dark); }
.icon-green { background: #E1F5EE; color: var(--success); }
.icon-red { background: var(--danger-bg); color: var(--danger); }
.feature-card h3 { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ===== Danger Classes Grid ===== */
.danger-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.danger-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; transition: all .3s; position: relative; overflow: hidden;
}
.danger-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--danger);
}
.danger-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.danger-card .class-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px; background: var(--danger-bg); color: var(--danger);
  font-size: 20px; font-weight: 800; margin-bottom: 16px;
}
.danger-card h3 { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.danger-card .subtitle { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.danger-card ul { list-style: none; }
.danger-card ul li { font-size: 14px; color: var(--text-muted); padding: 5px 0 5px 22px; position: relative; }
.danger-card ul li::before {
  content: ''; position: absolute; left: 0; top: 12px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
}
.danger-card .badge {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--success);
  background: #E1F5EE; padding: 4px 12px; border-radius: 6px; margin-top: 16px;
}

/* ===== Stats Band ===== */
.stats-band {
  background: var(--bg-dark); color: #fff; padding: 60px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-item .num { font-size: 42px; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-item .num span { font-size: 24px; }
.stat-item .label { font-size: 15px; color: rgba(255,255,255,0.7); margin-top: 10px; }

/* ===== Partners ===== */
.partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; align-items: center; }
.partner-logo {
  font-size: 18px; font-weight: 700; color: var(--text-light); padding: 12px 28px;
  border: 1.5px dashed var(--border); border-radius: var(--radius); opacity: 0.7; transition: all .3s;
}
.partner-logo:hover { opacity: 1; color: var(--primary); border-color: var(--primary-lighter); }

/* ===== CTA Band ===== */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg); padding: 56px 60px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; top: -40%; right: -5%; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(239,159,39,0.2), transparent 70%); border-radius: 50%;
}
.cta-band h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; position: relative; }
.cta-band p { font-size: 16px; color: rgba(255,255,255,0.85); position: relative; }

/* ===== Routes Table ===== */
.routes-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.route-block { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.route-block h3 { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.route-block .desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.route-list { display: flex; flex-wrap: wrap; gap: 10px; }
.route-chip {
  font-size: 14px; padding: 8px 16px; border-radius: 8px; background: var(--bg-alt);
  color: var(--text); border: 1px solid var(--border); font-weight: 500;
}
.route-chip strong { color: var(--primary-light); }

.transit-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.transit-table th { text-align: left; font-size: 13px; color: var(--text-light); font-weight: 600; padding: 12px 16px; border-bottom: 2px solid var(--border); }
.transit-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.transit-table tr:last-child td { border-bottom: none; }
.transit-table tr:hover td { background: var(--bg-alt); }
.transit-table .days { font-weight: 700; color: var(--success); }

/* ===== Form ===== */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-group label .req { color: var(--danger); }
.form-group .hint { font-size: 12px; color: var(--text-light); margin-top: 5px; }
.form-control {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: var(--font);
  border: 1.5px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { outline: none; border-color: var(--primary-lighter); box-shadow: 0 0 0 3px rgba(55,138,221,0.12); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-section-title {
  font-size: 16px; font-weight: 700; color: var(--primary); margin: 28px 0 18px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px;
}
.form-section-title:first-child { margin-top: 0; }

/* ===== About / Qualifications ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-text h2 { font-size: 30px; font-weight: 800; color: var(--primary); margin-bottom: 18px; }
.about-text p { font-size: 16px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.8; }
.about-points { list-style: none; margin-top: 24px; }
.about-points li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; font-size: 15px; }
.about-points li .check { color: var(--success); font-size: 18px; font-weight: 700; flex-shrink: 0; }

.qual-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.qual-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; text-align: center; transition: all .3s; }
.qual-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.qual-card .cert-icon {
  width: 64px; height: 64px; border-radius: 14px; margin: 0 auto 18px;
  background: #E6F1FB; color: var(--primary-light); display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800;
}
.qual-card h3 { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.qual-card p { font-size: 13px; color: var(--text-muted); }

/* ===== FAQ ===== */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; padding: 18px 24px; font-size: 15px; font-weight: 600; color: var(--text);
  background: #fff; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font);
}
.faq-q:hover { background: var(--bg-alt); }
.faq-q .arrow { transition: transform .3s; color: var(--primary-light); font-size: 18px; }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 24px 18px; font-size: 14px; color: var(--text-muted); line-height: 1.8; }
.faq-item.open .faq-a { max-height: 300px; }

/* ===== Footer ===== */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .nav-brand { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.8; max-width: 320px; }
.footer-col h4 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.65); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-contact li { font-size: 14px; color: rgba(255,255,255,0.65); padding: 4px 0; display: flex; gap: 8px; }
.footer-bottom { padding: 24px 0; text-align: center; font-size: 13px; color: rgba(255,255,255,0.4); }

/* ===== Floating Side Buttons ===== */
.float-btns {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px; z-index: 1000;
}
.float-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 12px;
  background: var(--primary); color: #fff;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(12,68,124,0.25);
  transition: all 0.25s ease;
  font-size: 11px; line-height: 1.3; text-align: center;
  gap: 4px; border: none; user-select: none;
}
.float-btn:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(12,68,124,0.35); }
.float-btn-track { background: var(--accent); }
.float-btn-track:hover { background: var(--accent-dark); }
.float-icon { width: 22px; height: 22px; flex-shrink: 0; }

/* QR Popup */
.qrcode-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 2000; backdrop-filter: blur(2px);
}
.qrcode-overlay.show { display: block; }
.qrcode-popup {
  display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 2001; background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 32px 28px 24px;
  text-align: center; max-width: 320px; width: 90%;
}
.qrcode-popup.show { display: block; }
.qrcode-popup h3 { font-size: 17px; color: var(--primary); margin-bottom: 16px; }
.qrcode-close {
  position: absolute; top: 10px; right: 14px;
  font-size: 24px; color: #999; cursor: pointer; line-height: 1;
  background: none; border: none;
}
.qrcode-close:hover { color: var(--text); }
.qrcode-img-wrapper { margin: 0 auto 14px; width: 200px; height: 200px; }
.qrcode-img-wrapper img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.qrcode-placeholder {
  width: 200px; height: 200px; border: 2px dashed #ddd; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fafafa; color: #999; font-size: 13px;
}
.qrcode-placeholder svg { width: 80px; height: 80px; margin-bottom: 10px; opacity: 0.4; }
.qrcode-tip { font-size: 13px; color: var(--text-muted); margin-top: 8px; line-height: 1.6; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .danger-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .qual-grid { grid-template-columns: repeat(2, 1fr); }
  .routes-wrap { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-menu { display: none; }
  .nav-toggle { display: block; }
  .nav-menu.open {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; padding: 20px 24px; gap: 18px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav-menu.open a.active::after { display: none; }
  .hero { padding: 120px 0 80px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .section { padding: 56px 0; }
  .section-head h2 { font-size: 26px; }
  .features-grid, .danger-grid, .stats-grid, .qual-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 28px; flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .float-btns { right: 8px; gap: 8px; }
  .float-btn { width: 52px; height: 52px; font-size: 10px; border-radius: 10px; }
  .float-icon { width: 18px; height: 18px; }
}
