*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red: #DE2910;
  --gold: #FFDE00;
  --dark: #1a1a2e;
  --gray: #f5f5f5;
  --text: #333;
  --text-light: #666;
}
body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========== Header ========== */
header {
  background: var(--dark);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  width: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
  cursor: default;
}
.logo span { color: var(--gold); }

/* ========== Header Nav ========== */
.cat-nav-header {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}
.cat-nav-header a, .cat-nav-header span.crumb {
  color: #bbb;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-nav-header a:hover { color: var(--gold); background: rgba(255,255,255,0.05); }
.cat-nav-header a.active, .cat-nav-header span.crumb.current {
  color: var(--gold);
  font-weight: 600;
  background: rgba(255,222,0,0.08);
  pointer-events: none;
}

/* ========== Search Box ========== */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 0.75rem;
}
.search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #fff;
}
.search-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #fff;
  padding: 0.35rem 0.8rem 0.35rem 2rem;
  font-size: 0.85rem;
  width: 320px;
  outline: none;
  transition: all 0.25s;
}
.search-input::placeholder {
  color: rgba(255,255,255,0.45);
}
.search-input:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--gold);
  width: 400px;
}

/* ========== Page Header ========== */
.page-header {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 260px;
  padding: 0 2rem;
  text-align: center;
  border-bottom: 1px solid #e8e8e8;
}
.page-header h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.page-header p { color: var(--text-light); font-size: 1rem; }

/* ========== Hero (Home) ========== */
.hero {
  background-color: #1a1a2e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 260px;
  padding: 0 2rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 2rem;
  color: #aaa;
}

/* ========== Hero Backgrounds ========== */
.hero, .page-header {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero::before, .page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 0;
  pointer-events: none;
}
.hero h1, .hero p, .hero .hl-line,
.page-header h1, .page-header p {
  position: relative;
  z-index: 1;
  color: #fff;
}
.page-header p { color: rgba(255,255,255,0.85); }
.hero-home { background-image: url("img/hero/hero-home-desktop.webp"); background-position: center center; }
.hero-before { background-image: url("img/hero/hero-before-desktop.webp"); background-position: center 8%; }
.hero-transport { background-image: url("img/hero/hero-transport-desktop.webp"); background-position: center 100%; }
.hero-explore { background-image: url("img/hero/hero-explore-desktop.webp"); background-position: center 12%; }

@media (max-width: 768px) {
  .hero-home { background-image: url("img/hero/hero-home-mobile.webp"); background-position: center center; }
  .hero-before { background-image: url("img/hero/hero-before-mobile.webp"); background-position: center 8%; }
  .hero-transport { background-image: url("img/hero/hero-transport-mobile.webp"); background-position: center 100%; }
  .hero-explore { background-image: url("img/hero/hero-explore-mobile.webp"); background-position: center 12%; }
  .hero::before, .page-header::before {
    background: rgba(0,0,0,0.30);
  }
}


/* ========== Featured Section ========== */
.featured {
  padding: 0 2rem 2rem;
  margin-top: 3rem;
}
.featured-header {
  margin-bottom: 1rem;
}
.featured-header .tag {
  background: var(--red);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  display: inline-block;
  font-weight: 700;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.article-card {
  display: block;
  text-decoration: none;
  padding: 1.2rem 0 1rem;
  border-top: 1px solid #e0e0e0;
}
.article-card:hover h3 {
  color: var(--red);
}
.article-card h3 {
  font-size: 1.1rem;
  color: var(--dark);
  margin: 0;
  line-height: 1.5;
  transition: color 0.2s;
}

/* ========== Quick Access Cards ========== */
.quick-access {
  margin-top: 3rem;
  padding: 0 2rem 3rem;
}
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.quick-card {
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.quick-card.visa-check {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
.quick-card.payment {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.quick-card .qa-icon { font-size: 2.2rem; margin-bottom: 0.8rem; }
.quick-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; }
.quick-card p { font-size: 0.88rem; color: rgba(255,255,255,0.85); line-height: 1.5; }

/* ========== Sub-category Tabs ========== */
.subcat-tabs {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem;
}
.tab-nav {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  border-bottom: 2px solid #e0e0e0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-nav-empty {
  height: 51px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 0.9rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--red);
  border-bottom-color: var(--red);
}
.tab-content {
  display: none;
}
.tab-content.active { display: block; }
.tab-content h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

/* ========== Content Area (grey background) ========== */
.content-area {
  background: #fff;
  background-clip: content-box;
  flex: 1;
  padding: 0 2rem;
}

/* ========== Footer ========== */
footer {
  background: var(--dark);
  color: #888;
  text-align: center;
  padding: 1.25rem 2rem;
  font-size: 0.85rem;
  margin-top: auto;
}
footer p {
  max-width: 700px;
  margin: 0 auto;
}
footer a { color: var(--gold); text-decoration: none; }

/* ========== Mobile Bottom Tab Nav ========== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark);
  z-index: 99;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0 env(safe-area-inset-bottom, 0.5rem);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #999;
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.4rem 0.3rem;
  min-width: 55px;
  transition: color 0.2s;
  text-align: center;
}
.bottom-nav a:hover, .bottom-nav a.active { color: var(--gold); }
.bottom-nav .nav-item.current {
  color: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.4rem 0.3rem;
  min-width: 55px;
  text-align: center;
}
.bottom-nav a .nav-icon { font-size: 1.25rem; margin-bottom: 0.15rem; }
.bottom-nav .nav-item.current .nav-icon { font-size: 1.25rem; margin-bottom: 0.15rem; }

/* Search overlay — default hidden, only visible on mobile when opened */
.mobile-search-overlay { display: none; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .hero, .page-header {
    min-height: 160px;
    justify-content: flex-start;
    padding-top: 1.2rem;
  }
  .page-header h1 { font-size: 1.4rem; }
  .page-header p { font-size: 0.875rem; }
  .guide-list-wrapper { padding: 0 !important; }
  .hero h1 { font-size: 1.4rem; margin-bottom: 0.375rem; }
  .hero h1 .hl-line { display: block; }
  .featured-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .featured {
    margin-top: 1.5rem;
    padding: 0 1.25rem 6rem;
  }
  .featured-header { margin-bottom: 0.5rem; }
  .article-card { padding: 0.7rem 0; }
  .article-card h3 { font-size: 0.95rem; }

  /* 首页间距压紧 */
  .quick-access {
    margin-top: 1rem;
    padding: 0 1.25rem 0.5rem;
  }

  /* 导航卡手机压缩 */
  .quick-card .qa-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }
  .quick-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
  .quick-card p { font-size: 0.78rem; }

  .bottom-nav { display: block; }
  .bottom-nav-inner { padding: 0.25rem 0; }
  .bottom-nav a { min-width: auto; padding: 0.2rem 0.1rem; font-size: 0.55rem; }
  .bottom-nav a .nav-icon { font-size: 0.95rem; margin-bottom: 0.08rem; }
  .bottom-nav .nav-item.current { min-width: auto; padding: 0.2rem 0.1rem; }
  .bottom-nav .nav-item.current .nav-icon { font-size: 0.95rem; margin-bottom: 0.08rem; }

  /* Hide desktop cat-nav on mobile, show bottom nav */
  .cat-nav-header { display: none; }

  /* Mobile search: overlay pops from top */
  .search-container {
    /* keep as-is, just show the icon */
    margin-left: auto;
  }
  .search-input {
    display: none !important;
  }
  .search-icon {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    font-size: 1.3rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 1;
  }

  /* Search overlay */
  .mobile-search-overlay {
    display: none;
    position: fixed;
    top: 51px;
    left: 0;
    right: 0;
    z-index: 200;
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .mobile-search-overlay.open {
    display: block;
  }
  .mobile-search-overlay .ms-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .mobile-search-overlay .ms-bar input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    outline: none;
  }
  .mobile-search-overlay .ms-bar input::placeholder {
    color: rgba(255,255,255,0.4);
  }
  .mobile-search-overlay .ms-bar input:focus {
    background: rgba(255,255,255,0.18);
  }
  .mobile-search-overlay .ms-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
  }
  .mobile-search-overlay .ms-close:active {
    background: rgba(255,255,255,0.1);
  }

  footer { display: none; }
  .tab-btn { font-size: 0.75rem; padding: 0.4rem 0.6rem; white-space: nowrap; }
  body { padding-bottom: 50px; }
}

@media (max-width: 640px) {
  .quick-card { padding: 0.6rem; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 1.5rem; }
}


/* Article list in tabs */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 0 3rem;
}
.article-link {
  font-size: 1.05rem;
  color: #0479A8;
  text-decoration: underline;
  padding: 0.15rem 0;
  transition: color 0.2s;
}
.article-link:hover {
  color: #035d83;
}
/* Guide listing pages — center article list (before-you-go, getting-around) */
.guide-list-wrapper {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem;
}
.guide-list-wrapper .article-link {
  display: block;
  padding: 0.65rem 1rem;
  background: #f8f8f8;
  border-radius: 6px;
}
.guide-list-wrapper .article-link:hover {
  background: #eef2f6;
}
/* Article detail pages — body class */
body.article-page {
  background: #fff;
  height: 100vh;
}
.article-page-inner {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}
.article-page-inner .back-link {
  display: block;
  margin-bottom: 1.5rem;
  color: #666;
  text-decoration: none;
  font-size: 0.95rem;
}
.article-page-inner .back-link:hover {
  color: #333;
  text-decoration: underline;
}
.article {
  font-size: 18px;
  line-height: 1.6;
  color: #333;
}
.article h1 {
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 1.5rem;
  color: #222;
  font-weight: 700;
}
.article h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 2rem 0 1rem;
  color: #222;
  font-weight: 600;
}
.article h3 {
  font-size: 19px;
  line-height: 1.3;
  margin: 1.5rem 0 0.8rem;
  color: #333;
  font-weight: 600;
}
.article p,
.article .last-updated {
  margin-bottom: 1.5rem;
}
.article a {
  color: #0479A8;
  text-decoration: underline;
}
.article a:hover {
  color: #035d83;
}
.article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem auto;
  display: block;
}
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.article th,
.article td {
  padding: 0.6rem 0.8rem;
  border: 1px solid #e0e0e0;
  text-align: left;
}
.article th {
  background: #f5f5f5;
  font-weight: 600;
}
.article ul,
.article ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}
.article li {
  margin-bottom: 0.3rem;
}
.article em {
  color: #666;
}
.article strong {
  font-weight: 600;
  color: #222;
}

/* ========== Article References Section ========== */
.article .ref-separator {
  border: none;
  border-top: 2px solid #d0d0d0;
  margin: 3.5rem 0 2.5rem;
  width: 100%;
}
.article .article-refs {
  font-size: 0.875rem;
  color: #777;
  line-height: 1.6;
  border-left: 2px solid #e0e0e0;
  padding-left: 1rem;
}
.article .article-refs .refs-note {
  font-style: italic;
  margin-bottom: 0.75rem;
}
.article .article-refs .refs-title {
  font-weight: 600;
  color: #555;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article .article-refs .refs-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}
.article .article-refs .refs-list li {
  margin-bottom: 0.3rem;
  padding-left: 0;
}
.article .article-refs .refs-disclaimer {
  font-size: 0.8rem;
  color: #999;
  font-style: italic;
  margin-top: 0.5rem;
}

/* ========== Mobile Legal Strip ========== */
.mobile-legal {
  display: none;
}
@media (max-width: 768px) {
  .mobile-legal {
    display: block;
    text-align: center;
    padding: 1rem 1rem 1.5rem;
    font-size: 0.7rem;
    color: #999;
    margin-top: auto;
  }
  .mobile-legal a {
    color: #999;
    text-decoration: none;
    margin: 0 0.3rem;
  }
}

