/* =========================================
   Engagement Features: Wishlist + Compare + Related
   ========================================= */

/* ---- Wishlist heart button ---- */
.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  backdrop-filter: blur(8px);
}
.wishlist-btn:hover { transform: scale(1.1); }
.wishlist-btn:not(.saved):hover { background: #fff; }

/* Heart shape via CSS mask — lets CSS gradient show through the heart silhouette */
.wishlist-btn::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background 0.2s;
}

/* Unsaved: dark outline heart on white background */
.wishlist-btn:not(.saved)::after {
  background: rgba(80,20,20,0.75);
  -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/></svg>");
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/></svg>");
}

/* Saved: dark maroon circle with white filled heart */
.wishlist-btn.saved {
  background: linear-gradient(135deg, #6B1212 0%, #A01E1E 100%);
  box-shadow: 0 2px 10px rgba(107,18,18,0.5);
}
.wishlist-btn.saved:hover { background: linear-gradient(135deg, #7D1515 0%, #B52222 100%); }
.wishlist-btn.saved::after {
  background: #fff;
  -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/></svg>");
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/></svg>");
}

/* Footer heart — hidden on desktop, shown on mobile */
.card-footer-heart {
  display: none;
}

/* ---- Compare button (card footer, always visible bottom-right) ---- */
.compare-btn {
  background: rgba(3,105,161,0.08);
  border: 1px solid rgba(3,105,161,0.2);
  border-radius: 20px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary, #0e8585);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.compare-btn.selected {
  background: rgba(59,130,246,0.85);
  border-color: #3b82f6;
  color: #fff;
}
.compare-btn:hover { background: rgba(59,130,246,0.6); color: #fff; }
.compare-btn .cb-icon { font-size: 0.8rem; vertical-align: middle; line-height: 1; }
.compare-btn .cb-label { vertical-align: middle; }

/* ---- Floating compare bar ---- */
.compare-bar {
  position: fixed;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: #1e293b;
  border-radius: 16px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: bottom 0.35s cubic-bezier(0.34,1.56,0.64,1);
  min-width: 340px;
  max-width: 600px;
}
.compare-bar.visible { bottom: 24px; }
.compare-bar-slots { display: flex; gap: 10px; flex: 1; }
.compare-slot {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 100px;
}
.compare-slot.filled { color: #fff; background: rgba(59,130,246,0.25); }
.compare-slot-remove {
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.75rem;
  margin-left: auto;
}
.compare-slot-remove:hover { color: #f87171; }
.compare-bar-actions { display: flex; gap: 8px; }
.compare-now-btn {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.compare-now-btn:hover { background: #2563eb; }
.compare-now-btn:disabled { background: #475569; cursor: not-allowed; }
.compare-clear-btn {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.2s;
}
.compare-clear-btn:hover { color: #f87171; border-color: #f87171; }

/* ---- Compare modal ----
   Scroll architecture (important — changing this breaks mobile):
   The three-layer overflow setup is intentional:
     .compare-modal           → overflow: hidden  (clips border-radius, NOT for scroll)
     .compare-modal-body      → overflow-y: auto  (vertical scroll for tall tables)
     .compare-table-wrap      → overflow-x: auto  (horizontal scroll on narrow screens)
   These MUST be on separate elements. If you set overflow-y: auto on the same
   element that has overflow-x: auto, CSS will implicitly set overflow-x: hidden,
   killing horizontal scroll. Keep them split.

   The sticky label column (.compare-label-col) requires that its parent has
   overflow-x: auto (not hidden) — it only works inside .compare-table-wrap.
*/
.compare-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.compare-overlay.open { opacity: 1; pointer-events: all; }
.compare-modal {
  background: #fff;
  border-radius: 20px;
  overflow: hidden; /* only for border-radius clip — NOT for scroll, see above */
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.compare-modal-body {
  overflow-y: auto;  /* vertical scroll for the table body */
  overflow-x: hidden;
  flex: 1;
}
.compare-table-wrap {
  overflow-x: auto;              /* horizontal scroll for wide tables on mobile */
  -webkit-overflow-scrolling: touch; /* smooth momentum scroll on iOS */
}
.compare-modal-header {
  background: #1e293b;
  color: #fff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.compare-modal-header h2 { margin: 0; font-size: 1.2rem; }
.compare-close {
  background: none; border: none; color: #fff;
  font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th {
  background: #f8fafc;
  padding: 16px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  min-width: 160px;
}
.compare-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
  color: #1e293b;
  vertical-align: top;
  min-width: 160px;
}
/* Sticky first column — stays visible while the user scrolls the table right.
   Requires an explicit background to cover the scrolled content behind it.
   !important needed to override .compare-table th/td rules which set min-width. */
.compare-label-col {
  position: sticky !important;
  left: 0;
  background: #f8fafc !important;
  z-index: 2;
  min-width: 90px !important;
  max-width: 90px !important;
  width: 90px !important;
  font-weight: 600;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  white-space: nowrap;
  box-shadow: 2px 0 6px rgba(0,0,0,0.06);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-dest-header {
  text-align: center;
  padding: 20px 16px !important;
}
.compare-dest-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}
.compare-dest-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.compare-dest-country { color: #64748b; font-size: 0.82rem; }
.compare-rating-big {
  font-size: 1.4rem;
  font-weight: 800;
  color: #f59e0b;
}
.compare-tag {
  display: inline-block;
  background: #eff6ff;
  color: #3b82f6;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.78rem;
  margin: 2px;
}

/* ---- Compare mobile card layout ---- */
.cmp-cards {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 20px 16px 28px;
  scrollbar-width: none;
}
.cmp-cards::-webkit-scrollbar { display: none; }
.cmp-card {
  flex: 0 0 calc(80vw);
  max-width: 300px;
  scroll-snap-align: center;
  background: #f8fafc;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-right: 12px;
  flex-shrink: 0;
}
.cmp-card:last-child { margin-right: 0; }
.cmp-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.cmp-card-name {
  font-weight: 800;
  font-size: 1rem;
  color: #0f172a;
  padding: 12px 14px 2px;
}
.cmp-card-country {
  font-size: 0.78rem;
  color: #64748b;
  padding: 0 14px 10px;
}
.cmp-stats {
  border-top: 1px solid #e2e8f0;
}
.cmp-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
  gap: 8px;
}
.cmp-stat-row:last-child { border-bottom: none; }
.cmp-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  flex-shrink: 0;
  padding-top: 2px;
}
.cmp-stat-val {
  font-size: 0.82rem;
  color: #1e293b;
  font-weight: 500;
  text-align: right;
  flex-wrap: wrap;
  display: flex;
  gap: 3px;
  justify-content: flex-end;
}
.cmp-rating {
  font-size: 1rem;
  font-weight: 800;
  color: #f59e0b;
}

/* ---- Wishlist nav indicator ---- */
.wishlist-nav-link {
  position: relative;
  background: rgba(239,68,68,0.18) !important;
  border: 1.5px solid rgba(239,68,68,0.55) !important;
  color: #fca5a5 !important;
  border-radius: 50px !important;
  padding: 6px 14px !important;
  font-weight: 600 !important;
  transition: background 0.2s, color 0.2s !important;
}
.wishlist-nav-link:hover {
  background: rgba(239,68,68,0.35) !important;
  color: #fff !important;
}
.wishlist-nav-link::after { display: none !important; }
.wishlist-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 0.6rem;
  font-weight: 700;
  margin-left: 5px;
  vertical-align: middle;
  display: none;
}
.wishlist-count.visible { display: inline-flex; }

/* ---- Detail page wishlist button ---- */
.detail-wishlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
  border-radius: 50px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  margin-top: 16px;
}
.detail-wishlist-btn:hover { background: rgba(255,255,255,0.25); }
.detail-wishlist-btn.saved { background: linear-gradient(135deg, #6B1212, #A01E1E); border-color: transparent; }

/* ---- Related destinations ---- */
.related-section {
  padding: 48px 0;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.related-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.related-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.related-section h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}
.related-see-all {
  font-size: 0.82rem; font-weight: 700;
  color: #0e8585; text-decoration: none;
  white-space: nowrap;
}
.related-see-all:hover { text-decoration: underline; }

/* ── Related blog posts ── */
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.related-post-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  text-decoration: none; color: inherit; display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.related-post-img { width: 100%; height: 130px; object-fit: cover; }
.related-post-body { padding: 14px; }
.related-post-cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #0e8585; margin-bottom: 6px; }
.related-post-title { font-size: 0.9rem; font-weight: 700; color: #0f172a; line-height: 1.4; margin-bottom: 6px; }
.related-post-meta { font-size: 0.75rem; color: #94a3b8; }

/* ── Planning tools strip on detail pages ── */
.detail-tools-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px;
}
.detail-tools-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 18px 20px; text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}
.detail-tools-card:hover { border-color: #0e8585; transform: translateY(-2px); }
.detail-tools-icon { font-size: 1.8rem; flex-shrink: 0; }
.detail-tools-title { font-weight: 700; font-size: 0.9rem; color: #0f172a; margin-bottom: 3px; }
.detail-tools-sub { font-size: 0.75rem; color: #64748b; }
.detail-tools-arrow { margin-left: auto; font-size: 1.1rem; color: #0e8585; flex-shrink: 0; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.related-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.related-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.related-card-body { padding: 14px; }
.related-card-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; color: #0f172a; }
.related-card-meta { color: #374151; font-size: 0.8rem; margin-bottom: 6px; }
.related-card-rating { color: #f59e0b; font-weight: 700; font-size: 0.85rem; }

/* ---- Wishlist page ---- */
.wishlist-page { min-height: 70vh; padding: 48px 24px; max-width: 1200px; margin: 0 auto; }
.wishlist-hero {
  text-align: center;
  padding: 48px 24px 32px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  margin-bottom: 40px;
  border-radius: 20px;
}
.wishlist-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.wishlist-hero p { color: #94a3b8; }
.wishlist-empty {
  text-align: center;
  padding: 64px 24px;
  color: #64748b;
}
.wishlist-empty .empty-icon { font-size: 4rem; margin-bottom: 16px; }
.wishlist-empty h2 { color: #1e293b; margin-bottom: 8px; }
.wishlist-empty a {
  display: inline-block;
  margin-top: 20px;
  background: #3b82f6;
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
}

/* ---- Share buttons (detail pages) ---- */
.detail-share {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.share-btn-x      { background: #0f172a; color: #fff; }
.share-btn-fb     { background: #1877f2; color: #fff; }
.share-btn-wa     { background: #25d366; color: #fff; }
.share-btn-reddit { background: #ff4500; color: #fff; }
.share-btn-pin    { background: #e60023; color: #fff; }
.share-btn-copy   { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); }

/* ---- Tool links on detail pages ---- */
.detail-tool-links {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px;
}
.detail-tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 50px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s; white-space: nowrap;
}
.detail-tool-btn:hover {
  background: rgba(14,133,133,0.3); border-color: var(--primary); color: #fff;
}

/* ---- Reviews ---- */
.rv-section {
  display: none;
  background: var(--dark);
  border-top: 1px solid var(--border);
}
.rv-section.rv-ready { display: block; }

.rv-section-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}

/* Hero row */
.rv-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.rv-hero-left { flex: 1; min-width: 220px; }
.rv-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.rv-section-title {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
}
.rv-score-row { display: flex; align-items: center; gap: 14px; }
.rv-avg-big {
  font-size: 3rem;
  font-weight: 900;
  color: #f59e0b;
  line-height: 1;
}
.rv-avg-stars { display: flex; gap: 3px; margin-bottom: 4px; }
.rv-star { font-size: 1rem; color: rgba(255,255,255,0.15); }
.rv-star.filled { color: #f59e0b; }
.rv-count { font-size: 0.8rem; color: var(--text-muted); }
.rv-no-score { font-size: 0.88rem; color: var(--text-muted); font-style: italic; }

.rv-hero-right { flex-shrink: 0; }
.rv-write-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14,133,133,0.1);
  border: 1px solid rgba(14,133,133,0.25);
  border-radius: 12px;
  padding: 14px 18px;
}
.rv-write-icon { font-size: 1.4rem; }
.rv-write-text { font-size: 0.85rem; color: var(--primary); font-weight: 500; max-width: 180px; line-height: 1.4; }

/* Form */
.rv-form-wrap {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 40px;
}
.rv-form-top {
  background: var(--surface2);
  padding: 28px 28px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.rv-star-prompt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 500;
}
.rv-star-picker-big {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  cursor: pointer;
}
.rv-star-input {
  font-size: 2.4rem;
  color: rgba(0,0,0,0.15);
  transition: color 0.1s, transform 0.15s;
  line-height: 1;
  user-select: none;
}
.rv-star-input.hover, .rv-star-input.selected { color: #f59e0b; }
.rv-star-input:hover { transform: scale(1.2); }
.rv-star-label-big {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
  min-height: 20px;
  transition: color 0.2s;
}
@keyframes rv-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.rv-shake { animation: rv-shake 0.4s ease; }

.rv-form { padding: 20px 28px 24px; }
.rv-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.rv-input {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  background: var(--dark);
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s;
}
.rv-input:focus { outline: none; border-color: var(--primary); }
.rv-input option { background: var(--dark); color: var(--text); }
.rv-select { cursor: pointer; }
.rv-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  background: var(--dark);
  color: var(--text);
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.rv-textarea::placeholder { color: var(--text-muted); }
.rv-textarea:focus { outline: none; border-color: var(--primary); }
.rv-textarea.rv-error { border-color: #ef4444; }
.rv-submit {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.rv-submit:hover { opacity: 0.9; transform: translateY(-1px); }

/* Cards */
.rv-list { display: flex; flex-direction: column; gap: 14px; }
.rv-empty-state { text-align: center; padding: 40px 24px; }
.rv-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.rv-empty-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.rv-empty-sub { font-size: 0.88rem; color: var(--text-muted); }

.rv-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  transition: border-color 0.2s;
}
.rv-card:hover { border-color: var(--primary); }
.rv-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.rv-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0a6e6e);
  color: #fff; font-weight: 800; font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rv-card-meta { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.rv-name { font-size: 0.92rem; font-weight: 700; color: var(--text); }
.rv-trip-badge {
  display: inline-block;
  font-size: 0.7rem;
  background: rgba(0,0,0,0.05);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 50px;
  width: fit-content;
}
.rv-card-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rv-card-stars { display: flex; gap: 2px; }
.rv-date { font-size: 0.72rem; color: #6e7681; }
.rv-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-style: italic;
  border-left: 3px solid rgba(14,133,133,0.4);
  padding-left: 14px;
  margin: 0;
}

@media (max-width: 600px) {
  .rv-hero-row { flex-direction: column; }
  .rv-hero-right { width: 100%; }
  .rv-write-prompt { justify-content: center; }
  .rv-form-row { grid-template-columns: 1fr; }
  .rv-form-wrap { border-radius: 14px; }

  /* ---- Related sections ---- */
  .related-section { padding: 32px 0; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .related-posts-grid { grid-template-columns: 1fr; }
  .related-header { flex-direction: column; align-items: flex-start; gap: 4px; }

  /* ---- Detail tool links strip ---- */
  .detail-tools-strip { grid-template-columns: 1fr; }
  .detail-tool-links { flex-direction: column; }
  .detail-tool-btn { justify-content: center; }

  /* ---- Trip cost & best-time origin tiles ---- */
  .origin-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* ---- Compare bar — compact single row ---- */
  .compare-bar {
    min-width: calc(100vw - 32px);
    padding: 10px 14px;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    bottom: -100px;
  }
  .compare-bar.visible { bottom: calc(64px + 10px); }
  .compare-bar-slots {
    flex-wrap: nowrap;
    flex: 1;
    overflow: hidden;
    gap: 6px;
  }
  /* Hide empty placeholder slots on mobile — only show filled ones */
  .compare-slot:not(.filled) { display: none; }
  .compare-slot.filled {
    min-width: unset;
    padding: 5px 10px;
    font-size: 0.75rem;
    flex-shrink: 1;
    overflow: hidden;
    max-width: 130px;
  }
  .compare-slot.filled span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .compare-bar-actions { flex-shrink: 0; gap: 6px; }
  .compare-now-btn { padding: 8px 14px; font-size: 0.8rem; }
  .compare-clear-btn { padding: 8px 10px; font-size: 0.8rem; }

  /* ---- Compare modal — bottom sheet ---- */
  .compare-overlay { padding: 0; align-items: flex-end; }
  .compare-modal {
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    max-width: 100%;
  }
  .compare-modal-header { padding: 16px 20px; border-radius: 20px 20px 0 0; }
  .compare-modal-header h2 { font-size: 1rem; }
  .compare-dest-img { height: 90px; }
  .compare-dest-name { font-size: 0.88rem; }
  .compare-table th, .compare-table td { padding: 12px; font-size: 0.82rem; min-width: 140px; }

  /* ---- Related ---- */
  .related-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  /* ---- Share buttons — icon-only circles on mobile ---- */
  .detail-share { gap: 8px; flex-wrap: nowrap; }
  .share-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
  }
  .share-btn .sb-label { display: none; }
  .share-btn .sb-icon { font-size: 0.85rem; font-style: normal; }
}
