/* ============================================================
   GoCamping.in — style.css
   Aesthetic: Organic field guide · earthy tones · editorial
   Fonts: Playfair Display (headings) + DM Sans (body)
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --forest:    #1e3a2f;   /* deep forest green — primary */
  --pine:      #2d5a3d;   /* mid green */
  --moss:      #4a7c59;   /* lighter green */
  --amber:     #c8822a;   /* warm amber — accent */
  --gold:      #e8a84c;   /* lighter gold */
  --cream:     #f5f0e8;   /* warm off-white background */
  --parchment: #ede6d8;   /* card backgrounds */
  --bark:      #7a5c3a;   /* brown text */
  --charcoal:  #2a2a2a;   /* primary text */
  --mist:      #a8b8a0;   /* muted green-grey */
  --white:     #ffffff;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --radius:    6px;
  --radius-lg: 12px;
  --shadow:    0 2px 12px rgba(30,58,47,0.10);
  --shadow-lg: 0 8px 32px rgba(30,58,47,0.15);

  --max-w: 1160px;
  --nav-h: 64px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--cream);
  /* subtle grain texture overlay */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
a { color: var(--pine); text-decoration: none; }
a:hover { color: var(--amber); }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--forest);
  line-height: 1.25;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); margin-bottom: 0.6em; }
h3 { font-size: 1.2rem; margin-bottom: 0.4em; }
p  { margin-bottom: 1em; }

.tagline {
  font-size: 1.15rem;
  color: var(--bark);
  font-style: italic;
  margin-bottom: 1.2em;
}
.page-intro {
  font-size: 1.05rem;
  color: var(--bark);
  max-width: 680px;
  margin-bottom: 2em;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.container--detail {
  max-width: 820px;
}
.container--post {
  max-width: 740px;
}
.section {
  padding: 3.5rem 0;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--forest);
  height: var(--nav-h);
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cream) !important;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.logo-icon { font-size: 1.4rem; }
.logo-in   { color: var(--gold); }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.site-nav a {
  color: rgba(245,240,232,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.site-nav a:hover,
.site-nav a.active {
  background: rgba(255,255,255,0.12);
  color: var(--gold);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}
.btn--primary {
  background: var(--amber);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--gold);
  color: var(--forest);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200,130,42,0.35);
}
.btn--secondary {
  background: transparent;
  border: 2px solid rgba(245,240,232,0.5);
  color: var(--cream);
}
.btn--secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn--header {
  background: var(--amber);
  color: var(--white);
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.btn--header:hover { background: var(--gold); color: var(--forest); }
.btn--link {
  color: var(--pine);
  font-weight: 600;
  padding: 0;
  font-size: 0.95rem;
}
.btn--link:hover { color: var(--amber); }
.btn--affiliate {
  display: inline-block;
  background: var(--forest);
  color: var(--cream) !important;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  margin: 0.3rem 0.3rem 0 0;
  transition: background 0.2s;
}
.btn--affiliate:hover { background: var(--amber); color: var(--white) !important; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  background: var(--parchment);
  color: var(--bark);
  border: 1px solid rgba(122,92,58,0.2);
}
.badge--season { background: #e8f0e4; color: var(--pine); border-color: var(--mist); }
.badge--diff   { text-transform: capitalize; }
.badge--easy   { background: #d4edda; color: #1a6632; border-color: #a8d5b5; }
.badge--moderate { background: #fff3cd; color: #856404; border-color: #ffc857; }
.badge--hard   { background: #f8d7da; color: #842029; border-color: #f5c2c7; }

/* ── Breadcrumbs ────────────────────────────────────────────── */
.breadcrumbs {
  background: var(--parchment);
  border-bottom: 1px solid rgba(122,92,58,0.15);
  padding: 0.6rem 1.5rem;
}
.breadcrumbs ol {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  list-style: none;
  font-size: 0.82rem;
  color: var(--bark);
  flex-wrap: wrap;
}
.breadcrumbs li + li::before { content: "›"; margin-right: 0.5rem; color: var(--mist); }
.breadcrumbs a { color: var(--pine); }
.breadcrumbs a:hover { color: var(--amber); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(160deg, rgba(30,58,47,0.88) 0%, rgba(45,90,61,0.75) 60%, rgba(200,130,42,0.25) 100%),
    url('/static/img/hero-bg.jpg') center/cover no-repeat;
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
/* ::before fallback removed — gradient overlay is stacked in .hero background directly */
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  animation: fadeUp 0.8s ease both;
}
.hero__inner h1 {
  color: var(--cream);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.4em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero__sub {
  color: rgba(245,240,232,0.85);
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 2rem;
}
.hero__inner .btn { margin-right: 0.75rem; margin-top: 0.5rem; }

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

/* ── Card Grid ──────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--parchment);
  border: 1px solid rgba(122,92,58,0.18);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.5s ease both;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.card .card__body a,
.card .card__body .badge {
  position: relative;
  z-index: 2;
}
.card h3 { font-size: 1.1rem; }
.card h3 { font-size: 1.1rem; color: var(--forest); }
.card h3:hover { color: var(--forest); }
.card__meta { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.card__region { font-size: 0.85rem; color: var(--bark); }
.card__price  { font-size: 0.88rem; font-weight: 600; color: var(--pine); margin-top: auto; }
.card__stats  { font-size: 0.85rem; color: var(--bark); }
.card__cat    { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: var(--amber); text-transform: uppercase; }
.card__read   { font-size: 0.8rem; color: var(--mist); margin-top: auto; }
.card__footer { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--mist); margin-top: auto; }

/* Stagger card animations */
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.10s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.20s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.30s; }

/* ── Card images ─────────────────────────────────────────────── */
.card { padding: 0; overflow: hidden; }
.card__img { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.card:hover .card__img img { transform: scale(1.04); }
.card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
/* ── Detail hero image ───────────────────────────────────────── */
.detail__hero { margin-bottom: 1.5rem; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/6; }
.detail__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Section headers ────────────────────────────────────────── */
.section--camps,
.section--posts {
  background: var(--cream);
}
.section--camps .container,
.section--posts .container {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.section--camps h2::after,
.section--posts h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--amber);
  margin-top: 0.4rem;
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

/* ── Detail page ────────────────────────────────────────────── */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 1.2rem;
  background: var(--parchment);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(122,92,58,0.15);
  font-size: 0.88rem;
  color: var(--bark);
}
.section--detail {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(122,92,58,0.12);
}
.section--detail:last-child { border-bottom: none; }
.section--detail h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.section--detail ul { padding-left: 1.4rem; list-style: disc; }
.section--detail ul li { margin-bottom: 0.4rem; color: var(--charcoal); }
.section--cta {
  background: var(--parchment);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem !important;
  border: 1px dashed rgba(122,92,58,0.3) !important;
  font-size: 0.92rem;
  color: var(--bark);
}
.section--cta a { color: var(--amber); font-weight: 600; }

/* ── Product cards (gear) ───────────────────────────────────── */
.product-list { display: flex; flex-direction: column; gap: 2rem; }
.product-card {
  background: var(--parchment);
  border: 1px solid rgba(122,92,58,0.18);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  position: relative;
}
.product-card__rank {
  position: absolute;
  top: -14px;
  left: 1.4rem;
  background: var(--amber);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}
.product-card h3 { font-size: 1.25rem; margin-top: 0.5rem; }
.product-card .brand { font-size: 0.88rem; color: var(--bark); font-weight: 400; font-family: var(--font-body); }
.product-card__price { font-size: 1.05rem; font-weight: 700; color: var(--pine); margin: 0.3rem 0; }
.product-card__rating { font-size: 1rem; color: var(--amber); margin-bottom: 0.5rem; }
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.pros-cons ul { padding-left: 1.2rem; list-style: disc; }
.pros-cons ul li { margin-bottom: 0.3rem; }
.pros-cons > div:first-child strong { color: var(--pine); }
.pros-cons > div:last-child  strong { color: #c0392b; }
.product-card__verdict {
  background: rgba(200,130,42,0.08);
  border-left: 3px solid var(--amber);
  padding: 0.6rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
  color: var(--bark);
  margin-bottom: 1rem;
}
.product-card__buy { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── Blog post body ─────────────────────────────────────────── */
.post-meta {
  display: flex;
  gap: 1.2rem;
  font-size: 0.85rem;
  color: var(--mist);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(122,92,58,0.15);
}
.post-body { line-height: 1.85; }
.post-body h2 { margin-top: 2rem; }
.post-body p  { margin-bottom: 1.2em; }
.post-tags { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--forest);
  color: rgba(245,240,232,0.75);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 2rem;
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}
.footer__col strong {
  display: block;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.footer__col ul li { margin-bottom: 0.4rem; }
.footer__col a { color: rgba(245,240,232,0.7); font-size: 0.9rem; }
.footer__col a:hover { color: var(--gold); }
.footer__small { font-size: 0.8rem; line-height: 1.6; }
.footer__bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245,240,232,0.1);
  font-size: 0.82rem;
  color: rgba(245,240,232,0.4);
  text-align: center;
}
.footer__bottom p { margin: 0; }
.footer__credits { margin-top: 0.3rem; font-size: 0.78rem; color: rgba(245,240,232,0.3); }
.footer__credits a { color: rgba(245,240,232,0.5); text-decoration: underline; }

/* ── Related content section (blog post detail pages) ───────────────────────
   Add near the bottom of style.css, before the @media queries */

.section--related {
  border-top: 2px solid rgba(122,92,58,0.15);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
}

.section--related h2 {
  font-size: 1.1rem;
  color: var(--bark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.related-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.related-links li {
  font-size: 0.95rem;
}

.related-links a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related-links a:hover {
  color: var(--amber);
}
/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .site-nav a { font-size: 0.82rem; padding: 0.35rem 0.55rem; }
}

@media (max-width: 640px) {
  .footer__bottom { padding-bottom: 60px; }
  .footer__inner { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 0.3rem 0.4rem; font-size: 0.78rem; }
  .btn--header { display: none; }
  .hero { min-height: 380px; }
}

@media (max-width: 480px) {
  .site-nav { display: none; }   /* TODO: add hamburger menu */
}

.included-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media(max-width: 600px) { .included-grid { grid-template-columns: 1fr; } }

/* ── Experience booking buttons ─────────────────────────── */
.section--booking { background: rgba(122,92,58,0.06); border-radius: var(--radius); padding: 1.5rem; }
.booking-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.btn--book {
  display: inline-block;
  background: var(--forest);
  color: var(--cream) !important;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s;
}
.btn--book:hover { background: var(--amber); color: var(--forest) !important; }
.booking-note { font-size: 0.8rem; color: var(--mist); display: block; margin-top: -0.5rem; margin-bottom: 0.5rem; }
.price-disclaimer { font-size: 0.8rem; color: var(--mist); margin: 0; font-style: italic; }
.price-updated { font-size: 0.82rem; color: var(--mist); font-style: italic; margin-bottom: 1rem; }
/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 2.5rem 0 1rem;
  flex-wrap: wrap;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--text);
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
}

.pagination__btn:hover:not(.pagination__btn--disabled):not(.pagination__btn--active) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination__btn--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  cursor: default;
  pointer-events: none;
}

.pagination__btn--disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.pagination__ellipsis {
  color: var(--text-muted);
  padding: 0 0.25rem;
  font-size: 0.9rem;
  line-height: 2.4rem;
}

.pagination__prev,
.pagination__next {
  font-size: 0.85rem;
  padding: 0 1rem;
}
/* ── Card image skeleton shimmer ───────────────────────────── */
.card__img {
  background: #e8e0d0;
  overflow: hidden;
  position: relative;
}
.card__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, #f0ebe0 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
  will-change: transform;
}
.card__img.loaded { background: none; }
.card__img.loaded::after { display: none; }
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
/* ── Hero WebP with JPG fallback ────────────────────────────── */
.hero {
  background-image: url('/static/img/hero-bg.webp');
}
@supports not (background-image: url('x.webp')) {
  .hero {
    background-image: url('/static/img/hero-bg.jpg');
  }
}
