/* ==========================================================================
   magic soul travel — static site
   Dark theme, smooth UX, travel blogger vibe
   ========================================================================== */

:root {
  --bg: #0d1117;
  --bg-elev: rgba(22, 27, 34, 0.65);
  --panel: rgba(26, 26, 26, 0.65);
  --panel-solid: rgba(26, 26, 26, 0.75);
  --header-footer-bg: rgba(13, 17, 23, 0.92);
  --border: #2d333b;
  --border-light: #333;
  --text: #e6edf3;
  --text-dim: #9da7b3;
  --accent: #00ffff;
  --accent-2: #87ceeb;
  --accent-3: #ff00ff;
  --link: #87ceeb;
  --link-hover: #00bfff;
  --danger: #e74c3c;
  --success: #27ae60;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

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

/* ---------- Layout ---------- */

.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-footer-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
}

/* Floating home favicon — always visible in the top-left corner */
.favicon-link {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 4000;
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.favicon-link:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.favicon-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.logo-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

.logo-link:hover {
  text-decoration: underline;
}

.logo-link:hover h1 {
  filter: brightness(1.2);
}

.logo span {
  color: var(--accent);
}

/* ---------- Navigation ---------- */

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.main-nav a.active {
  color: var(--accent);
  background: rgba(0, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.98);
    flex-direction: column;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--border);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
  }
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 48px 16px 40px;
  position: relative;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  letter-spacing: 1px;
  margin-bottom: 8px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  color: var(--text-dim);
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 2;
}

.hero .tagline-langs {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 12px;
  letter-spacing: 0.3px;
}

/* ---------- Sections / Panels ---------- */

.section {
  background: var(--panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
}

.section h2 {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  text-transform: lowercase;
}

.trip-count {
  color: var(--accent);
  font-weight: 600;
}

.trip-count:hover {
  color: var(--link-hover);
}

.section h3 {
  color: var(--text);
  margin: 12px 0 8px;
}

.section p {
  margin-bottom: 10px;
}

.section .hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.sections-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-cta {
  margin-top: 16px;
  text-align: right;
}

.section-contact {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-hint {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.contact-email {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- Card grid ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

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

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  border-color: var(--accent);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 140px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--text);
  text-transform: lowercase;
}

.card-body h3 a {
  text-transform: lowercase;
}

.card-body .card-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--text-dim);
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 8px;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: lowercase;
  letter-spacing: 0.3px;
}

.btn:hover {
  background: rgba(0, 255, 255, 0.2);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
}

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

.btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Carousel ---------- */

.carousel-container {
  position: relative;
  max-width: 920px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 0 50px;
  background: var(--panel-solid);
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  flex-wrap: nowrap;
  width: 100%;
}

.carousel-group {
  min-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px 0;
  align-items: start;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  font-size: 1.5em;
  border-radius: 5px;
  opacity: 0.8;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.carousel-control:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.8);
}

.carousel-control.prev-btn {
  left: 8px;
}

.carousel-control.next-btn {
  right: 8px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* Trip carousel - compact minimal navigation */
.trip-carousel-container {
  position: relative;
  padding: 0 !important;
}

.trip-carousel-container .carousel-control {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  font-size: 1.2em;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.trip-carousel-container .carousel-control:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.trip-carousel-container .carousel-dots {
  padding: 8px 0;
  gap: 6px;
}

.trip-carousel-container .carousel-dot {
  width: 8px;
  height: 8px;
  transition: all 0.2s ease;
}

.trip-carousel-container .carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}


/* ---------- Trip / map cards ---------- */

.trip-card {
  background: var(--panel-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.trip-card h3 a {
  color: var(--accent-2);
}

.trip-card h3 a:hover {
  color: var(--accent);
}

.trip-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 6px 0;
}

.gpx-map {
  width: 100%;
  height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 10px;
  background: #1e2329;
}

.gpx-description {
  font-size: 0.92rem;
  color: var(--text-dim);
  margin-top: 8px;
}

.trip-epic {
  font-size: 0.9rem;
  color: var(--text);
  margin-top: 10px;
  white-space: pre-wrap;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

/* ---------- Blog posts ---------- */

.post-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: relative;
}

.post-item:last-child {
  border-bottom: none;
}

.post-item .post-date {
  position: absolute;
  top: 24px;
  right: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.post-item h2 {
  font-size: 1.3rem;
  color: var(--text);
  padding-right: 140px;
  margin-bottom: 12px;
}

.post-summary {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.post-full {
  display: none;
  white-space: pre-wrap;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.post-item.expanded .post-summary {
  display: none;
}

.post-item.expanded .post-full {
  display: block;
}

.read-more-toggle {
  display: none;
  color: var(--accent-2);
  font-size: 0.9rem;
  margin-top: 8px;
  cursor: pointer;
}

.read-more-toggle:hover {
  color: var(--accent);
}

.post-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 0.9rem;
}

.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left;
}

.post-content th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-2);
}

.post-content h3 {
  margin-top: 16px;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--accent);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  color: var(--text-dim);
  margin-top: 14px;
  font-size: 0.9rem;
  text-align: center;
  max-width: 800px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

/* ---------- Calendar / Holiday planner ---------- */

.planner-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.planner-toolbar select,
.planner-toolbar input[type="color"] {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.planner-stat {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-left: 8px;
}

.color-btns {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.color-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid #000;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}

.color-btn:hover {
  transform: scale(1.15);
}

.color-btn.selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent);
}

.planner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.calendar-month {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 0.78rem;
}

.calendar-month h3 {
  color: var(--accent);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 6px;
}

.calendar-month table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar-month th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.7rem;
  padding: 2px;
}

.calendar-month th.weekend {
  color: var(--accent);
}

.calendar-month td {
  text-align: center;
  padding: 4px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  color: var(--text);
}

.calendar-month td.weekend {
  color: var(--accent);
}

.calendar-month td:hover {
  background: rgba(255, 255, 255, 0.08);
}

.calendar-month td.highlighted {
  border: 1px solid var(--border-light);
  font-weight: 600;
}

.calendar-month td.empty {
  cursor: default;
}

.calendar-month td.empty:hover {
  background: none;
}

/* ---------- Video cards ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.video-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.video-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
  background: #000;
}

.video-item .video-title {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Thumbnail-based video grid for related videos on trip pages */
.video-grid-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.video-thumb-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s;
}

.video-thumb-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.video-thumb-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.video-thumb-item p {
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0;
}

/* ---------- Flags banner ---------- */

.flags-banner {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  height: 44px;
  line-height: 44px;
  position: relative;
  background: rgba(26, 26, 26, 0.9);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.flags-banner-content {
  font-size: 1.4em;
  display: inline-block;
  position: absolute;
  top: 0;
  left: 0;
  padding: 0 10px;
}

.flags-banner-content a {
  margin: 0 2px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.flags-banner-content a:hover {
  transform: scale(1.3);
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 32px 16px 40px;
  background: var(--header-footer-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.site-footer .hashtags {
  max-width: 900px;
  margin: 0 auto 16px;
  line-height: 1.9;
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* ---------- Toasts ---------- */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--panel-solid);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 0.9rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast.error {
  border-color: var(--danger);
}

.toast.success {
  border-color: var(--success);
}

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

/* ---------- 404 ---------- */

.error-page {
  text-align: center;
  padding: 120px 20px;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.error-page p {
  color: var(--text-dim);
  margin-bottom: 24px;
}

/* ---------- Utilities ---------- */

.text-dim {
  color: var(--text-dim);
}

.text-accent {
  color: var(--accent);
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }

.fade-in {
  animation: fadeIn 0.5s ease;
}

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

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
}

.loading::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Leaflet maps (dark theme) ---------- */

.leaflet-container {
  background: #1e2329;
}

.leaflet-control-zoom a,
.leaflet-control-layers-toggle,
.leaflet-control-attribution {
  background: var(--panel-solid) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow);
}

.leaflet-control-zoom a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--text) !important;
}

.leaflet-control-layers {
  box-shadow: var(--shadow);
  border-radius: 8px !important;
}

.leaflet-control-layers-toggle {
  background: var(--panel-solid) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-light) !important;
}

.leaflet-control-layers .leaflet-control-layers-list {
  background: var(--panel-solid) !important;
  color: var(--text) !important;
}

.leaflet-control-layers .leaflet-control-layers-list label {
  color: var(--text) !important;
  background: var(--panel-solid) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 4px;
  display: block;
}

.leaflet-control-layers .leaflet-control-layers-list input[type="radio"] {
  accent-color: var(--accent);
}

.leaflet-control-attribution {
  background: rgba(26, 26, 26, 0.8) !important;
  color: var(--text-dim) !important;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.leaflet-popup-content-wrapper {
  background: var(--panel-solid);
  color: var(--text);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.leaflet-popup-tip {
  background: var(--panel-solid);
}

.leaflet-popup-content {
  color: var(--text);
}

.leaflet-popup-content p {
  margin: 0;
}

.leaflet-popup-close-button {
  color: var(--text);
}

  .leaflet-bar {
  box-shadow: var(--shadow);
}

/* ---------- Background slideshow ---------- */

#bg-slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-color: var(--bg);
  overflow: hidden;
  pointer-events: none;
}

.bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.bg-layer.active {
  opacity: 1;
}

/* Background navigation arrows (outside content column) */
.bg-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.3s ease, background 0.3s ease, transform 0.2s ease;
  pointer-events: auto;
}

.bg-nav:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.bg-nav-prev {
  left: 20px;
}

.bg-nav-next {
  right: 20px;
}

/* Keep content above the background slideshow */
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- Trip Grid ---------- */

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.trip-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.trip-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.trip-card.expanded {
  flex-direction: column;
}

.trip-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.trip-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--text);
}

.trip-title {
  margin: 0;
}

.trip-title a {
  color: var(--text);
  text-decoration: none;
}

.trip-title a:hover {
  color: var(--accent);
}

.trip-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.trip-description {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 14px;
  line-height: 1.4;
}

.trip-map {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.trip-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Expanded trip card styles - larger map for detail pages */
.trip-card.expanded .trip-map {
  height: 360px;
}

.trip-card.expanded .trip-description {
  margin-bottom: 10px;
}

.trip-epic {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  padding: 12px 14px;
  background: var(--panel-solid);
  border-radius: 6px;
  margin: 12px 0 0;
  border-left: 3px solid var(--accent);
}

/* Trip card highlight for fragment link navigation */
.trip-card.highlight {
  animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.4); }
  50% { box-shadow: 0 0 15px 5px rgba(0, 255, 255, 0.2); }
  100% { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
}
