/* =========================================================
   ADVENTURE NAT — Elevated Luxury Editorial Theme
   ========================================================= */

:root {
  --color-deep: #0f2a2e;
  --color-brand: #0e6f68;
  --color-brand-hover: #0a5650;
  --color-blush: #f6ddd3;
  --color-dusty-rose: #e9b9a6;
  --color-lavender: #dcebe8;
  --color-cream: #f7f5f0;
  --color-gold-soft: #f3d9a4;
  --color-accent-soft: #e6f2f0;
  --color-accent-border: #bfdcd7;
  --color-text-dark: #2a3a3d;
  --color-text-heading: #12262a;
  --color-text-nav: #33464a;
  --color-text-muted: #55676b;
  --color-text-soft: #62747a;
  --color-text-on-dark: #eef5f3;
  --color-surface: #ffffff;
  --color-surface-alt: #fbfaf6;
  --color-placeholder: #dde6e3;
  --color-placeholder-strong: #c5d3cf;
  --color-slate-card: #3c4e52;
  --color-bg-light: #eef5f3;
  --color-border: #e2ded5;
  /* Warm coral: the one accent colour, for calls to action and highlights. */
  --color-accent: #c8452c;
  --color-accent-hover: #a83822;
  --color-divider: #e9e5dc;

  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Montserrat", -apple-system, sans-serif;

  --text-xs: 0.72rem;
  --text-sm: 0.88rem;
  --text-body: 0.96rem;
  --text-card: 1.12rem;
  --text-h2: 2.2rem;
  --text-logo: 3.2rem;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-sm: 0 10px 24px rgba(15, 42, 46, 0.08);
  --shadow-md: 0 18px 40px rgba(15, 42, 46, 0.1);
  --transition-base: 0.25s ease;

  --container-width: 1280px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  /* Original Decorative Background: Subtle warm cream base with delicate micro-lattice texture in brand blush/crimson tint */
  background-color: #f7f5f0;
  background-image: 
    radial-gradient(#cfe0dc 0.75px, transparent 0.75px), 
    radial-gradient(#cfe0dc 0.75px, #f7f5f0 0.75px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  color: var(--color-text-dark);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.container { 
  max-width: var(--container-width); 
  margin: 0 auto; 
  padding: 0 var(--space-5);
}

/* Redesigned Centered Boxed Column Frame */
.site-wrapper {
  max-width: var(--container-width);
  margin: 24px auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(15, 42, 46, 0.07), 0 0 0 1px rgba(226, 222, 213, 0.8);
  overflow: visible;
}

@media (max-width: 1320px) {
  .site-wrapper {
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
  }
}

.text-center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ============ TOP UTILITY NAV ============ */
.top-nav-bar {
  background: linear-gradient(90deg, rgba(15, 42, 46,0.95), rgba(15, 42, 46,0.92));
  color: var(--color-text-on-dark);
  padding: 12px 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.top-nav-bar .container {
  gap: var(--space-7);
}
.top-user-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.top-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 224px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: var(--radius-pill);
  padding: 6px 9px 6px 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  transition: width 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.top-search-box:focus-within {
  width: 264px;
  background: rgba(255,255,255,0.96);
  border-color: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 3px rgba(14, 111, 104,0.22), 0 8px 22px rgba(0,0,0,0.18);
}

/* ============ LIVE SEARCH AUTOCOMPLETE DROPDOWN ============ */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 36px rgba(15, 42, 46, 0.16);
  z-index: 2000;
  max-height: 420px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}
.search-dropdown.show {
  display: flex;
}
.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-base);
  text-decoration: none;
  color: var(--color-text-dark);
}
.search-dropdown-item:last-child {
  border-bottom: none;
}
.search-dropdown-item:hover {
  background-color: var(--color-bg-light);
}
.search-dropdown-thumb {
  width: 52px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-placeholder);
}
.search-dropdown-info {
  flex: 1;
  min-width: 0;
}
.search-dropdown-title {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 3px;
}
.search-dropdown-meta {
  font-size: 0.7rem;
  color: var(--color-brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.search-dropdown-empty {
  padding: 16px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.4;
}
.search-dropdown-empty a {
  color: var(--color-brand);
  font-weight: 700;
}
.top-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  color: var(--color-surface);
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 2px 8px 2px 0;
  width: 100%;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}
.top-search-box:focus-within .top-search-input {
  color: var(--color-deep);
}
.top-search-input::placeholder {
  color: rgba(226,232,240,0.78);
}
.top-search-box:focus-within .top-search-input::placeholder {
  color: #55676b;
}
.top-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: var(--color-placeholder);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.top-search-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.top-search-box:focus-within .top-search-btn {
  background: var(--color-brand);
  color: var(--color-surface);
}
.top-search-btn:hover {
  transform: scale(1.04);
}
.top-socials {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.top-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  color: var(--color-text-on-dark);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--transition-base), opacity var(--transition-base);
}
.top-socials svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
}
.top-socials a:hover {
  color: var(--color-brand);
  opacity: 0.95;
}
.top-user-links a {
  margin-right: 4px;
  font-weight: 600;
  color: var(--color-text-on-dark);
  transition: color var(--transition-base);
}
.top-user-links a:hover {
  color: var(--color-surface);
}
.btn-top-sub {
  display: inline-block;
  background: var(--color-surface);
  color: var(--color-deep) !important;
  padding: 8px var(--space-4);
  border-radius: var(--radius-pill);
  font-weight: 700 !important;
  /* Wraps if it needs to -- forcing nowrap unconditionally let the
     hero's longer CTA text push the whole page wider than the
     viewport at some widths (phones, and some tablet/laptop widths
     where the sidebar + 2-column hero leave less room than the text
     needs), causing horizontal scroll. At most viewport widths there
     is enough room and it still renders on one line. */
  white-space: normal;
  box-shadow: 0 12px 28px rgba(14, 111, 104, 0.12);
  transition: background-color var(--transition-base), color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}
.btn-top-sub:hover {
  background: var(--color-accent);
  color: var(--color-surface) !important;
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(200, 69, 44, 0.28);
}

/* ============ BRAND HEADER ============ */
.main-header {
  padding: 30px 0 0;
  background: var(--color-surface);
}
.brand-logo {
  font-family: var(--font-serif);
  font-size: var(--text-logo);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-dark);
  display: inline-block;
  margin-bottom: var(--space-5);
}

.category-nav {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.nav-links {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  padding: 0;
  flex-wrap: wrap;
}
.nav-item {
  position: relative;
  padding: 12px 0;
}
.nav-link-item {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-nav);
  display: block;
}
.nav-link-item:hover { color: var(--color-brand); }.category-nav {
  background: rgba(238, 245, 243, 0.94);
  border-top: 1px solid rgba(226, 222, 213, 0.9);
  border-bottom: 1px solid rgba(226, 222, 213, 0.9);
}
/* ============ DROPDOWN MENU STYLING ============ */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  z-index: 1000;
  padding: 8px 0;
}
.dropdown:hover .dropdown-menu {
  display: flex;
  flex-direction: column;
}
.dropdown-menu a {
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.dropdown-menu a:hover {
  background: var(--color-accent-soft);
  color: var(--color-brand);
}
/* ============ AUDITED & STANDARDIZED CORE STYLES ============ */
.hidden-cat {
  display: none !important;
}

/* "No results" placeholder -- used across the homepage category grids,
   blog listing, lookbook, and search. Was previously unstyled (plain
   browser-default text with no spacing). */
.empty-state {
  padding: 20px 4px;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-style: italic;
  text-align: center;
}

/* 1 & 3. SECTION SPACING STANDARDIZATION
   Each category section is framed as one bordered card (banner +
   grid together), matching the reference's boxed "Posts You Would
   Love" layout -- own crimson banner instead of copying its color. */
.home-section {
  margin-top: 0;
  margin-bottom: 48px;
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}
.home-section .section-banner-title {
  margin: 0;
}

/* HERO PROMO CARD - MATCHING WEB & MOBILE VIEW */
.hero-promo-card {
  display: grid;
  /* minmax(0, 1fr), not bare 1fr -- a bare 1fr track refuses to
     shrink below its content's min-content width, which at narrower
     desktop/tablet widths (sidebar + fixed 420px photo leaving little
     room) forced the whole card wider than its container instead of
     letting the text column shrink and wrap. */
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  background: var(--color-brand);
  border: none;
  border-radius: var(--radius-md);
  padding: 48px 44px;
  margin: 32px 0 28px;
  align-items: center;
  box-shadow: 0 16px 40px rgba(14, 111, 104, 0.22);
}

.promo-img-placeholder {
  order: 2;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  background: var(--color-placeholder-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
  /* Framed, slightly tilted "polaroid" treatment on the hero band. */
  border: 10px solid var(--color-cream);
  transform: rotate(3deg);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.3);
}
.promo-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.placeholder-box {
  color: var(--color-text-soft);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.promo-text-content {
  order: 1;
}
.promo-text-content h1 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  margin: 0 0 14px;
  color: #ffffff;
  line-height: 1.2;
}
.promo-text-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  margin-bottom: 22px;
  line-height: 1.65;
  max-width: 44ch;
}
/* The hero's CTA reuses .btn-top-sub as-is -- the same solid pill
   button already established for the top bar's Subscribe link --
   just placed on the hero band instead of inventing a new button. */

/* 4. STANDARDIZED CATEGORY BADGE / PILL DESIGN */
.pill-badges-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-brand);
  border: 1px solid #bfdcd7;
  background: #e6f2f0;
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 2px 6px rgba(14, 111, 104, 0.04);
}

/* OVERLAY BADGE FOR POST CARDS */
.card-badge-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--color-brand);
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ============ SECTION TITLE BANNERS ============ */
.section-banner-title {
  background: var(--color-brand);
  color: #ffffff;
  padding: 16px 28px;
  display: block;
  margin-bottom: 24px;
}
/* ============ BREADCRUMB NAVIGATION ============ */
.breadcrumb-trail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 24px;
  margin-bottom: 8px;
}
.breadcrumb-trail a {
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.breadcrumb-trail a:hover {
  color: var(--color-brand);
}
.breadcrumb-trail .separator {
  color: var(--color-text-soft);
  font-size: 0.75rem;
}
.breadcrumb-trail .current {
  color: var(--color-brand);
  font-weight: 600;
}

/* Prominent serif heading, now sitting inside the crimson banner strip. */
/* "View All" links: tall enough to be a comfortable tap target. */
.section-banner-title a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 0;
}

.section-banner-title h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.015em;
}

/* 2. STANDARDIZED CARD IMAGE ASPECT RATIO & OVERFLOW RESERVATION (CLS PREVENTION) */
.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px 28px 28px;
  margin-bottom: 0;
}
.three-col-grid .empty-state {
  grid-column: 1 / -1;
}

.card-popular-item {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  /* 9. STANDARDIZED LIGHTWEIGHT HOVER ANIMATION (TRANSFORM & SHADOW ONLY) */
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  will-change: transform;
}
.card-popular-item:hover {
  transform: translateY(-4px);
  border-color: var(--color-brand);
  box-shadow: 0 12px 28px rgba(14, 111, 104, 0.12);
}

.card-img-placeholder {
  position: relative;
  width: 100%;
  /* Fixed aspect-ratio reserves layout space to eliminate Cumulative Layout Shift (CLS) */
  aspect-ratio: 16 / 10;
  height: auto;
  background: var(--color-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.card-img-placeholder.medium {
  aspect-ratio: 16 / 10;
  height: auto;
}

/* 5. STANDARDIZED TYPOGRAPHY ACROSS ALL SECTIONS */
.card-popular-item h3,
.card-popular-item h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 18px 18px 8px;
  line-height: 1.4;
  color: var(--color-text-heading);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-excerpt-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 18px 18px;
  line-height: 1.6;
}

/* STANDARDIZED READ MORE BUTTONS */
.card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin: auto 18px 18px 18px;
  transition: color var(--transition-base), gap var(--transition-base);
}
.card-read-more:hover {
  color: var(--color-brand-hover);
  gap: 10px;
}

/* 7. IMPROVED "LET'S STAY IN TOUCH" / TOUCH BOX SPACING & READABILITY */
.text-card-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 36px 32px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.text-card-item h2,
.text-card-item h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.45;
  color: var(--color-text-heading);
}
.touch-list-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.touch-item {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ============ SIDEBAR LAYOUT GRID & LAST POST WIDGET ============ */
.page-sidebar-layout {
  display: grid;
  /* minmax(0, 1fr), not bare 1fr -- same reason as .hero-promo-card: a bare
     1fr column grows to fit its widest content (a table, a long URL, an
     embed), which pushed the whole page wider than a phone screen. */
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  margin-top: 24px;
  margin-bottom: 48px;
}

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.widget-last-post {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* The sticky element has to be the [data-widget] wrapper, not
   .widget-last-post inside it: sticky only moves within its parent, and
   the wrapper is exactly as tall as the widget -- so a sticky widget had
   no room to travel and scrolled away. The wrapper's parent,
   .sidebar-column, stretches the full height of the page's grid row. */
.sidebar-column > [data-widget="last-post"] {
  position: sticky;
  top: 24px;
  z-index: 20;
}

.widget-banner-header {
  background: var(--color-deep);
  color: #ffffff;
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-banner-header::before {
  content: '★';
  color: var(--color-brand);
}

.widget-post-list {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.widget-post-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-base);
  text-decoration: none;
  color: var(--color-text-dark);
}
.widget-post-item:last-child {
  border-bottom: none;
}
.widget-post-item:hover {
  background-color: var(--color-bg-light);
}

.widget-thumb-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-placeholder);
}
.widget-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.widget-badge-overlay {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-brand);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  line-height: 1;
}

.widget-post-content {
  flex: 1;
  min-width: 0;
}
.widget-post-title {
  font-family: var(--font-serif);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text-heading);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.widget-post-time {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* "You might also like" -- reuses .widget-post-item's row layout (thumbnail +
   clamped title) below the article, just sized for the wider main column
   instead of the narrow sidebar. */
.related-posts-block {
  margin-top: 32px;
  padding: 24px 26px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}
.related-posts-block h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--color-text-heading);
}
.related-posts-block .widget-post-list {
  padding: 4px 0 0;
}
.related-posts-block .widget-thumb-wrapper {
  width: 88px;
  height: 88px;
}
.related-posts-block .widget-post-title {
  font-size: 1rem;
}

@media (max-width: 992px) {
  .sidebar-column {
    position: static;
  }

  .page-sidebar-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  /* Once stacked, the "Last Post" widget becomes a compact strip pinned to
     the top of the screen (posts scroll sideways), so it stays visible the
     whole way down the page like the desktop sidebar -- without pushing
     the page's own content down by a full-height widget.
     Sticky only travels within its parent, and a stacked grid row is only
     as tall as the widget itself -- so the layout switches to block and
     .sidebar-column steps out of the box tree (display: contents), making
     the wrapper a direct child of the full-height .page-sidebar-layout. */
  .page-sidebar-layout {
    display: block;
  }

  .page-sidebar-layout > .sidebar-column {
    display: contents;
  }

  .sidebar-column > [data-widget="last-post"] {
    position: sticky;
    top: 0;
    margin-bottom: 20px;
  }

  .widget-last-post {
    display: flex;
    align-items: stretch;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  }

  .widget-last-post .widget-banner-header {
    flex: 0 0 auto;
    width: 64px;
    padding: 6px 8px;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    line-height: 1.25;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 2px;
  }

  .widget-last-post .widget-post-list {
    flex-direction: row;
    padding: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .widget-last-post .widget-post-list::-webkit-scrollbar {
    display: none;
  }

  .widget-last-post .widget-post-item {
    flex: 0 0 230px;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: none;
    border-right: 1px solid var(--color-border);
    scroll-snap-align: start;
  }
  .widget-last-post .widget-post-item:last-child {
    border-right: none;
  }

  .widget-last-post .widget-thumb-wrapper {
    width: 44px;
    height: 44px;
  }

  .widget-last-post .widget-badge-overlay {
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    font-size: 0.58rem;
  }

  .widget-last-post .widget-post-title {
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0;
  }

  .widget-last-post .widget-post-time {
    display: none;
  }
}

/* ============ RESPONSIVE MEDIA QUERIES (MOBILE & PC) ============ */
/* Below 1200px the sidebar (side-by-side from 992px up) leaves too
   little room next to the hero's fixed 420px photo for the text
   column to stay comfortable -- so the hero stacks to one column
   well before the sidebar itself stacks, rather than only below
   900px. */
@media (max-width: 1200px) {
  .hero-promo-card {
    grid-template-columns: 1fr;
    padding: 24px;
    margin: 24px 0 20px;
    gap: 20px;
  }
  .promo-img-placeholder {
    aspect-ratio: 16 / 9;
    border-width: 6px;
    transform: rotate(1.5deg);
  }
  .promo-text-content h1 {
    font-size: 1.75rem;
  }
  .promo-text-content p {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .top-nav-bar .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .top-socials {
    justify-content: center;
  }
  .top-user-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
    width: 100%;
  }
  .top-search-box {
    width: 100%;
    max-width: 320px;
    justify-content: space-between;
    order: -1;
  }
  .top-search-box:focus-within {
    width: 100%;
    max-width: 360px;
  }

  .main-header {
    padding: 20px 0 0;
  }
  .brand-logo {
    font-size: 2.2rem;
    margin-bottom: 12px;
  }

  .category-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 0 16px;
    gap: 16px;
  }
  .nav-item {
    white-space: nowrap;
    padding: 10px 0;
  }

  .pill-badges-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 32px;
  }
  .badge-pill {
    text-align: center;
  }

  .section-banner-title {
    padding: 14px 20px;
  }
  .section-banner-title h2 {
    font-size: 1.4rem;
  }

  .three-col-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .home-section {
    margin-bottom: 36px;
  }
}

/* ============ SUBSCRIBE MODAL & OVERLAY STYLING ============ */
body.modal-open {
  overflow: hidden !important;
}

.subscribe-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 42, 46, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.subscribe-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.subscribe-modal-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(15, 42, 46, 0.25);
  transform: scale(0.92);
  transition: transform 0.25s ease;
}
.subscribe-modal-overlay.open .subscribe-modal-container {
  transform: scale(1);
}

.subscribe-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-light);
  border: none;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base);
}
.subscribe-modal-close:hover {
  background: var(--color-brand);
  color: #ffffff;
}

.subscribe-modal-header {
  text-align: center;
  margin-bottom: 20px;
}
.subscribe-modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin: 0 0 6px;
}
.subscribe-modal-header p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0;
}
/* ============ BLOG POST SUBSCRIPTION ============ */
.blog-subscribe-section {
  padding: 48px 0;
}
.blog-subscribe-section .subscribe-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 28px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 32px;
}
.blog-subscribe-section .subscribe-copy h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.2;
  margin: 6px 0 10px;
}
.blog-subscribe-section .subscribe-copy p,
.blog-subscribe-section .subscribe-note {
  color: #3c4e52;
}
.blog-subscribe-section .eyebrow {
  color: var(--color-brand);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.blog-subscribe-form {
  display: grid;
  gap: 12px;
}
.blog-subscribe-form .subscribe-row {
  display: flex;
  gap: 10px;
}
.blog-subscribe-form input[type="text"],
.blog-subscribe-form input[type="email"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 11px 12px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
}
.blog-subscribe-form .btn {
  min-height: 44px;
  border: 1px solid var(--color-brand);
  background: var(--color-brand);
  color: #ffffff;
  border-radius: 4px;
  padding: 0 20px;
  font-family: var(--font-sans);
  font-weight: 700;
  cursor: pointer;
}
.blog-subscribe-form .btn:disabled {
  opacity: 0.7;
  cursor: wait;
}
.consent-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.86rem;
  color: #3c4e52;
}
.consent-row input {
  margin-top: 4px;
}
.subscription-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px !important;
  height: 1px;
  opacity: 0;
}
.blog-subscribe-form .form-msg {
  min-height: 22px;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}
.blog-subscribe-form .form-msg.success {
  color: #166534;
}
.blog-subscribe-form .form-msg.error {
  color: var(--color-brand);
}
@media (max-width: 768px) {
  .blog-subscribe-section .subscribe-wrap {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .blog-subscribe-form .subscribe-row {
    flex-direction: column;
  }
  .blog-subscribe-form .btn {
    width: 100%;
  }
}

/* ============ PINTEREST "SAVE PIN" OVERLAY COMPONENT ============ */
.pin-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.pin-save-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-brand, #0e6f68);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
  user-select: none;
}

.pin-save-btn svg {
  width: 14px;
  height: 14px;
  fill: #ffffff;
  flex-shrink: 0;
}

.pin-save-btn:hover {
  background: #0a5650;
  transform: scale(1.04);
  color: #ffffff;
}

/* Show button on desktop hover */
.pin-wrapper:hover .pin-save-btn,
.card-media:hover .pin-save-btn,
.card-img-placeholder:hover .pin-save-btn,
.promo-img-placeholder:hover .pin-save-btn {
  opacity: 1;
  visibility: visible;
}

/* Always visible on touch & mobile screens */
@media (max-width: 768px), (pointer: coarse) {
  .pin-save-btn {
    opacity: 0.92 !important;
    visibility: visible !important;
    top: 8px;
    right: 8px;
    padding: 5px 10px;
    font-size: 0.7rem;
  }
}


/* =========================================================
   BLOG LISTING CARD LAYOUT
   Keeps the existing 280x210 image size while making the
   card clean and responsive on desktop + mobile.
   ========================================================= */

.list-row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  align-items: start;
  text-decoration: none;
  color: inherit;
  margin-bottom: 34px;
}

.list-row .card-media {
  position: relative;
  width: 280px;
  height: 210px;
  overflow: hidden;
  flex-shrink: 0;
}

.list-row .card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--color-placeholder);
}

.list-row .card-cat {
  position: absolute;
  left: 0;
  bottom: 0;
  display: inline-block;
  padding: 5px 10px;
  background: rgba(255,255,255,0.95);
  color: var(--color-brand);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.list-row .card-body {
  min-width: 0;
  padding: 0 !important;
}

.list-row .card-meta {
  display: block;
  margin: 0 0 12px;
  color: var(--color-brand);
  font-size: 0.82rem;
  line-height: 1.4;
}

.list-row .card-title {
  margin: 0 0 12px;
  line-height: 1.3;
}

.list-row .card-excerpt {
  margin: 0 0 14px;
  line-height: 1.6;
}

.list-row .card-readmore {
  display: inline-block;
  margin-top: 2px;
  font-weight: 600;
}

/* Mobile */
@media (max-width: 767px) {
  .list-row {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 30px;
  }

  .list-row .card-media {
    width: 100%;
    height: auto;
    aspect-ratio: 280 / 210;
  }

  .list-row .card-media img {
    width: 100%;
    height: 100%;
  }

  .list-row .card-body {
    width: 100%;
  }

  .list-row .card-title {
    font-size: 1.15rem;
  }
}


/* =========================================================
   ADVENTURE NAT SITE-WIDE FOOTER
   Dark navy editorial treatment — bookends the light page against the
   same dark surface already used by .top-nav-bar, so the site reads as
   one considered design instead of a light page with a pale footer
   strip tacked on.
   ========================================================= */

.site-footer {
  --ftr-ink: var(--color-deep, #0f2a2e);
  --ftr-heading: #ffffff;
  --ftr-text: rgba(238, 245, 243, .68);
  --ftr-text-soft: rgba(238, 245, 243, .62);
  --ftr-border: rgba(238, 245, 243, .14);
  --ftr-accent: #ffa07f;
  --ftr-field-bg: rgba(255, 255, 255, .07);
  --ftr-field-border: rgba(255, 255, 255, .16);

  margin-top: 64px;
  background: var(--ftr-ink);
  color: var(--ftr-text);
  border-top: 3px solid var(--color-brand);
}

.site-footer .container {
  max-width: 1200px;
}

.site-footer-main {
  display: grid;
  grid-template-columns: 1.25fr .75fr .85fr 1.35fr;
  gap: 42px;
  padding: 56px 0 44px;
}

/* Brand */

.footer-brand {
  min-width: 0;
}

.footer-logo {
  display: inline-block;
  margin: 0 0 14px;
  color: var(--ftr-heading);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
}

.footer-description {
  max-width: 310px;
  margin: 0;
  color: var(--ftr-text);
  font-size: .88rem;
  line-height: 1.7;
}

/* Footer navigation */

.footer-links h3,
.footer-newsletter h3 {
  margin: 0 0 17px;
  color: var(--ftr-heading);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
}

.footer-links a {
  display: block;
  width: fit-content;
  margin: 0 0 11px;
  color: var(--ftr-text);
  text-decoration: none;
  font-size: .85rem;
  line-height: 1.5;
  transition: color var(--transition-base);
}

.footer-links a:hover {
  color: var(--ftr-accent);
}

/* Newsletter */

.footer-newsletter {
  min-width: 0;
}

.footer-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--ftr-accent);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.footer-newsletter h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.footer-newsletter > p {
  max-width: 360px;
  margin: 0 0 18px;
  color: var(--ftr-text);
  font-size: .85rem;
  line-height: 1.6;
}

.footer-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.footer-subscribe-form input[type="text"],
.footer-subscribe-form input[type="email"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  box-sizing: border-box;

  background: var(--ftr-field-bg);
  color: #ffffff;

  border: 1px solid var(--ftr-field-border);
  border-radius: var(--radius-sm);

  font: inherit;
  font-size: .84rem;
  outline: none;

  transition:
    border-color var(--transition-base),
    background-color var(--transition-base),
    box-shadow var(--transition-base);
}

.footer-subscribe-form input[type="text"]:focus,
.footer-subscribe-form input[type="email"]:focus {
  background: rgba(255, 255, 255, .1);
  border-color: var(--ftr-accent);
  box-shadow: 0 0 0 3px rgba(255, 160, 127, .18);
}

.footer-subscribe-form input::placeholder {
  color: var(--ftr-text-soft);
}

.footer-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 1px;

  color: var(--ftr-text-soft);
  font-size: .72rem;
  line-height: 1.45;

  cursor: pointer;
}

.footer-consent input {
  margin: 2px 0 0;
  accent-color: var(--color-brand);
  flex-shrink: 0;
}

.footer-subscribe-form button {
  width: 100%;
  min-height: 45px;
  border: none;
  border-radius: var(--radius-sm);

  background: var(--color-accent);
  color: #fff;

  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .09em;

  cursor: pointer;
  box-shadow: 0 6px 18px rgba(200, 69, 44, .35);
  transition:
    background-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.footer-subscribe-form button:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 8px 22px rgba(200, 69, 44, .45);
  transform: translateY(-1px);
}

.footer-subscribe-form button:active {
  transform: translateY(0);
}

.footer-subscribe-form button:disabled {
  opacity: .6;
  cursor: wait;
  transform: none;
}

.footer-subscribe-message {
  min-height: 17px;
  margin: 2px 0 0 !important;
  font-size: .74rem !important;
}

.footer-subscribe-message.success {
  color: #6fd39a;
}

.footer-subscribe-message.error {
  color: var(--ftr-accent);
}

/* Honeypot */

.footer-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Bottom bar */

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 20px 0 24px;

  border-top: 1px solid var(--ftr-border);
}

.site-footer-bottom p {
  margin: 0;
  color: var(--ftr-text-soft);
  font-size: .72rem;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
}

.footer-legal-links a {
  color: var(--ftr-text-soft);
  font-size: .72rem;
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-legal-links a:hover {
  color: var(--ftr-accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tablet */

@media (max-width: 900px) {
  .site-footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px 28px;
    padding: 42px 0 36px;
  }

  .footer-newsletter {
    grid-column: 1 / -1;
    max-width: 520px;
  }
}

/* Mobile */

@media (max-width: 600px) {
  .site-footer {
    margin-top: 48px;
  }

  .site-footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 38px 18px 32px;
  }

  .footer-newsletter {
    grid-column: auto;
    max-width: none;
  }

  .footer-logo {
    font-size: 1.8rem;
  }

  .footer-description {
    max-width: 360px;
  }

  .site-footer-bottom {
    margin: 0 18px;
    padding: 17px 0 21px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .footer-legal-links {
    gap: 10px 16px;
  }
}

/* =========================================================
   POST INTERACTION BAR — Like / Comment / Share
   Renders once under each post's hero image (js/post.js
   initInteractions()/renderInteractionBar()). Comments and shares open
   in modals defined further below.
   ========================================================= */

.post-interaction-bar {
  margin: -8px 0 28px;
}

.post-interaction-bar-inner {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt, #fbfaf6);
  overflow: hidden;
}

.post-interact-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  border: none;
  border-right: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.post-interact-btn:last-child {
  border-right: none;
}

.post-interact-btn:hover {
  background: rgba(14, 111, 104, 0.05);
  color: var(--color-brand);
}

.post-interact-icon {
  display: inline-flex;
  line-height: 0;
}

.post-interact-count {
  min-width: 1ch;
}

.post-like-btn.is-liked {
  color: var(--color-brand);
}

.post-like-btn.is-liked .post-interact-icon {
  animation: hsl-like-pop 0.28s ease;
}

@keyframes hsl-like-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@media (max-width: 420px) {
  .post-interact-label {
    display: none;
  }
}

/* =========================================================
   COMMENT & SHARE MODALS
   ========================================================= */

body.modal-open {
  overflow: hidden !important;
}

.hsl-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 42, 46, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hsl-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.hsl-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: min(640px, 88vh);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 50px rgba(15, 42, 46, 0.25);
  transform: scale(0.94) translateY(8px);
  transition: transform 0.25s ease;
}

.hsl-modal-overlay.open .hsl-modal {
  transform: scale(1) translateY(0);
}

.hsl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
  flex: 0 0 auto;
}

.hsl-modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hsl-modal-count {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.hsl-modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-light);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.hsl-modal-close:hover {
  background: var(--color-brand);
  color: #fff;
}

.hsl-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
}

/* ---- Comment modal specifics ---- */

.hsl-comment-list-heading {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 18px 0 10px;
}

.hsl-comment-empty {
  text-align: center;
  padding: 28px 12px 12px;
  color: var(--color-text-muted);
}

.hsl-comment-empty-icon {
  display: inline-flex;
  color: var(--color-placeholder-strong);
  margin-bottom: 10px;
}

.hsl-comment-empty p {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-heading);
}

.hsl-comment-empty span {
  font-size: 0.86rem;
}

/* ---- Share modal specifics ---- */

.hsl-share-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.hsl-share-url-input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-light);
  color: var(--color-text-dark);
  font-size: 0.82rem;
  font-family: var(--font-sans);
}

.hsl-share-copy-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-brand);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.hsl-share-copy-btn:hover {
  background: var(--color-brand-hover);
}

.hsl-share-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hsl-share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-light);
  color: var(--color-text-dark);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.hsl-share-option:hover {
  border-color: var(--color-brand);
  transform: translateY(-1px);
}

.hsl-share-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
}

.hsl-share-fb { background: #1877f2; }
.hsl-share-ig { background: radial-gradient(circle at 30% 110%, #fdf497, #fd5949 45%, #d6249f 70%, #285AEB 100%); }
.hsl-share-pin { background: #e60023; }
.hsl-share-pin svg { width: 18px; height: 18px; }
.hsl-share-wa { background: #25d366; }
.hsl-share-x { background: #000; }
.hsl-share-copy { background: var(--color-text-muted); }

/* ---- Mobile: bottom-sheet modals instead of a centered card ---- */

@media (max-width: 560px) {
  .hsl-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .hsl-modal {
    max-width: 100%;
    width: 100%;
    max-height: 86vh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: none;
    transform: translateY(100%);
  }

  .hsl-modal-overlay.open .hsl-modal {
    transform: translateY(0);
  }

  .hsl-share-options {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Toast ---- */

.hsl-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--color-deep, #0f2a2e);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 10050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hsl-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Compose form */

.comment-compose-form {
  margin-bottom: 16px;
}

.comment-form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text-dark);
  font: inherit;
  font-size: 0.86rem;
  box-sizing: border-box;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.comment-input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(14, 111, 104, .08);
}

.comment-textarea {
  resize: vertical;
  min-height: 44px;
  max-height: 220px;
  line-height: 1.5;
}

.comment-form-row-text {
  align-items: flex-end;
}

.comment-photo-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base);
}

.comment-photo-btn:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.comment-post-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-brand);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.comment-post-btn:hover {
  background: var(--color-brand-hover);
}

.comment-post-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.comment-photo-preview,
.comment-form-avatar-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

.comment-photo-preview img,
.comment-form-avatar-preview img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.comment-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.comment-form-status {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--color-brand);
  min-height: 1em;
}

.comment-form-note {
  margin: 2px 0 6px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #62747a;
}

.comment-form-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #55676b;
}

.comment-form-identity strong {
  color: var(--color-text, #2a3a3d);
}

.comment-form-identity-change {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  color: var(--color-brand);
  text-decoration: underline;
  cursor: pointer;
}

/* Comment list */

.comment-list {
  display: flex;
  flex-direction: column;
}

.comment-item {
  padding: 14px 0;
  border-top: 1px solid var(--color-divider, #f1e3e1);
}

.comment-item:first-child {
  border-top: none;
  padding-top: 0;
}

.comment-item-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.comment-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-placeholder);
}

.comment-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--color-brand);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.9rem;
}

.comment-item-body {
  flex: 1;
  min-width: 0;
}

.comment-item-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}

.comment-item-menu {
  margin-left: auto;
  position: relative;
}

.comment-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  border-radius: 50%;
  color: var(--color-text-soft);
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.comment-menu-btn:hover {
  background: var(--color-bg-light);
  color: var(--color-brand);
}

.comment-menu-popover {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 5;
  min-width: 168px;
  margin-top: 4px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 24px rgba(15, 42, 46, 0.12);
}

.comment-menu-copy-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.comment-menu-copy-link:hover {
  background: var(--color-bg-light);
}

.comment-item-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--color-text-heading);
}

.comment-item-time {
  font-size: 0.74rem;
  color: var(--color-text-soft);
}

.comment-item-text {
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-text-dark);
  word-break: break-word;
}

.comment-item-photo {
  display: block;
  max-width: 220px;
  max-height: 220px;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-top: 8px;
  object-fit: cover;
}

.comment-item-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.comment-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 2px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-base);
}

.comment-like-btn:hover,
.comment-like-btn.is-liked {
  color: var(--color-brand);
}

.comment-like-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.comment-reply-toggle {
  border: none;
  background: none;
  padding: 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color var(--transition-base);
}

.comment-reply-toggle:hover {
  color: var(--color-brand);
}

.comment-reply-form-wrap {
  margin-top: 12px;
}

.comment-replies {
  margin-top: 8px;
}

@media (max-width: 600px) {
  .comment-form-row {
    flex-direction: column;
  }

  .comment-form-row-text {
    flex-wrap: wrap;
  }

  .comment-textarea {
    width: 100%;
  }
}


/* ---- Article tables (DOCX import) ----
   Tables imported from Word keep their exact rows/columns and render as
   HTML blocks wrapped in .article-table-wrap, which scrolls sideways on
   narrow screens instead of squeezing or overflowing the page. */
.article-content .article-table-wrap {
  margin: 28px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: 0 6px 20px rgba(15, 42, 46, 0.06);
}

.article-content .article-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-dark);
}

.article-content .article-table th,
.article-content .article-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.article-content .article-table th:last-child,
.article-content .article-table td:last-child {
  border-right: none;
}

.article-content .article-table tbody tr:last-child td {
  border-bottom: none;
}

.article-content .article-table thead th {
  background: var(--color-brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-color: rgba(255, 255, 255, 0.18);
}

.article-content .article-table tbody tr:nth-child(even) td {
  background: var(--color-surface-alt);
}

.article-content .article-table tbody tr:hover td {
  background: var(--color-accent-soft);
}

.article-content .article-table strong {
  color: var(--color-text-heading);
}

.article-content .article-table a {
  color: var(--color-brand);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .article-content .article-table {
    font-size: 0.88rem;
  }

  .article-content .article-table th,
  .article-content .article-table td {
    padding: 10px 12px;
  }
}


/* =========================================================
   MOBILE COMPATIBILITY
   Phone-width fixes across the public site. post.html keeps several
   inline styles (the server-side renderer matches on them), so a few
   rules below need !important to override those on small screens.
   ========================================================= */

/* Safety net: nothing may widen the page past the screen. `clip`, not
   `hidden`, so position:sticky elements keep working. */
html,
body {
  overflow-x: clip;
}

/* Article body: long words/links wrap instead of overflowing, embedded
   media never exceeds the column, headings get a readable line height. */
.article-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  line-height: 1.3;
  color: var(--color-text-heading);
}

.article-content img,
.article-content video,
.article-content iframe,
.article-content embed,
.article-content object {
  max-width: 100%;
}

.article-content img,
.article-content video {
  height: auto;
}

/* "On Top" AdSense unit under the site header (top_ad_html() in
   app/helpers.php). An unfilled slot takes no space at all. */
.top-page-ad {
  margin-top: 16px;
  margin-bottom: 16px;
  text-align: center;
  overflow: hidden;
}

.top-page-ad:has(ins[data-ad-status="unfilled"]) {
  display: none;
}

/* In-feed AdSense units between post cards (insertInFeedAds() in
   js/main.js). Each gets a small "Advertisement" label so it never passes
   for a story, spans the whole row in the homepage grids, and takes no
   space at all when AdSense has nothing to fill it with. */
.in-feed-ad {
  width: 100%;
  margin-bottom: 34px;
  overflow: hidden;
}

.in-feed-ad .ad-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.three-col-grid .in-feed-ad-row {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.in-feed-ad-section {
  margin-bottom: 40px;
}

.in-feed-ad:has(ins[data-ad-status="unfilled"]) {
  display: none;
}

@media (max-width: 767px) {
  .in-feed-ad {
    margin-bottom: 30px;
  }
}

/* In-article AdSense unit (js/post.js): its own full-width row between
   blocks, so text and images never wrap around it. An unfilled slot takes
   no space at all. */
.article-content .article-ad {
  clear: both;
  width: 100%;
  margin: 32px 0;
  overflow: hidden;
  text-align: center;
}

.article-content .article-ad:has(ins[data-ad-status="unfilled"]) {
  display: none;
}

.article-content pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* Modals: dynamic viewport height so the phone browser's address/tool
   bars never hide the bottom of a sheet, and 100% instead of 100vw so a
   desktop scrollbar can't make the overlay wider than the page. */
.hsl-modal-overlay,
.subscribe-modal-overlay {
  width: 100%;
  height: 100dvh;
}

@media (max-width: 768px) {
  /* Text inputs under 16px make iPhone Safari zoom the whole page in on
     focus (and it stays zoomed afterwards) -- the most common "site is
     broken on my phone" symptom. */
  input[type="text"],
  input[type="email"],
  input[type="search"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }

  /* The live-search dropdown was a fixed 340px anchored to the search
     box's right edge, which ran off the left side of narrow phones. */
  .search-dropdown {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(340px, calc(100vw - 24px));
  }

}

@media (max-width: 600px) {
  .container {
    padding: 0 14px;
  }

  .brand-logo {
    font-size: 2rem;
  }

  /* Breadcrumb wraps, and a long article title shortens to one line
     instead of stretching the row. */
  .breadcrumb-trail {
    display: flex;
    flex-wrap: wrap;
    row-gap: 4px;
    margin-top: 16px;
  }

  .breadcrumb-trail .current {
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Article page */
  .article-card {
    padding: 18px 16px !important;
    margin-bottom: 24px !important;
  }

  .article-title {
    font-size: 1.6rem !important;
    line-height: 1.25;
  }

  .article-content {
    font-size: 1rem !important;
    line-height: 1.75 !important;
  }

  .article-content h1 {
    font-size: 1.45rem;
  }

  .article-content h2 {
    font-size: 1.3rem;
    margin: 1.6em 0 0.6em;
  }

  .article-content h3 {
    font-size: 1.12rem;
  }

  .related-posts-block {
    padding: 18px 16px;
  }

  .related-posts-block .widget-thumb-wrapper {
    width: 72px;
    height: 72px;
  }

  /* Home hero: the tilted photo poked past the card edge on phones and
     widened the page. */
  .hero-promo-card {
    padding: 20px 18px;
  }

  .promo-text-content h1 {
    font-size: 1.5rem;
  }

  .promo-img-placeholder {
    transform: none;
  }

  .text-card-item {
    padding: 24px 18px;
  }

  .blog-subscribe-section {
    padding: 32px 0;
  }

  .blog-subscribe-section .subscribe-copy h2 {
    font-size: 1.5rem;
  }

  .hsl-modal {
    max-height: 86dvh;
  }
}
