/* ================================
   Design Tokens (CSS Variables)
   ================================ */
:root {
  --bg: #f8fafc; /* page background */
  --text: #0f172a; /* main text */
  --muted: #64748b; /* secondary text */
  --card: #ffffff; /* card surface */
  --surface: #ffffff; /* generic surface (cards/boxes) */
  --border: #e2e8f0; /* borders */
  --brand: #155eef; /* brand accent */
  --ring: #dbeafe; /* subtle highlight / section bg */
  --primary: #2563eb; /* primary button/links */
  --primary-strong: #1d4ed8; /* darker primary */
  --shadow: 0 10px 25px -10px rgba(2, 6, 23, 0.25);
}

/* ================================
   Global Resets & Base
   ================================ */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, Apple Color Emoji, Segoe UI Emoji;
  color: var(--text);
  background: var(--bg);

  /* Respect iOS/Android safe areas (notches) */
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Lock background scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
  touch-action: none;
}

/* Central content container */
.container {
  max-width: 1120px;
  margin-inline: auto;
  padding: 0 1rem;
}

/* ================================
   Decorative Background Blobs
   ================================ */
.bg-accents {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.35;
}
.blob-a {
  width: 28rem;
  height: 28rem;
  left: -8rem;
  top: -8rem;
  background: #bfdbfe;
}
.blob-b {
  width: 22rem;
  height: 22rem;
  right: -4rem;
  top: 8rem;
  background: #dbeafe;
}

@media (max-width: 480px) {
  .blob {
    filter: blur(80px);
    opacity: 0.25;
  }
  .blob-a {
    width: 22rem;
    height: 22rem;
    left: -10rem;
    top: -10rem;
  }
  .blob-b {
    width: 18rem;
    height: 18rem;
    right: -8rem;
    top: 6rem;
  }
}

/* ================================
   Header / Navbar
   ================================ */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 30;
  padding-top: calc(env(safe-area-inset-top, 0) * 1);
}

/* main nav line: logo + links (+ toggle) */
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0.75rem 1rem;
}

/* logo anchor block */
.site-header .brand {
  display: flex;
  align-items: center;
  margin-right: 12px;
  text-decoration: none;
  color: inherit;
}

/* logo image: fixed visual size (consistent across pages) */
.site-header .logo {
  height: 60px;
  width: auto;
  display: block;
}

/* desktop nav links line */
.site-header .nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
}

/* links + dropdown trigger */
.site-header .nav-links a,
.site-header .dropdown-btn {
  color: #111827;
  text-decoration: none;
  font-size: 0.95rem;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.site-header .nav-links a:hover,
.site-header .dropdown-btn:hover {
  color: var(--primary);
}

/* current page highlight */
.nav-links .is-current,
.nav-links a.active {
  color: var(--brand);
  font-weight: 700;
}

/* dropdown container */
.has-dropdown {
  position: relative;
}

/* dropdown panel (desktop) */
.dropdown {
  position: absolute;
  left: 0;
  top: 2.4rem;
  min-width: 12rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 0.2s;
}
.dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: #111827;
  text-decoration: none;
}
.dropdown a:hover {
  background: #f8fafc;
}

/* show dropdown on hover/focus (desktop) */
.has-dropdown:focus-within .dropdown,
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* mobile hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  width: 42px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: #fff;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-left: auto;
}
.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #0f172a;
}

/* ===== Mobile nav (<=960px) ===== */
@media (max-width: 960px) {
  .site-header .nav {
    gap: 8px;
    flex-wrap: wrap;
  }
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  /* Collapsible menu container (scrollable) */
  .site-header .nav-links {
    position: absolute;
    inset-inline: 0;
    top: 64px;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 8px 16px;
    display: none;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100dvh - 64px - env(safe-area-inset-bottom, 0px));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .site-header .nav-links.open {
    display: flex;
  }

  .site-header .nav-links a,
  .site-header .dropdown-btn {
    text-align: left;
    padding: 12px 4px;
    font-size: 16px;
  }

  /* Submenu default hidden on mobile */
  .has-dropdown .dropdown {
    position: static;
    transform: none;
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    box-shadow: none;
    transition: opacity 0.2s ease;
  }
  /* Opened state */
  .has-dropdown.open .dropdown {
    opacity: 1;
    visibility: visible;
    height: auto;
    padding: 4px 0;
  }

  .has-dropdown .dropdown a {
    padding: 10px 8px;
  }
}

/* leave bottom padding for safe-area on phones */
@media (max-width: 640px) {
  .site-header .nav-links.open {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* ================================
   Hero
   ================================ */
.hero {
  padding: 4rem 1rem 3rem;
  text-align: center;
}
.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: #fff;
  color: #111827;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.hero-title {
  margin: 1rem auto 0;
  max-width: 22ch;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.t-primary {
  color: var(--primary);
}
.t-primary-strong {
  color: var(--primary-strong);
}
.hero-subtitle {
  max-width: 62ch;
  margin: 0.9rem auto 0;
  color: #475569;
  font-size: 1.05rem;
}
.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.9rem;
  padding: 0.85rem 1.15rem;
  font-weight: 600;
  text-decoration: none;
}
.btn svg {
  flex: 0 0 auto;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background: #1f54c8;
}
.btn-ghost {
  border: 1px solid #bfdbfe;
  background: #fff;
  color: #1d4ed8;
}
.btn-ghost:hover {
  background: #eff6ff;
}

/* small line break only for >= 640px */
.br-sm {
  display: none;
}
@media (min-width: 640px) {
  .br-sm {
    display: block;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem 2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ================================
   Search Panel (tabs + forms)
   ================================ */
.search {
  padding: 3rem 0;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1rem;
}

/* tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-btn {
  border: 1px solid transparent;
  background: #fff;
  color: #1e293b;
  padding: 0.55rem 0.9rem;
  border-radius: 0.8rem;
  font-weight: 600;
  flex: 0 0 auto;
}
.tab-btn.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* panels */
.tab-panel {
  margin-top: 1rem;
}

/* grid inputs */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}
.span-2 {
  grid-column: span 2;
}
.span-3 {
  grid-column: span 3;
}
.span-4 {
  grid-column: span 4;
}
.align-end {
  display: flex;
  align-items: end;
}

@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .span-2,
  .span-3,
  .span-4 {
    grid-column: span 2;
  }
}
@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .span-2,
  .span-3,
  .span-4 {
    grid-column: span 1;
  }
}

/* fields */
.field {
  display: flex;
  flex-direction: column;
}
.field span {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.field input,
.select select,
.news-form input {
  width: 100%;
  border: 1px solid var(--border);
  background: #f1f5f9; /* <-- 修正为正确值 */
  border-radius: 0.9rem;
  padding: 0.8rem 1rem;
  font: inherit;
  color: var(--text);
  min-height: 44px; /* comfy tap target */
}
.field input:focus,
.select select:focus,
.news-form input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  background: #fff;
}

/* bottom row of filters */
.row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.row.end {
  justify-content: flex-start;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
  font-size: 0.9rem;
}
.select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.select svg {
  color: #475569;
}
@media (max-width: 360px) {
  .row {
    gap: 0.6rem;
  }
}

/* ================================
   Stats Row
   ================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1.2rem;
  text-align: center;
}
.stat-num {
  font-weight: 800;
  font-size: 1.8rem;
}
.stat-label {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

@media (max-width: 1024px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* ================================
   Destinations Grid
   ================================ */
.dest {
  padding: 2.5rem 0 3rem;
}
.dest-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 1rem;
}
.dest-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.25rem);
  margin: 0 0 0.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.dest-head p {
  color: var(--muted);
  margin: 0;
}

.trip-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1024px) {
  .trip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .trip-grid {
    grid-template-columns: 1fr;
  }
}

.trip-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.media {
  position: relative;
  aspect-ratio: 16/9;
  background: #e2e8f0;
  overflow: hidden;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.trip-card:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

/* badges */
.badge {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  background: rgba(2, 132, 199, 0.92);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.badge-sale {
  right: 0.75rem;
  left: auto;
  background: rgba(234, 88, 12, 0.92);
}
.badge-indigo {
  background: rgba(79, 70, 229, 0.92);
}
.badge-teal {
  background: rgba(13, 148, 136, 0.92);
}
.badge-blue {
  background: rgba(29, 78, 216, 0.92);
}
.badge-violet {
  background: rgba(124, 58, 237, 0.92);
}
.badge-amber {
  background: rgba(217, 119, 6, 0.92);
}

/* card body */
.content {
  padding: 1rem;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.top h3 {
  margin: 0;
  font-size: 1.05rem;
}
.rating {
  color: #f59e0b;
  font-weight: 600;
}
.desc {
  color: #475569;
  font-size: 0.95rem;
  margin: 0.35rem 0 0.5rem;
}
.meta {
  display: flex;
  gap: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.8rem;
}
.price {
  font-weight: 800;
  font-size: 1.35rem;
}
.price small {
  font-weight: 600;
  color: var(--muted);
}

/* ================================
   Newsletter
   ================================ */
.newsletter {
  padding: 2.5rem 0 2rem;
}
.news-wrap {
  color: #fff;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}
.news-wrap h2 {
  margin: 0 0 0.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(1.6rem, 3.2vw, 2rem);
}
.news-sub {
  margin: 0.25rem 0 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.news-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: center;
}
.news-form input {
  grid-column: 1 / span 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font: inherit;
}
.news-form input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}
.news-form input:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}
.news-form .btn {
  grid-column: 2 / span 1;
}
.hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}
.status {
  grid-column: 1 / -1;
  margin: 0;
  font-weight: 600;
}
.status.error {
  color: #fecaca;
}
.status.success {
  color: #bbf7d0;
}

@media (max-width: 640px) {
  .news-form {
    grid-template-columns: 1fr;
  }
  .news-form .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* a11y: keep label for screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================
   Footer
   ================================ */
.site-footer {
  background: #f8f9fa;
  padding: 40px 20px;
  font-size: 14px;
  color: #333;
}
.site-footer .footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px;
  align-items: flex-start;
}
.site-footer .foot-col h3 {
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 700;
}
.site-footer .foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer .foot-col ul li {
  margin-bottom: 8px;
}
.site-footer .foot-col a {
  text-decoration: none;
  color: #111827;
  transition: color 0.3s;
}
.site-footer .foot-col a:hover {
  color: #2563eb;
}
.site-footer .contact li {
  margin-bottom: 10px;
}

.social-icon {
  width: 24px;
  height: 24px;
  margin-left: 6px;
  vertical-align: middle;
  transition: transform 0.2s ease;
}
.social-icon:hover {
  transform: scale(1.1);
}

.site-footer form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.site-footer form input[type="email"] {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.site-footer form button {
  background: #ff5722;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}
.site-footer form button:hover {
  background: #e64a19;
}

@media (max-width: 1024px) {
  .site-footer .footer {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}
@media (max-width: 640px) {
  .site-footer {
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
  .site-footer .footer {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .site-footer form {
    flex-direction: column;
  }
  .site-footer form button {
    width: 100%;
  }
}

/* ================================
   About Page
   ================================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  column-gap: 84px;
  align-items: start;
}
.about-card {
  margin-top: 28px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 24px 26px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
  position: relative;
}
.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, #e2e8f0, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.about-card h3 {
  font-size: 20px;
  margin: 0 0 12px;
}
.facts {
  margin: 0;
  padding-left: 20px;
}
.facts li {
  margin: 8px 0;
}
@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr;
    column-gap: 24px;
  }
  .about-card {
    margin-top: 16px;
  }
}

/* ================================
   Location page: map + contact form
   ================================ */
.loc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: start;
  margin-top: 12px;
}
.map-container iframe {
  width: 100%;
  height: 520px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

/* contact card */
.contact-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
  margin-top: 10px;
}
.contact-card h2 {
  font-size: 22px;
  margin: 0 0 6px;
}
.contact-card .muted {
  color: #64748b;
  margin: 0 0 10px;
  line-height: 1.5;
}
.card-sep {
  border: 0;
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin: 12px 0 16px;
}

/* form fields */
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 14px;
  background: #fff;
}
.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.btn-block {
  width: 100%;
}

/* a11y hidden labels */
.vh {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

@media (max-width: 960px) {
  .loc-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .contact-card {
    margin-top: 0;
  }
}

/* ================================
   Accessibility / Motion
   ================================ */
:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== Fix mobile menu alignment: center main items uniformly ===== */
@media (max-width: 960px) {
  /* 让每个一级菜单项占满一行，文本居中 */
  .site-header .nav-links > li {
    width: 100%;
  }

  .site-header .nav-links > li > a,
  .site-header .nav-links > li > .dropdown-btn {
    display: block;
    width: 100%;
    text-align: center; /* 关键：与其它项居中对齐 */
    padding: 12px 0; /* 与 About Us 等保持一致的上下间距 */
    margin: 0; /* 去掉按钮可能的默认 margin */
  }

  /* 子菜单仍然可读：轻微缩进、左对齐（也可改成居中） */
  .has-dropdown .dropdown a {
    display: block;
    padding: 10px 16px;
    text-align: left; /* 如果也想居中，这行改为 center */
  }
}
