/*
Theme Name: Backpacker Granny
Theme URI: https://backpackergranny.com
Author: Julian Forster
Description: Bright Yellow, Blue & Beige editorial travel blog theme for Geraldine "Gerri" Forster (Backpacker Granny).
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: backpacker-granny
*/

:root {
  --bg: #f8f3e8;
  --surface: #fffdf8;
  --surface-warm: #efe5d1;
  --ink: #243746;
  --ink-muted: #526473;
  --forest: #1e5f8a;
  --forest-dark: #17496b;
  --terracotta: #b57409;
  --terracotta-hover: #965f06;
  --gold: #f4bf2a;
  --gold-hover: #e3ad18;
  --border: #e2d5bc;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(30, 95, 138, 0.08);
  --shadow-lg: 0 20px 50px rgba(30, 95, 138, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
.serif {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-top: 0;
}

html body .container {
  width: min(1180px, calc(100% - 2.5rem)) !important;
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

html body .container-narrow {
  width: min(820px, calc(100% - 2.5rem)) !important;
  max-width: 820px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(244, 191, 42, 0.24);
  color: #ffe699;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 243, 232, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

body.admin-bar .navbar {
  top: 32px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--forest);
  color: #faf7f2;
  display: grid;
  place-items: center;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-title {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--forest);
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links .current-menu-item > a {
  color: var(--terracotta);
}

.nav-links a.btn-primary {
  color: #143a54;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--gold);
  color: #143a54;
}

.btn-primary:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
}

.btn-forest {
  background: var(--forest);
  color: #fff;
}

.btn-forest:hover {
  background: var(--forest-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.btn-outline:hover {
  background: var(--forest);
  color: #fff;
}

.btn-light {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.28);
}

.btn-sm {
  padding: 0.55rem 1.05rem;
  font-size: 0.86rem;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  color: var(--forest);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--forest);
  color: #fff;
  min-height: 540px;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    95deg,
    rgba(23, 73, 107, 0.86) 0%,
    rgba(30, 95, 138, 0.64) 55%,
    rgba(30, 95, 138, 0.26) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4.5rem 0;
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(244, 191, 42, 0.24);
  border: 1px solid rgba(244, 191, 42, 0.6);
  color: #ffe89e;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 1rem;
  color: #fff;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.85rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-stat strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.65rem;
  color: #ffe89e;
}

.hero-stat span {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.82);
}

/* Press bar */
.press-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.35rem 0;
}

.press-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.press-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  font-weight: 700;
}

.press-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--forest);
  opacity: 0.85;
}

/* Sections */
.section {
  padding: 4.2rem 0;
}

.section-warm {
  background: var(--surface-warm);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  margin-bottom: 0.45rem;
  display: block;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  margin-bottom: 0.35rem;
  color: var(--forest);
}

.section-header p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 600px;
}

/* Grids & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.card-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e9e2d6;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.tag-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: rgba(30, 95, 138, 0.92);
  color: #fff;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}

.card-body {
  padding: 1.35rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 0.55rem;
}

.card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  color: var(--forest);
}

.card-body p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0 0 1.15rem;
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--terracotta);
}

/* Destination photo cards */
.dest-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow);
  background: var(--forest);
}

.dest-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.dest-card:hover img {
  transform: scale(1.06);
}

.dest-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23, 73, 107, 0.86) 0%, rgba(30, 95, 138, 0.14) 60%);
}

.dest-card-content {
  position: relative;
  z-index: 2;
  padding: 1.35rem;
  color: #fff;
}

.dest-card-content span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffe89e;
  font-weight: 700;
}

.dest-card-content h3 {
  margin: 0.25rem 0 0;
  font-size: 1.35rem;
  color: #fff;
}

/* Insurance & Toolkit widgets */
.monetize-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.age-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 1.5rem;
}

.age-tab {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s ease;
  font-family: inherit;
}

.age-tab.active,
.age-tab:hover {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

.insurance-panel[hidden] {
  display: none;
}

.affiliate-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.affiliate-card h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--forest);
}

.affiliate-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  flex: 1;
}

/* eBook Banner */
.ebook-banner {
  background: linear-gradient(135deg, #1e5f8a 0%, #2d7fb0 100%);
  color: #fff;
  border-radius: 22px;
  padding: 2.6rem;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2.2rem;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.ebook-mock {
  background: linear-gradient(155deg, #e7a91d 0%, #c8860f 100%);
  border-radius: 14px;
  padding: 2rem 1.6rem;
  box-shadow: 0 20px 40px rgba(23, 73, 107, 0.28);
  border-left: 8px solid #fff3c4;
}

.ebook-mock h3 {
  color: #fff;
  font-size: 1.55rem;
  margin: 0.6rem 0;
}

/* Newsletter */
.newsletter-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 2.5rem;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.newsletter-form {
  display: flex;
  gap: 0.7rem;
  max-width: 520px;
  margin: 1.5rem auto 0;
}

.newsletter-form input {
  flex: 1;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 0.98rem;
  font-family: inherit;
  outline: none;
  background: var(--surface);
}

.newsletter-form input:focus {
  border-color: var(--forest);
}

.newsletter-success {
  margin-top: 1.25rem;
  padding: 0.9rem 1.25rem;
  border-radius: 14px;
  background: #e6f3fa;
  color: #17496b;
  font-weight: 600;
  display: inline-block;
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.search-input {
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.94rem;
  min-width: 240px;
  font-family: inherit;
}

/* Article / Story Reader */
.article-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.article-hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  color: var(--forest);
  margin: 0.75rem 0 1rem;
}

.article-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 18px;
  margin: 1.75rem 0 0;
  box-shadow: var(--shadow);
}

.prose {
  font-size: 1.08rem;
  line-height: 1.82;
  color: var(--ink);
  padding: 2.5rem 0;
}

.prose h2,
.prose h3 {
  color: var(--forest);
  margin-top: 2.2rem;
  margin-bottom: 0.85rem;
}

.prose p {
  margin: 0 0 1.25rem;
}

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

.prose figure,
.prose .wp-block-image {
  margin: 2rem 0;
}

.prose img {
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin: 1.5rem auto;
  max-height: 560px;
  object-fit: cover;
}

.prose figcaption {
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
}

/* Pagination */
.pagination {
  margin-top: 2.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

/* Footer */
.footer {
  background: var(--forest);
  color: rgba(255, 255, 255, 0.88);
  padding: 3.5rem 0 2.2rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.footer h4 {
  color: #fff;
  margin-bottom: 0.9rem;
  font-size: 1.05rem;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.footer a:hover {
  color: #ffe89e;
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 960px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .ebook-banner,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.affiliate-note {
  margin: 1.15rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

@media (max-width: 720px) {
  html body .container,
  html body .container-narrow {
    width: calc(100% - 1.75rem) !important;
    max-width: 100% !important;
  }
  .hero {
    min-height: 460px;
  }
  .hero-content {
    padding: 3rem 0;
  }
  .hero-stats {
    gap: 1.25rem;
  }
  .section {
    padding: 3rem 0;
  }
  .monetize-box,
  .ebook-banner,
  .newsletter-box {
    padding: 1.5rem;
  }
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
    box-shadow: var(--shadow);
  }
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  .grid-3,
  .grid-4,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
}

/* ==========================================================================
   Legacy Page Builder (Elementor & Avada/Fusion) Typography Hardening
   Ensures consistent, clean editorial typography across all older pages/posts
   ========================================================================== */
body,
body[class*="elementor-kit"] {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  color: var(--ink) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  background: var(--bg) !important;
}

.navbar,
.navbar *,
.footer,
.footer *,
.hero,
.hero *,
.article-hero,
.article-hero *,
.card,
.card *,
.btn {
  letter-spacing: normal !important;
  text-transform: none !important;
}

.eyebrow,
.press-label,
.dest-card-content span {
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.navbar a,
.footer a,
.card a,
.prose a,
a.btn {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  letter-spacing: normal !important;
}

.brand-title,
.brand-mark,
h1,
h2,
h3,
h4,
.article-hero h1,
.hero h1,
.section-header h2,
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: 'Fraunces', Georgia, serif !important;
  letter-spacing: -0.015em !important;
  text-transform: none !important;
  line-height: 1.22 !important;
}

.article-hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem) !important;
  color: var(--forest) !important;
}

.brand {
  flex-shrink: 0;
}

.brand-mark {
  flex-shrink: 0;
}

.prose p,
.prose li,
.prose .elementor-widget-text-editor,
.prose .elementor-heading-title,
.prose .fusion-text,
.prose .fusion-text p {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 1.06rem !important;
  line-height: 1.8 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--ink) !important;
}

.prose .elementor-heading-title,
.prose .fusion-title h1,
.prose .fusion-title h2,
.prose .fusion-title h3,
.prose .fusion-title h4,
.prose h1 {
  font-family: 'Fraunces', Georgia, serif !important;
  color: var(--forest) !important;
  text-transform: none !important;
  letter-spacing: -0.015em !important;
  font-size: 1.65rem !important;
  line-height: 1.28 !important;
}

.prose .fusion-fullwidth,
.prose .fusion-builder-row,
.prose .fusion-layout-column,
.prose .fusion-column-wrapper,
.prose .elementor-section,
.prose .elementor-column-wrap,
.prose .elementor-widget-wrap,
.prose .elementor-widget-container {
  border: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

.prose .fusion-fullwidth {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Hide duplicate Jetpack plain-text related posts & empty Like widget (theme renders rich photo related cards) */
#jp-relatedposts,
.jp-relatedposts,
.sharedaddy.sd-like,
.jetpack-likes-widget-wrapper {
  display: none !important;
}

