/* ==========================================================
   Wanderlust Travel Blog — global stylesheet
   ========================================================== */
:root {
  --ink: #222222;
  --ink-soft: #666666;
  --cream: #ffffff;
  --white: #ffffff;
  --accent: #d63c3c;
  --accent-dark: #b32d2d;
  --gold: #d63c3c;
  --line: #e6e6e6;
  --radius: 8px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.13);
  --font-display: "Lato", "Segoe UI", sans-serif;
  --font-body: "Lato", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }
iframe { max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.container { max-width: none; margin: 0; padding: 0 24px; }
.container-narrow { max-width: none; margin: 0; padding: 0 24px; }
/* on wide screens leave room for the fixed side-rail ads */
@media (min-width: 1300px) {
  .container { padding: 0 210px; }
  .container-narrow { padding: 0 240px; }
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 26px;
  max-width: 100%;
  margin: 0;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: 0.3px;
}
.logo span { color: var(--accent); }
.main-nav { display: flex; gap: 26px; align-items: center; }
.main-nav a {
  color: #333;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.main-nav a:hover, .main-nav a.active { color: var(--accent); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Hero (homepage) ---------- */
/* ---------- Photo heroes (World Travel Guy style: title on image, slow zoom) ---------- */
@keyframes heroZoom {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.12) translate(-1.5%, -1%); }
  100% { transform: scale(1.18) translate(1.5%, -2%); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-home {
  background: linear-gradient(135deg, #1d2b45 0%, #34496b 60%, #0e8a96 130%);
  color: #fff;
  text-align: center;
  padding: 132px 20px 116px;
  position: relative;
  z-index: 10; /* paints above the fixed side rails */
  overflow: hidden;
}
/* crossfading Ken Burns slideshow */
.hero-slide {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroSlide 21s linear infinite, heroZoom 21s ease-in-out infinite;
}
.hero-slide:nth-child(1) { animation-delay: 0s, 0s; }
.hero-slide:nth-child(2) { animation-delay: 7s, 7s; }
.hero-slide:nth-child(3) { animation-delay: 14s, 14s; }
@keyframes heroSlide {
  0% { opacity: 0; }
  6% { opacity: 1; }
  33% { opacity: 1; }
  42% { opacity: 0; }
  100% { opacity: 0; }
}
.hero-home::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 16, 30, 0.55), rgba(12, 16, 30, 0.30) 45%, rgba(12, 16, 30, 0.68));
}
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3.5px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #ffb3a8;
  margin-bottom: 16px;
  animation: fadeUp 0.9s ease-out both;
}
.hero-home h1 { animation: fadeUp 0.9s ease-out both 0.15s; text-shadow: 0 2px 18px rgba(0,0,0,0.5); }
.hero-sub {
  max-width: 640px;
  margin: 0 auto 30px;
  font-size: 1.12rem;
  opacity: 0.94;
  text-shadow: 0 1px 10px rgba(0,0,0,0.55);
  animation: fadeUp 0.9s ease-out both 0.3s;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.9s ease-out both 0.45s;
}
.btn-outline { background: transparent; border: 2px solid #fff; }
.btn-outline:hover { background: #fff; color: var(--ink); }
.hero-stats {
  display: flex;
  gap: 54px;
  justify-content: center;
  margin-top: 46px;
  animation: fadeUp 0.9s ease-out both 0.6s;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.8rem; font-weight: 900; line-height: 1.2; }
.hero-stats span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  opacity: 0.85;
}
.hero-home h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero-home p {
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
  opacity: 0.92;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.9rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }

/* ---------- Category filter ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 38px 0 8px;
}
.filter-btn {
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Post grid ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.9rem;
  margin: 40px 0 6px;
  text-align: center;
}
.section-sub { text-align: center; color: var(--ink-soft); margin-bottom: 10px; }

/* Blogger-style card grid: 3 columns desktop, 2 tablet, 1 phone */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 30px 0 60px;
  max-width: 1240px;
  margin: 0 auto;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-visual {
  width: 100%;
  height: 205px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
@media (max-width: 1080px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .post-grid { grid-template-columns: 1fr; }
}
.card-icon {
  position: absolute;
  bottom: 10px;
  right: 12px;
  z-index: 1;
  background: rgba(12, 16, 26, 0.5);
  border-radius: 10px;
  padding: 7px;
  display: flex;
  backdrop-filter: blur(4px);
}
.card-icon svg { width: 20px; height: 20px; stroke: #fff; }
.card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(255,255,255,0.28), transparent 55%);
}
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(232, 93, 74, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}
.card-body h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.18rem;
  line-height: 1.35;
}
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--accent); }
.card-meta { margin-top: auto; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Gradient palettes (cards + article heroes) ---------- */
.g-mountain  { background: linear-gradient(140deg, #35507a, #6b8cba); }
.g-beach     { background: linear-gradient(140deg, #16a3b8, #7fd8c8); }
.g-aurora    { background: linear-gradient(140deg, #1b2a4a, #2e9e7f); }
.g-city      { background: linear-gradient(140deg, #8a3d5f, #e8845d); }
.g-ocean     { background: linear-gradient(140deg, #1b6ca8, #6fc3df); }
.g-sunset    { background: linear-gradient(140deg, #e8734a, #e8b64a); }
.g-pink      { background: linear-gradient(140deg, #d95a87, #f0a58f); }
.g-winter    { background: linear-gradient(140deg, #27455c, #7fa8c9); }
.g-sunrise   { background: linear-gradient(140deg, #e8975d, #f2c14e); }
.g-tropical  { background: linear-gradient(140deg, #1e8a6e, #83c975); }
.g-japan     { background: linear-gradient(140deg, #b8434e, #e88a7d); }
.g-paris     { background: linear-gradient(140deg, #5c5470, #b3a2c7); }
.g-ice       { background: linear-gradient(140deg, #3d6b8a, #a8d8e8); }
.g-nyc       { background: linear-gradient(140deg, #2f3542, #747d8c); }
.g-green     { background: linear-gradient(140deg, #2e7d55, #8ac986); }
.g-mint      { background: linear-gradient(140deg, #2a9d8f, #90dbc8); }
.g-gold      { background: linear-gradient(140deg, #b5852f, #ecc363); }
.g-desert    { background: linear-gradient(140deg, #c96f3b, #ecc19a); }
.g-teal      { background: linear-gradient(140deg, #14808a, #6fd0c0); }
.g-sky       { background: linear-gradient(140deg, #3a7bd5, #86bff0); }
.g-lav       { background: linear-gradient(140deg, #6f5fa8, #b8a8e0); }
.g-red       { background: linear-gradient(140deg, #b5453e, #e88f6a); }
.g-purple    { background: linear-gradient(140deg, #5d3a8a, #a578c9); }
.g-maldives  { background: linear-gradient(140deg, #0e9aa7, #8fe0d0); }
.g-rose      { background: linear-gradient(140deg, #c05070, #eba5a3); }

/* ---------- Article page ---------- */
.article-hero {
  color: #fff;
  padding: 108px 20px 96px;
  text-align: center;
  position: relative;
  z-index: 10; /* paints above the fixed side rails */
  overflow: hidden;
}
.article-hero::before {
  content: "";
  position: absolute;
  inset: -6%;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  animation: heroZoom 24s ease-in-out infinite alternate;
}
.article-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 18, 32, 0.58), rgba(14, 18, 32, 0.34) 50%, rgba(14, 18, 32, 0.64));
}
.article-hero .hero-icon { animation: fadeUp 0.8s ease-out both; }
.article-hero h1 {
  animation: fadeUp 0.9s ease-out both 0.15s;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.article-hero .hero-meta { animation: fadeUp 0.9s ease-out both 0.35s; }
.article-hero .hero-icon, .article-hero h1, .article-hero .hero-meta { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .hero-slide, .article-hero::before { animation: none; }
  .hero-slide:first-child { opacity: 1; }
  .hero-eyebrow, .hero-sub, .hero-ctas, .hero-stats,
  .hero-home h1, .hero-home p, .hero-home .btn,
  .article-hero .hero-icon, .article-hero h1, .article-hero .hero-meta { animation: none; }
}
.article-hero .hero-icon { margin-bottom: 14px; position: relative; z-index: 1; }
.article-hero .hero-icon svg { width: 54px; height: 54px; stroke: #fff; opacity: 0.95; }
.article-hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4.4vw, 2.8rem);
  line-height: 1.2;
  max-width: 820px;
  margin: 0 auto 14px;
  position: relative;
  z-index: 1;
}
.article-hero .hero-meta { opacity: 0.9; font-size: 0.93rem; position: relative; z-index: 1; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 18px 0 0;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--accent); }

.article-body { padding: 26px 0 40px; }
.article-body h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.55rem;
  margin: 40px 0 14px;
  line-height: 1.3;
}
.article-body h3 { font-size: 1.15rem; margin: 26px 0 10px; }
.article-body p { margin-bottom: 18px; color: #333a48; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; color: #333a48; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--ink); }

.article-img { margin: 24px 0; text-align: center; }
.article-img img {
  width: 100%;
  height: auto; /* full image, never cropped */
  border-radius: 14px;
  box-shadow: var(--shadow);
}
/* portrait photos: show complete at a comfortable size, no cropping */
.article-img img[height]:not([height=""]) { max-width: 100%; }
.article-img figcaption {
  font-size: 0.78rem;
  color: #a09a90;
  text-align: right;
  margin-top: 6px;
}
.article-img figcaption a { color: #a09a90; text-decoration: underline; }

/* Nomadic Matt style READ MORE reference callouts */
.read-more-ref {
  background: #fdf1f1;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 13px 18px;
  margin: 22px 0;
  font-size: 0.98rem;
}
.read-more-ref strong { color: var(--accent-dark); letter-spacing: 0.5px; }
.read-more-ref a { font-weight: 700; }

.tip-box {
  background: #f7f7f7;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.97rem;
}
.tip-box strong { color: var(--accent-dark); }

/* ---------- Ad slots: theme-matched sponsor cards, hard-contained ---------- */
.ad-slot {
  margin: 30px auto;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 26px 12px 14px;
}
.ad-slot::before {
  content: "SPONSORED";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  font-size: 0.58rem;
  letter-spacing: 2.4px;
  color: #b8b2a8;
}
.ad-slot:not(:has(*)) { display: none; } /* hide slots with no ad code */
.ad-slot iframe { max-width: 100%; border-radius: 8px; }
/* top + pre-related banners are short strips */
.ad-slot.ad-desktop { max-height: 156px; }
.ad-slot.ad-mobile { max-height: 360px; }
/* in-content / native / end-of-article slots */
.article-body .ad-slot:not(.ad-desktop):not(.ad-mobile),
.container .ad-slot:not(.ad-desktop):not(.ad-mobile) { max-height: 380px; }

/* device-specific slots: desktop banner vs mobile banner */
.ad-mobile { display: none; }
@media (max-width: 820px) {
  .ad-desktop { display: none; }
  .ad-mobile { display: block; }
}

/* desktop-only sticky side rails (160-wide skyscrapers), theme cards */
.ad-siderail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%); /* floats mid-screen, never near the header */
  right: 14px;
  width: 176px;
  max-height: 660px;
  overflow: hidden;
  z-index: 5; /* below hero sections so ads never cover the header image */
  display: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
}
.ad-siderail-left { right: auto; left: 14px; }
.ad-siderail iframe { max-width: 160px; border-radius: 8px; }
@media (min-width: 1300px) {
  .ad-siderail {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
  }
  .ad-siderail.rail-show { opacity: 1; pointer-events: auto; }
}

/* neutralize page-dimming overlay layers injected by ad scripts */
body > div[style*="position: fixed"][style*="rgba"],
body > div[style*="position:fixed"][style*="rgba"],
body > div[style*="position: fixed"][style*="rgb("],
body > div[style*="position:fixed"][style*="rgb("],
body > div[style*="position: fixed"][style*="opacity"]:not([class]):not([id]),
body > div[style*="position:fixed"][style*="opacity"]:not([class]):not([id]),
body > div[style*="position: fixed"][style*="background: #000"],
body > div[style*="position: fixed"][style*="background:#000"],
body > div[style*="z-index: 2147"],
body > div[style*="z-index:2147"] {
  display: none !important;
}
html, body { filter: none !important; opacity: 1 !important; }

/* ---------- Related posts ---------- */
.related {
  border-top: 1px solid var(--line);
  padding: 34px 0 20px;
}
.related h2 { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; margin-bottom: 18px; }
.related-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.related-list a {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: all 0.15s ease;
}
.related-list a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Newsletter / CTA strip ---------- */
.cta-strip {
  background: linear-gradient(135deg, #2b3a55, #4a5d80);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 30px;
  text-align: center;
  margin: 40px 0;
}
.cta-strip h2 { font-family: var(--font-display); margin-bottom: 8px; }
.cta-strip p { opacity: 0.9; margin-bottom: 0; color: #fff; }

/* ---------- Static pages ---------- */
.page-body { padding: 46px 0 70px; }
.page-body h1 { font-family: var(--font-display); font-weight: 900; font-size: 2.2rem; margin-bottom: 20px; }
.page-body h2 { font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; margin: 30px 0 12px; }
.page-body p, .page-body li { color: #333a48; }
.page-body ul { margin: 0 0 18px 24px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #16181d;
  color: #a9adb5;
  padding: 46px 20px 30px;
  margin-top: 30px;
}
.footer-inner {
  max-width: none;
  margin: 0;
  padding: 0 6px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-inner h4 { color: #fff; margin-bottom: 12px; font-size: 1rem; }
.footer-inner a { color: #b9bfd0; display: block; margin-bottom: 8px; font-size: 0.92rem; }
.footer-inner a:hover { color: #fff; }
.footer-brand .logo { color: #fff; font-size: 1.3rem; }
.footer-brand p { font-size: 0.92rem; margin-top: 10px; max-width: 300px; }
.footer-bottom {
  max-width: none;
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 1px solid #394055;
  font-size: 0.85rem;
  text-align: center;
  color: #8a90a5;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 24px; width: 100%; }
  .nav-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  body { font-size: 16px; }
  .article-body h2 { font-size: 1.38rem; }
  .article-body h3 { font-size: 1.1rem; }
  .breadcrumb { font-size: 0.8rem; }
  .post-card { flex-direction: column; }
  .card-visual { width: 100%; min-width: 0; height: 190px; }
  .card-body h3 { font-size: 1.2rem; }
  .article-hero { padding: 52px 16px 48px; }
  .article-hero .hero-icon svg { width: 44px; height: 44px; }
  .hero-home { padding: 76px 18px 70px; }
  .hero-stats { gap: 28px; margin-top: 34px; }
  .hero-stats strong { font-size: 1.4rem; }
  .section-title { font-size: 1.6rem; }
  .cta-strip { padding: 26px 18px; }
}

@media (max-width: 400px) {
  .container, .container-narrow { padding: 0 14px; }
  .filter-btn { padding: 7px 14px; font-size: 0.85rem; }
  .card-visual { height: 150px; }
  .post-card .card-body { padding: 16px 16px 20px; }
}
