/* ============================================================
   tripreviewall.com — Home page component styles
   Flat, editorial, 1px borders, no pill shapes, no gradients.
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 1024px) {
  .container { padding: 0 64px; }
}

.section { padding: 64px 0; }
@media (min-width: 1024px) { .section { padding: 96px 0; } }

/* Focus ring — accessibility, never removed */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Numbers — ratings, prices, percentages */
.tabular { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Default size for star-rating SVG icons — prevents unsized <svg> from
   rendering at the browser's default replaced-element size (huge). */
.stars svg { width: 14px; height: 14px; display: inline-block; vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: var(--text-body);
  padding: 12px 24px; border-radius: var(--radius-sm);
  border: none; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--color-cta); color: #fff; }
.btn-primary:hover { background: var(--color-cta-hover); }
.btn-secondary { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-secondary:hover { background: rgba(11,59,79,0.08); }
.btn-tertiary { background: transparent; color: var(--color-primary); border: none; padding: 4px 0; }
.btn-tertiary:hover { text-decoration: underline; text-decoration-color: var(--color-cta); }
.btn-full { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: background-color 200ms ease, box-shadow 200ms ease, height 200ms ease;
}
.site-header.scrolled { background: var(--color-bg-alt); box-shadow: var(--shadow-card-hover); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px; gap: 24px;
}
.site-header.scrolled .header-inner { height: 64px; }
@media (max-width: 767px) {
  .header-inner { height: 64px; }
  .site-header.scrolled .header-inner { height: 56px; }
}

.logo { font-family: var(--font-serif); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em; min-width: 120px; white-space: nowrap; }
.logo .part-1 { color: var(--color-primary); }
.logo .part-2 { color: var(--color-cta); }
.logo.reversed .part-1 { color: var(--color-bg); }
.logo.reversed .part-2 { color: #E3A07C; }

.main-nav { display: none; gap: 32px; font-weight: 500; font-size: var(--text-body); }
.main-nav a { padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--color-cta); }
@media (min-width: 1024px) { .main-nav { display: flex; } }

.header-actions { display: flex; align-items: center; gap: 12px; }
.hamburger { display: inline-flex; background: none; border: none; padding: 4px; color: var(--color-primary); }
.hamburger svg { width: 24px; height: 24px; }
@media (min-width: 1024px) { .hamburger { display: none; } }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 100; display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer-backdrop { position: absolute; inset: 0; background: rgba(11,59,79,0.35); }
.mobile-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 85vw);
  background: var(--color-bg); box-shadow: var(--shadow-card-hover);
  padding: 24px; overflow-y: auto;
}
.mobile-drawer-panel .close-btn { background: none; border: none; color: var(--color-primary); }
.mobile-nav-link { display: block; padding: 16px 0; border-bottom: 1px solid var(--color-border); font-family: var(--font-serif); font-size: var(--text-h4); font-weight: 500; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 640px; display: flex; align-items: center;
  color: var(--color-bg); overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,59,79,0.75) 0%, rgba(11,59,79,0.25) 45%, rgba(11,59,79,0.05) 100%);
}
.hero-content { position: relative; z-index: 2; width: 100%; padding: 64px 0; text-align: center; }
.hero-eyebrow {
  font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600; margin-bottom: 16px; opacity: 0.9;
}
.hero-headline {
  font-family: var(--font-serif); font-weight: 600; font-size: var(--text-display);
  line-height: 1.1; letter-spacing: -0.01em; max-width: 800px; margin: 0 auto 16px;
}
.hero-subhead {
  font-size: var(--text-body-lg); max-width: 640px; margin: 0 auto 32px; opacity: 0.92; line-height: 1.6;
}

/* Search bar */
.search-bar {
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card-hover);
  max-width: 900px; margin: 0 auto; padding: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
@media (min-width: 768px) { .search-bar { flex-direction: row; align-items: stretch; padding: 8px; } }
.search-field {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
}
@media (min-width: 768px) {
  .search-field { border-bottom: none; border-right: 1px solid var(--color-border); }
  .search-field:last-of-type { border-right: none; }
}
.search-field svg { width: 18px; height: 18px; color: var(--color-text-muted); flex-shrink: 0; }
.search-field select, .search-field input {
  border: none; background: transparent; font-family: var(--font-sans);
  font-size: var(--text-body); color: var(--color-text); width: 100%; outline: none;
}
.search-submit { padding: 14px 28px; }
.hero-quicklinks { margin-top: 20px; font-size: var(--text-meta); opacity: 0.9; }
.hero-quicklinks a { text-decoration: none; border-bottom: 1px solid transparent; }
.hero-quicklinks a:hover { border-bottom-color: currentColor; }

/* ---------- Proof Strip ---------- */
.proof-strip { background: var(--color-primary); color: var(--color-bg); }
.proof-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px; padding: 40px 0;
}
@media (min-width: 768px) { .proof-grid { grid-template-columns: repeat(3, 1fr); } }
.proof-item {
  text-align: center; padding: 0 16px;
  border-top: 1px solid rgba(250,246,239,0.15);
  padding-top: 24px;
}
@media (min-width: 768px) {
  .proof-item { border-top: none; border-left: 1px solid rgba(250,246,239,0.15); padding-top: 0; }
  .proof-item:first-child { border-left: none; }
}
.proof-number { font-size: var(--text-h2); font-weight: 700; margin-bottom: 4px; }
.proof-desc { font-size: var(--text-body); opacity: 0.92; margin-bottom: 6px; }
.proof-caption { font-size: var(--text-caption); opacity: 0.6; }

/* ---------- Section headers ---------- */
.section-header { margin-bottom: 40px; }
.section-title { font-family: var(--font-serif); font-weight: 600; font-size: var(--text-h2); margin: 0 0 8px; }
.section-subtext { color: var(--color-text-muted); font-size: var(--text-body); margin: 0; }
.section-header-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px;
}

/* Tabs (Top Rated / Most Reviewed) */
.tab-row { display: flex; gap: 24px; border-bottom: 1px solid var(--color-border); margin-bottom: 32px; }
.tab-btn {
  background: none; border: none; padding: 12px 2px; font-size: var(--text-body);
  font-weight: 500; color: var(--color-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-cta); font-weight: 600; }

/* ---------- Tour Card ---------- */
.tour-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .tour-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tour-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .tour-grid { grid-template-columns: repeat(4, 1fr); } }

.tour-card {
  background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  overflow: hidden; transition: box-shadow 150ms ease; display: flex; flex-direction: column;
}
.tour-card:hover { box-shadow: var(--shadow-card-hover); }
.tour-card-image-wrap { position: relative; aspect-ratio: 4/3; background: #E3DFD3; overflow: hidden; }
.tour-card-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.tour-card-badge {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.92);
  color: var(--color-primary); font-size: var(--text-caption); font-weight: 600;
  text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-sm);
}
.tour-card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.tour-card-eyebrow { font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); margin-bottom: 4px; }
.tour-card-title {
  font-family: var(--font-serif); font-weight: 600; font-size: var(--text-h4);
  margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tour-card-rating { display: flex; align-items: baseline; gap: 6px; font-size: var(--text-meta); margin-bottom: 8px; }
.tour-card-rating .stars { color: var(--color-positive); display: inline-flex; gap: 1px; }
.tour-card-rating .stars svg { width: 14px; height: 14px; }
.tour-card-rating .score { font-weight: 700; color: var(--color-text); }
.tour-card-rating .count { color: var(--color-text-muted); }

/* Mini histogram — mandatory, equal weight for negative bars */
.rating-histogram { display: flex; height: 7px; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; background: var(--color-border); }
.rating-histogram .seg-pos { background: var(--color-positive); }
.rating-histogram .seg-neu { background: var(--color-border-strong); }
.rating-histogram .seg-neg { background: var(--color-negative); }

.tour-card-divider { border-top: 1px solid var(--color-border); margin: 4px 0 12px; }
.tour-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.tour-card-price { font-weight: 700; font-size: var(--text-body-lg); }
.tour-card-price .via { display: block; font-size: 11px; font-weight: 400; color: var(--color-text-muted); font-style: italic; }
.tour-card-footer .btn { padding: 8px 16px; font-size: var(--text-meta); }

.view-all-wrap { text-align: center; margin-top: 40px; }

/* ---------- How We Work ---------- */
.how-grid { display: grid; grid-template-columns: 1fr; gap: 32px; text-align: center; }
@media (min-width: 768px) { .how-grid { grid-template-columns: repeat(3, 1fr); text-align: left; } }
.how-item-icon {
  width: 60px; height: 60px; border-radius: var(--radius-sm); background: rgba(11,59,79,0.08);
  display: flex; align-items: center; justify-content: center; color: var(--color-primary);
  margin-bottom: 16px;
}
@media (min-width: 768px) { .how-item-icon { margin-left: 0; } }
.how-grid.centered .how-item-icon { margin-left: auto; margin-right: auto; }
.how-item-icon svg { width: 28px; height: 28px; }
.how-item-title { font-weight: 700; font-size: var(--text-h4); margin: 0 0 8px; }
.how-item-desc { color: var(--color-text-muted); font-size: var(--text-body); margin: 0; }

/* ---------- Destinations ---------- */
.dest-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .dest-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .dest-grid { grid-template-columns: repeat(4, 1fr); } }
.dest-card {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius-md); overflow: hidden;
  background-size: cover; background-position: center;
}
.dest-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,59,79,0.8), rgba(11,59,79,0) 55%); }
.dest-card-content { position: absolute; left: 16px; bottom: 16px; z-index: 2; color: var(--color-bg); }
.dest-card-name { font-family: var(--font-serif); font-weight: 600; font-size: var(--text-h3); margin: 0; }
.dest-card-count { font-size: var(--text-meta); opacity: 0.9; }

/* ---------- Blog preview ---------- */
.blog-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
.blog-card { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow 150ms ease; }
.blog-card:hover { box-shadow: var(--shadow-card-hover); }
.blog-card-image { aspect-ratio: 3/2; background-size: cover; background-position: center; }
.blog-card-body { padding: 16px; }
.blog-card-cat { font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-cta); font-weight: 600; margin-bottom: 8px; }
.blog-card-title { font-family: var(--font-serif); font-weight: 600; font-size: var(--text-h4); margin: 0 0 10px; }
.blog-card-meta { font-size: var(--text-meta); color: var(--color-text-muted); }
.read-all-wrap { text-align: right; margin-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary); color: var(--color-bg); padding: 96px 0 48px; }
@media (max-width: 767px) { .site-footer { padding: 64px 0 32px; } }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 48px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-tagline { font-size: var(--text-body); color: rgba(250,246,239,0.75); margin: 16px 0 20px; max-width: 320px; }
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: var(--color-bg); }
.footer-social svg { width: 20px; height: 20px; }
.footer-col h4 { font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 16px; color: rgba(250,246,239,0.6); }
.footer-col a, .footer-contact-row { display: block; font-size: 15px; color: rgba(250,246,239,0.85); margin-bottom: 12px; }
.footer-col a:hover { color: var(--color-bg); text-decoration: underline; text-decoration-color: var(--color-cta); }
.footer-contact-row { display: flex; align-items: flex-start; gap: 8px; }
.footer-contact-row svg { width: 16px; height: 16px; color: #E3A07C; flex-shrink: 0; margin-top: 2px; }
.footer-disclosure {
  border-top: 1px solid rgba(250,246,239,0.15); border-bottom: 1px solid rgba(250,246,239,0.15);
  padding: 16px 0; font-size: var(--text-caption); font-style: italic; color: rgba(250,246,239,0.65); text-align: center;
}
.footer-bottom { display: flex; flex-direction: column; gap: 12px; align-items: center; padding-top: 24px; font-size: 13px; color: rgba(250,246,239,0.65); text-align: center; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; } }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--color-primary); color: #fff;
  padding: 12px 20px; z-index: 200; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }
