/* ═══════════════════════════════════════════════════════════
   JustGoThai — Tropical Editorial Design System
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Deep tropical palette */
  --bg: #f5f0e8;
  --bg-2: #faf7f1;
  --surface: rgba(255, 253, 249, 0.88);
  --surface-strong: rgba(255, 252, 247, 0.95);
  --surface-elevated: rgba(255, 255, 255, 0.92);

  /* Ink & text */
  --ink: #0a1a18;
  --ink-2: #1a2e2b;
  --muted: #4d6560;
  --muted-2: #7a918c;

  /* Brand colors — deep teal & warm gold */
  --brand: #0d4f47;
  --brand-light: #1a7a6e;
  --brand-surface: rgba(13, 79, 71, 0.08);
  --accent: #c77b2e;
  --accent-light: #e0a050;
  --accent-surface: rgba(199, 123, 46, 0.1);

  /* Borders & effects */
  --line: rgba(10, 26, 24, 0.09);
  --line-strong: rgba(10, 26, 24, 0.16);
  --shadow-sm: 0 2px 8px rgba(10, 26, 24, 0.06);
  --shadow: 0 8px 32px rgba(10, 26, 24, 0.08);
  --shadow-lg: 0 20px 60px rgba(10, 26, 24, 0.12);
  --shadow-hover: 0 16px 48px rgba(10, 26, 24, 0.14);

  /* Radii */
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 10px;

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.35s;
}

/* ── Reset ───────────────────────────────────────────────── */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-optical-sizing: auto;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(13, 79, 71, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 0%, rgba(199, 123, 46, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(13, 79, 71, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
}

a,
button,
input,
select {
  font: inherit;
}

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

code {
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  background: rgba(10, 26, 24, 0.06);
  font-size: 0.88em;
}

/* ── Fade-in animations ──────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-in {
  animation: fadeUp 0.6s var(--ease) both;
}

.animate-in:nth-child(2) { animation-delay: 0.08s; }
.animate-in:nth-child(3) { animation-delay: 0.16s; }
.animate-in:nth-child(4) { animation-delay: 0.24s; }
.animate-in:nth-child(5) { animation-delay: 0.32s; }

/* ── Shell ───────────────────────────────────────────────── */

.site-shell {
  width: min(1320px, calc(100vw - 32px));
  margin: 16px auto 48px;
}

/* ── Header ──────────────────────────────────────────────── */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 12px;
  z-index: 100;
  transition: box-shadow var(--duration) var(--ease);
}

.site-header:hover {
  box-shadow: var(--shadow);
}

.site-footer {
  margin-top: 24px;
  position: static;
  border-radius: var(--radius);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-surface);
  padding: 4px 10px;
  border-radius: 6px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.brand-mark__title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* ── Navigation ──────────────────────────────────────────── */

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s var(--ease);
  position: relative;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(10, 26, 24, 0.04);
}

.site-nav a.is-active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

/* ── App root ────────────────────────────────────────────── */

.app-root {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

/* ── Shared card base ────────────────────────────────────── */

.poster-hero,
.content-panel,
.page-hero,
.filter-panel,
.listing-panel,
.destination-card,
.tour-card,
.detail-hero,
.destination-hero,
.story-card,
.theme-card,
.editorial-band article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: all var(--duration) var(--ease);
}

/* ── Poster hero ─────────────────────────────────────────── */

.poster-hero {
  position: relative;
  overflow: hidden;
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.45fr);
  align-items: end;
  background: #0a2622;
  color: #faf7f1;
  animation: scaleIn 0.7s var(--ease) both;
}

.poster-hero__image,
.poster-hero__overlay {
  position: absolute;
  inset: 0;
}

.poster-hero__image {
  background:
    url("https://images.unsplash.com/photo-1519451241324-20b4ea2c4220?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.poster-hero__overlay {
  background:
    linear-gradient(135deg, rgba(10, 38, 34, 0.92) 0%, rgba(10, 38, 34, 0.5) 40%, rgba(10, 38, 34, 0.75) 100%),
    radial-gradient(circle at 70% 20%, rgba(199, 123, 46, 0.2), transparent 40%);
}

.poster-hero__content,
.poster-hero__aside {
  position: relative;
  z-index: 1;
  padding: clamp(32px, 5vw, 60px);
}

.poster-hero__content {
  max-width: 760px;
}

/* ── Typography — headings ───────────────────────────────── */

.poster-hero h1,
.page-hero h1,
.destination-hero h1,
.detail-hero h1,
.content-panel h2,
.story-card h2,
.theme-card h3,
.destination-card h3,
.tour-card h3,
.loading-panel h1,
.error-panel h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.poster-hero h1,
.page-hero h1,
.destination-hero h1,
.detail-hero h1 {
  max-width: 12ch;
  font-size: clamp(2.8rem, 6.5vw, 5.8rem);
  line-height: 0.95;
}

.lead {
  max-width: 680px;
  margin: 16px 0 0;
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  line-height: 1.75;
}

.poster-hero .lead,
.page-hero .lead,
.destination-hero .lead {
  color: rgba(250, 247, 241, 0.75);
}

/* ── Hero actions ────────────────────────────────────────── */

.hero-actions,
.button-row,
.tour-card__actions,
.detail-price-row,
.hero-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

/* ── Buttons ─────────────────────────────────────────────── */

.button,
.pagination__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}

.button.small {
  min-height: 38px;
  padding-inline: 16px;
  font-size: 0.84rem;
}

.button--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(199, 123, 46, 0.3);
}

.button--primary:hover {
  background: #b56d22;
  box-shadow: 0 6px 24px rgba(199, 123, 46, 0.4);
  transform: translateY(-1px);
}

.button--secondary,
.pagination__button,
.chip,
.button--disabled {
  background: rgba(10, 26, 24, 0.05);
  border-color: var(--line-strong);
  color: var(--ink);
}

.button--secondary:hover,
.pagination__button:hover {
  background: rgba(10, 26, 24, 0.1);
  border-color: rgba(10, 26, 24, 0.25);
  transform: translateY(-1px);
}

.poster-hero .button--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(199, 123, 46, 0.35);
}

.poster-hero .button--primary:hover {
  background: #b56d22;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(199, 123, 46, 0.45);
}

.poster-hero .button--secondary,
.page-hero .button--secondary,
.destination-hero .button--secondary {
  background: rgba(250, 247, 241, 0.12);
  border-color: rgba(250, 247, 241, 0.25);
  color: #faf7f1;
}

.poster-hero .button--secondary:hover,
.page-hero .button--secondary:hover,
.destination-hero .button--secondary:hover {
  background: rgba(250, 247, 241, 0.2);
}

.button--disabled {
  cursor: default;
  opacity: 0.5;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ── Metric cards (hero aside) ───────────────────────────── */

.metric-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(250, 247, 241, 0.08);
  border: 1px solid rgba(250, 247, 241, 0.12);
  backdrop-filter: blur(8px);
  transition: background 0.3s var(--ease);
}

.metric-card:hover {
  background: rgba(250, 247, 241, 0.14);
}

.metric-card span {
  color: rgba(250, 247, 241, 0.6);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-card strong {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-family: "Fraunces", serif;
  letter-spacing: -0.03em;
}

.poster-hero__aside {
  display: grid;
  gap: 12px;
  align-self: stretch;
  padding-left: 0;
  border-left: 1px solid rgba(250, 247, 241, 0.1);
}

/* ── Editorial band ──────────────────────────────────────── */

.editorial-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.editorial-band article {
  padding: 32px;
  background: var(--surface-elevated);
  transition: all var(--duration) var(--ease);
}

.editorial-band article:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.editorial-band h2,
.section-heading h2,
.story-card h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.08;
  color: var(--ink);
}

/* ── Content panel & section headings ────────────────────── */

.content-panel {
  padding: 28px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 6px;
}

/* ── Grids ───────────────────────────────────────────────── */

.destination-grid,
.tour-grid,
.theme-strip,
.story-layout {
  display: grid;
  gap: 18px;
}

.destination-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.tour-grid {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.story-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

/* ── Story cards ─────────────────────────────────────────── */

.story-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  background: var(--surface-strong);
}

.story-card--accent {
  background:
    linear-gradient(145deg, rgba(199, 123, 46, 0.08), rgba(255, 252, 247, 0.98));
  border-color: rgba(199, 123, 46, 0.15);
}

.story-list {
  display: grid;
  gap: 10px;
}

.story-list__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  background: rgba(10, 26, 24, 0.03);
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
}

.story-list__item:hover {
  background: rgba(10, 26, 24, 0.06);
  border-color: var(--line);
  transform: translateX(4px);
}

/* ── Page hero ───────────────────────────────────────────── */

.page-hero {
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px);
  background:
    radial-gradient(circle at 85% 20%, rgba(199, 123, 46, 0.15), transparent 40%),
    linear-gradient(135deg, #0a2622 0%, #0d4f47 60%, #1a7a6e 100%);
  color: #faf7f1;
  animation: fadeUp 0.5s var(--ease) both;
}

.page-hero.compact {
  padding-block: 40px;
}

.page-hero .eyebrow {
  color: var(--accent-light);
}

/* ── Destination hero ────────────────────────────────────── */

.destination-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  background: var(--surface-elevated);
  overflow: hidden;
}

.destination-hero__media,
.detail-hero__media,
.destination-card__image,
.tour-card__media {
  overflow: hidden;
  border-radius: 0;
}

.destination-hero__media {
  min-height: 460px;
  border-radius: var(--radius) 0 0 var(--radius);
}

.destination-hero__media img,
.detail-hero__media img,
.destination-card__image img,
.tour-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.destination-card:hover .destination-card__image img,
.tour-card:hover .tour-card__media img {
  transform: scale(1.05);
}

.destination-hero__copy,
.detail-hero__copy {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 48px);
}

.destination-hero__copy .lead,
.detail-hero__copy .lead {
  margin: 0;
  color: var(--muted);
}

/* ── Theme cards ─────────────────────────────────────────── */

.theme-strip {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.theme-card {
  padding: 24px;
  transition: all var(--duration) var(--ease);
}

.theme-card:hover {
  background: var(--brand-surface);
  border-color: rgba(13, 79, 71, 0.2);
  transform: translateY(-2px);
}

.theme-card h3 {
  font-size: 1.4rem;
  line-height: 1.1;
}

/* ── Destination cards ───────────────────────────────────── */

.destination-card {
  display: grid;
  gap: 16px;
  padding: 0;
  overflow: hidden;
  background: var(--surface-elevated);
  cursor: pointer;
}

.destination-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.destination-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.destination-card h3 {
  font-size: 1.5rem;
  line-height: 1.1;
}

.destination-card p,
.content-panel p,
.tour-card p,
.fact-item span,
.listing-meta,
.filter-form span,
.editorial-band p,
.story-card p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.94rem;
}

.destination-card > *:not(.destination-card__image) {
  padding-inline: 22px;
}

.destination-card > *:last-child {
  padding-bottom: 22px;
}

.destination-card > .eyebrow {
  padding-top: 18px;
}

.destination-card__meta,
.listing-meta,
.detail-breadcrumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--muted-2);
}

.detail-breadcrumbs {
  color: var(--muted);
}

/* ── Layout helpers ──────────────────────────────────────── */

.split-callout,
.detail-grid,
.catalog-layout {
  display: grid;
  gap: 20px;
}

.split-callout,
.detail-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.catalog-layout {
  grid-template-columns: 300px minmax(0, 1fr);
}

.callout-copy {
  display: grid;
  gap: 14px;
}

/* ── Filter panel ────────────────────────────────────────── */

.filter-panel {
  position: sticky;
  top: 90px;
  align-self: start;
  padding: 24px;
  background: var(--surface-elevated);
}

.filter-form {
  display: grid;
  gap: 18px;
}

.field,
.field-pair {
  display: grid;
  gap: 8px;
}

.field-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  transition: all 0.2s var(--ease);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(13, 79, 71, 0.1);
}

/* ── Listing panel ───────────────────────────────────────── */

.listing-panel {
  display: grid;
  gap: 20px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* ── Tour cards ──────────────────────────────────────────── */

.tour-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: var(--surface-elevated);
  cursor: pointer;
}

.tour-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.tour-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}

.tour-card__body {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
}

.tour-card__topline,
.tour-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
}

.tour-card__topline {
  color: var(--muted-2);
  font-weight: 500;
}

.tour-card h3 {
  font-size: 1.16rem;
  line-height: 1.2;
}

.tour-card h3 a,
.detail-breadcrumbs a,
.story-list__item {
  color: inherit;
  text-decoration: none;
}

.tour-card h3 a:hover {
  color: var(--brand);
}

.tour-card__meta strong,
.detail-price-row strong {
  color: var(--brand);
  font-size: 1.18rem;
  font-weight: 800;
}

.tour-card__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

/* ── Pagination ──────────────────────────────────────────── */

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.pagination__button.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.pagination__spacer {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 8px;
  color: var(--muted);
}

/* ── Detail hero ─────────────────────────────────────────── */

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  background: var(--surface-elevated);
}

.detail-hero__media {
  min-height: 420px;
  border-radius: var(--radius) 0 0 var(--radius);
}

/* ── Facts & contact ─────────────────────────────────────── */

.detail-facts,
.contact-grid,
.stacked-panels {
  display: grid;
  gap: 12px;
}

.fact-item {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--radius-xs);
  background: rgba(13, 79, 71, 0.04);
  border: 1px solid rgba(13, 79, 71, 0.06);
}

.fact-item strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ── Text panels (static pages) ──────────────────────────── */

.text-panel {
  padding-block: 28px;
}

.text-panel ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.8;
}

.text-panel li + li {
  margin-top: 8px;
}

.text-panel li::marker {
  color: var(--accent);
}

.text-panel p:last-child {
  margin-bottom: 0;
}

/* ── Text link ───────────────────────────────────────────── */

.text-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s var(--ease);
  font-size: 0.9rem;
}

.text-link:hover {
  color: var(--brand-light);
}

/* ── Empty / loading / error ─────────────────────────────── */

.empty-state,
.loading-panel,
.error-panel {
  padding: 40px 28px;
  text-align: center;
}

.loading-panel {
  background: var(--surface-strong);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 1080px) {
  .poster-hero,
  .editorial-band,
  .catalog-layout,
  .detail-hero,
  .destination-hero,
  .split-callout,
  .detail-grid,
  .story-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .destination-hero__media,
  .detail-hero__media {
    min-height: 300px;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .destination-hero__copy,
  .detail-hero__copy {
    padding: 28px;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100vw - 16px, 1320px);
  }

  .site-header {
    padding: 12px 16px;
    border-radius: var(--radius);
    flex-direction: column;
    gap: 12px;
  }

  .poster-hero {
    min-height: 520px;
  }

  .field-pair,
  .section-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .poster-hero h1,
  .page-hero h1,
  .destination-hero h1,
  .detail-hero h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 10vw, 3.6rem);
  }

  .hero-actions,
  .button-row,
  .detail-price-row {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .pagination__button {
    width: 100%;
  }

  .destination-grid {
    grid-template-columns: 1fr;
  }

  .tour-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .content-panel {
    padding: 20px;
  }
}
