/*
Theme Name: Khao Yai Wild
Theme URI: https://www.khaoyainationalparktour.com/
Author: Khaoyai Tour
Description: A lightweight, Core Web Vitals friendly WordPress theme for Khao Yai National Park tour operators. Forest-green nature theme built for speed, with a built-in Tour Package post type (name, price, includes, booking URL). No page builder or heavy framework required.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: khaoyai-wild
Tags: travel, tour-operator, one-column, two-columns, custom-menu, featured-images, translation-ready
*/

/* =============================================================
   DESIGN TOKENS
   ============================================================= */
:root {
  --forest-900: #14311f;
  --forest-800: #1f4d2e;
  --forest-700: #2e6b3e;
  --forest-600: #3d8a4f;
  --moss-100: #eef4ea;
  --moss-50: #f6f9f3;
  --earth-700: #5c4a35;
  --earth-400: #a68a68;
  --accent-500: #d97b29;
  --accent-600: #b8631d;
  --ink-900: #1c211d;
  --ink-600: #4a544c;
  --paper: #ffffff;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 2px 10px rgba(20, 49, 31, 0.08);
  --shadow-card-hover: 0 10px 24px rgba(20, 49, 31, 0.16);
  --container: 1180px;
}

/* =============================================================
   RESET / BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest-700); text-decoration: none; }
a:hover { color: var(--accent-600); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--forest-900);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.btn {
  display: inline-block;
  padding: 12px 26px;
  background: var(--accent-500);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--accent-600); color: #fff; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--paper);
  color: var(--paper);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* =============================================================
   HEADER
   ============================================================= */
.site-header {
  background: var(--forest-900);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: #fff;
  margin: 0;
  letter-spacing: 0.2px;
}
.site-title a { color: #fff; }
.site-description {
  font-size: 12px;
  color: var(--moss-100);
  margin: 0;
  opacity: 0.85;
}
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.main-navigation a {
  color: #fff;
  font-weight: 500;
  font-size: 15px;
}
.main-navigation a:hover { color: var(--accent-500); }
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px 12px;
  font-size: 15px;
}

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  color: #fff;
  background-color: var(--forest-800);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,49,31,0.55), rgba(20,49,31,0.75));
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 640px; }
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--moss-100);
  margin-bottom: 12px;
}
.hero h1 { color: #fff; font-size: clamp(32px, 5vw, 52px); margin-bottom: 16px; }
.hero p { font-size: 18px; color: var(--moss-100); margin-bottom: 28px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* =============================================================
   SECTIONS
   ============================================================= */
.section { padding: 64px 0; }
.section-alt { background: var(--moss-50); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-header .eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--forest-600);
}
.section-header h2 { font-size: clamp(26px, 4vw, 36px); }
.section-header p { color: var(--ink-900); font-weight: 500; font-size: 16px; }

/* =============================================================
   TOUR GRID / CARDS
   ============================================================= */
.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.tour-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.tour-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.tour-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.tour-card-media img { width: 100%; height: 100%; object-fit: cover; }
.tour-card-price {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: var(--forest-900);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
}
.tour-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.tour-card-body h3 { font-size: 19px; margin-bottom: 8px; }
.tour-card-body h3 a { color: var(--forest-900); }
.tour-card-excerpt { color: var(--ink-600); font-size: 14.5px; flex: 1; margin-bottom: 16px; }
.tour-card-includes {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--ink-600);
}
.tour-card-includes li { padding-left: 20px; position: relative; margin-bottom: 4px; }
.tour-card-includes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--forest-600);
  font-weight: 700;
}
.tour-card-actions { display: flex; gap: 10px; }
.tour-card-actions .btn { flex: 1; text-align: center; font-size: 14px; padding: 10px 14px; }
.btn-secondary {
  background: var(--moss-100);
  color: var(--forest-800);
}
.btn-secondary:hover { background: var(--forest-800); color: #fff; }

/* =============================================================
   PARK GUIDE GRID
   ============================================================= */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.guide-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.guide-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.guide-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.guide-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.guide-card:hover .guide-card-media img { transform: scale(1.05); }
.guide-card-body { padding: 18px; }
.guide-card-body h3 { font-size: 17px; margin-bottom: 8px; }
.guide-card-body h3 a { color: var(--forest-900); }
.guide-card-body p { color: var(--ink-600); font-size: 14px; margin: 0 0 12px; }
.guide-card-link { font-weight: 600; font-size: 13.5px; color: var(--forest-700); }
.guide-card-link:hover { color: var(--accent-600); }

/* =============================================================
   TOUR LAYERS (horizontal scroll rows, grouped by departure city)
   ============================================================= */
.tour-layer { padding: 48px 0; }
.tour-layer:nth-of-type(even) { background: var(--moss-50); }
.tour-layer-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tour-layer-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--forest-600);
  margin: 0 0 6px;
}
.tour-layer-head h2 { margin-bottom: 4px; font-size: clamp(22px, 3vw, 30px); }
.tour-layer-desc { color: var(--ink-600); margin: 0; max-width: 560px; font-size: 14.5px; }
.tour-layer-desc a { font-weight: 600; white-space: nowrap; margin-left: 4px; }
.term-description { max-width: 760px; margin-top: 12px; color: var(--moss-100); }
.term-description h1, .term-description h2, .term-description h3 { color: #fff; }
.term-description p { margin: 0 0 1em; }
.tour-layer-nav { display: flex; gap: 8px; flex-shrink: 0; }
.layer-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--moss-100);
  background: var(--paper);
  color: var(--forest-800);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.layer-arrow:hover { background: var(--forest-800); color: #fff; }

.layer-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  -ms-overflow-style: none;
  scrollbar-width: thin;
}
.layer-row::-webkit-scrollbar { height: 8px; }
.layer-row::-webkit-scrollbar-thumb { background: var(--moss-100); border-radius: 8px; }

.layer-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.layer-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.layer-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.layer-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.layer-card:hover .layer-card-media img { transform: scale(1.05); }
.layer-card-price {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: var(--accent-500);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}
.layer-card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.layer-card-body h3 { font-size: 17px; margin-bottom: 6px; }
.layer-card-body h3 a { color: var(--forest-900); }
.layer-card-excerpt { color: var(--ink-600); font-size: 14px; margin-bottom: 10px; }
.layer-card-includes {
  font-size: 13px;
  color: var(--forest-700);
  background: var(--moss-100);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin: 0 0 14px;
}
.layer-card-actions { display: flex; gap: 8px; margin-top: auto; }
.layer-card-actions .btn { flex: 1; text-align: center; font-size: 13.5px; padding: 9px 10px; }

/* =============================================================
   SINGLE TOUR PAGE
   ============================================================= */
.tour-single-header {
  background: var(--forest-900);
  color: #fff;
  padding: 48px 0 96px;
}
.tour-single-header h1 { color: #fff; margin-bottom: 8px; }
.tour-single-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--moss-100); font-size: 14px; }
.tour-hero-image {
  position: relative;
  margin-top: -70px;
  margin-bottom: 44px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(20, 49, 31, 0.35);
  border: 6px solid var(--paper);
  z-index: 2;
}
.tour-hero-image img { width: 100%; display: block; }
.tour-single-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  padding: 48px 0;
  align-items: start;
}
.tour-content h2 { font-size: 22px; margin-top: 32px; }
.tour-includes-box, .tour-booking-box {
  background: var(--moss-50);
  border: 1px solid var(--moss-100);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.tour-booking-box {
  position: sticky;
  top: 90px;
  background: var(--forest-900);
  color: #fff;
  border: none;
}
.tour-booking-box .price { font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.tour-booking-box .price small { font-size: 14px; font-weight: 400; color: var(--moss-100); }
.tour-booking-box .btn { width: 100%; text-align: center; margin-top: 16px; }
.tour-includes-box h3, .tour-booking-box h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.5px; }
.tour-includes-list, .tour-excludes-list { list-style: none; padding: 0; margin: 0; }
.tour-includes-list li, .tour-excludes-list li { padding: 6px 0 6px 24px; position: relative; font-size: 14.5px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.tour-includes-list li::before { content: "✓"; position: absolute; left: 0; color: var(--forest-600); font-weight: 700; }
.tour-excludes-list li::before { content: "✕"; position: absolute; left: 0; color: var(--accent-600); font-weight: 700; }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
  background: var(--forest-900);
  color: var(--moss-100);
  padding: 48px 0 24px;
  margin-top: 40px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { color: #fff; font-size: 15px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--moss-100); }
.footer-grid a:hover { color: var(--accent-500); }
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  opacity: 0.75;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 860px) {
  .tour-single-layout { grid-template-columns: 1fr; }
  .tour-booking-box { position: static; }
}
@media (max-width: 720px) {
  .tour-single-header { padding-bottom: 64px; }
  .tour-hero-image { margin-top: -40px; border-width: 4px; }
  .layer-card { flex-basis: 78vw; }
  .tour-layer-nav { display: none; }
  .main-navigation { display: none; }
  .main-navigation.is-open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--forest-900); padding: 16px 24px; }
  .main-navigation.is-open ul { flex-direction: column; gap: 16px; }
  .menu-toggle { display: inline-block; }
  .hero { min-height: 380px; text-align: left; }
}
