.difference-head,
.difference-row {
  display: grid;
  grid-template-columns: 0.72fr 1fr 1fr;
  gap: 0;
}

.difference-head {
  color: #0f172a;
  background: #eef5f4;
  font-weight: 900;
}

.difference-head > *,
.difference-row > * {
  margin: 0;
  padding: 16px;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.difference-row span {
  color: #0f172a;
  font-weight: 880;
}

.difference-row p {
  color: #64748b;
  line-height: 1.5;
}

.difference-row p:last-child {
  color: #0f766e;
  font-weight: 760;
}

.compact-ai {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 20px;
  align-items: stretch;
}

.ai-copy {
  padding: 30px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  box-shadow: 0 16px 54px rgba(15, 23, 42, 0.06);
}

.ai-copy h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.05;
}

.ai-copy p {
  margin: 14px 0 0;
  color: #64748b;
  line-height: 1.65;
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.ai-chips button {
  min-height: 36px;
  padding: 0 12px;
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 820;
}

.destination-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.destination-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 8px;
  background: #0f172a;
  box-shadow: 0 16px 54px rgba(15, 23, 42, 0.08);
}

.destination-card:nth-child(1),
.destination-card:nth-child(3) {
  grid-column: span 2;
}

.destination-card:nth-child(6) {
  grid-column: span 2;
}

.destination-card img,
.featured-tour-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.destination-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.76));
}

.destination-card div {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  color: #fff;
}

.destination-card span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 780;
}

.destination-card h3 {
  margin: 5px 0 10px;
  font-size: 24px;
  line-height: 1;
}

.destination-card button,
.featured-tour-card button {
  min-height: 34px;
  padding: 0 12px;
  color: #0f172a;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

.featured-tour-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.featured-tour-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  box-shadow: 0 16px 54px rgba(15, 23, 42, 0.07);
}

.featured-tour-card img {
  height: auto;
  aspect-ratio: 16 / 10;
}

.featured-tour-body {
  position: relative;
  padding: 18px;
}

.tour-rating {
  position: absolute;
  top: -18px;
  right: 16px;
  min-height: 34px;
  padding: 8px 10px;
  color: #0f172a;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  font-size: 13px;
  font-weight: 900;
}

.featured-tour-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
}

.featured-tour-card p {
  margin: 8px 0 14px;
  color: #64748b;
}

.tour-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
}

.tour-price span,
.tour-price small {
  color: #64748b;
}

.tour-price strong {
  color: #0f766e;
  font-size: 24px;
}

.service-band {
  padding-bottom: 10px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-grid article {
  padding: 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
}

.service-grid h3 {
  margin: 0 0 8px;
  color: #0f172a;
}

.service-grid p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.how-it-works {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 20px;
  align-items: start;
}

.how-it-works h2,
.final-cta h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.03;
}

.how-it-works p,
.final-cta p {
  color: #64748b;
  line-height: 1.65;
}

.how-it-works ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how-it-works li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
}

.how-it-works li::before {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: #0f766e;
  border-radius: 8px;
  content: counter(step);
  counter-increment: step;
  font-weight: 900;
}

.how-it-works strong,
.how-it-works span {
  display: block;
}

.how-it-works span {
  margin-top: 4px;
  color: #64748b;
}

.trust-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.trust-card {
  padding: 18px;
  color: #fff;
  background: #0f172a;
  border-radius: 8px;
}

.trust-card strong,
.trust-card span {
  display: block;
}

.trust-card span {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.final-cta {
  margin-top: 48px;
  padding: 44px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.92), rgba(14, 116, 144, 0.76)),
    url("https://images.unsplash.com/photo-1488646953014-85cb44e25828?auto=format&fit=crop&w=1500&q=84") center/cover;
  border-radius: 8px;
}

.final-cta h2 {
  color: #fff;
}

.final-cta p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .split,
  .grid.two,
  .grid.three,
  .grid.four,
  .home-hero,
  .home-request-ai,
  .home-partner-band {
    grid-template-columns: 1fr;
  }

  .home-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-first-hero {
    display: block;
  }

  .vietnam-hero-content {
    text-align: center;
  }

  .hero-destination-rail {
    max-width: 100%;
  }

  .hero-inclusions {
    max-width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-intent-strip,
  .home-tour-grid,
  .home-feature-grid,
  .search-fields,
  .trip-builder-grid,
  .compact-ai,
  .destination-grid,
  .featured-tour-grid,
  .service-grid,
  .how-it-works,
  .trust-band,
  .trip-brief-grid,
  .ai-plan-grid,
  .trip-canvas-section,
  .budget-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .destination-card:nth-child(1),
  .destination-card:nth-child(3),
  .destination-card:nth-child(6) {
    grid-column: span 1;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell,
  .topbar,
  .page,
  .hero,
  .hero-main,
  .metric-grid,
  .panel,
  .card {
    max-width: 100%;
  }

  .page {
    width: calc(100vw - 20px);
    padding-top: 18px;
  }

  .topbar {
    padding: 12px 10px;
    overflow: hidden;
  }

  .offline-status {
    top: 0;
    padding: 8px 12px;
    justify-content: flex-start;
    font-size: 12px;
  }

  .system-notice-stack {
    position: static;
    padding: 8px 10px 0;
  }

  .system-notice {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .notice-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .nav,
  .role-switch {
    gap: 6px;
  }

  .nav button,
  .role-switch button,
  .tab-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .hero-main {
    padding: 22px;
    width: 100%;
    overflow: hidden;
  }

  .hero {
    display: block;
  }

  .hero-main h1,
  .hero-main p {
    max-width: 100%;
  }

  .metric-grid {
    margin-top: 14px;
  }

  .hero-main h1 {
    font-size: 26px;
    line-height: 1.16;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .hero-main p {
    font-size: 14px;
    line-height: 1.55;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .form-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .item-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .role-switch,
  .nav,
  .portal-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .message {
    max-width: 92%;
  }

  .chat-form {
    flex-direction: column;
  }

  .chat-form .chat-file {
    max-width: 100%;
  }

  .home-header,
  .home-hero,
  .home-section,
  .home-intent-strip,
  .home-footer {
    width: calc(100vw - 20px);
  }

  .home-header {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 10px;
  }

  .home-nav {
    grid-column: 1 / -1;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 14px;
    padding-bottom: 2px;
  }

  .home-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .home-header-actions {
    width: auto;
  }

  .home-hero-copy {
    min-height: 560px;
    padding: 24px;
  }

  .home-hero-copy h1 {
    font-size: 34px;
    line-height: 1.05;
  }

  .home-hero-copy p {
    font-size: 15px;
  }

  .home-intent-strip,
  .home-tour-grid,
  .home-feature-grid,
  .home-request-card,
  .home-ops-metrics,
  .search-fields,
  .trip-builder-grid,
  .compact-ai,
  .destination-grid,
  .featured-tour-grid,
  .service-grid,
  .how-it-works,
  .trust-band,
  .trip-brief-grid,
  .ai-plan-grid,
  .trip-canvas-section,
  .budget-section,
  .difference-head,
  .difference-row {
    grid-template-columns: 1fr;
  }

  .travel-hero {
    width: 100%;
    min-height: calc(100svh - 64px);
    padding: 26px 18px;
  }

  .travel-hero h1 {
    font-size: 78px;
    line-height: 0.78;
  }

  .travel-hero p {
    font-size: 15px;
  }

  .hero-destination-rail {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 20px;
  }

  .hero-destination-rail button {
    min-height: 120px;
  }

  .hero-destination-rail span {
    margin-top: 68px;
  }

  .hero-inclusions {
    gap: 0;
    padding: 10px 0;
  }

  .hero-inclusions span {
    min-height: 30px;
    font-size: 11px;
  }

  .travel-search {
    margin-top: 8px;
  }

  .trip-builder {
    padding: 12px;
  }

  .trip-builder::before,
  .trip-builder::after {
    display: none;
  }

  .trip-prompt textarea {
    min-height: 118px;
    font-size: 15px;
  }

  .trip-builder-actions .home-button,
  .trip-examples button {
    width: 100%;
  }

  .trip-brief-grid article {
    min-height: auto;
  }

  .ai-plan-card p {
    min-height: auto;
  }

  .trip-timeline article,
  .budget-row {
    grid-template-columns: 1fr;
  }

  .trip-timeline strong {
    white-space: normal;
  }

  .difference-head span {
    display: none;
  }

  .difference-head > *,
  .difference-row > * {
    border-right: 0;
  }

  .search-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .search-tabs button {
    flex: 0 0 auto;
  }

  .destination-card {
    min-height: 210px;
  }

  .home-section-head,
  .home-footer,
  .home-chat-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-chat-form {
    grid-template-columns: 1fr;
  }

  .home-chat-message {
    max-width: 94%;
  }

  .map-grid {
    grid-template-columns: 1fr;
  }

  .osm-map {
    min-height: 320px;
  }

  .map-stop-list {
    max-height: none;
  }
}
