/* Barlow Condensed Font - Google Fonts használata */
/* A @font-face definíciók nem szükségesek, mert Google Fonts CDN-t használunk */

/* TrailR Unified Design System - Based on Figma Design */

/* ==================== CSS VARIABLES ==================== */
:root {
  /* Dark Theme Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #141420;
  --bg-card: #1a1a2e;
  --bg-card-hover: #202040;
  
  /* Purple Brand Colors */
  --purple-primary: #8b5cf6;
  --purple-secondary: #a78bfa;
  --purple-accent: #c4b5fd;
  --purple-glow: rgba(139, 92, 246, 0.3);
  
  /* Activity Type Colors */
  --mtb-color: #22c55e;
  --gravel-color: #f59e0b;
  --road-color: #3b82f6;
    /* Activity Type Colors (Neon Update) */
    --road-color: #00A3FF;    /* Élénk kék */
    --gravel-color: #FF9900;  /* Élénk narancs */
    --mtb-color: #00FF7F;     /* Élénk zöld */
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #ffffff;
  --text-muted: #ffffff;
  --bs-card-color: #ffffff !important;
  
  /* Border & Input */
  --border-color: #27272a;
  --border-hover: #3f3f46;
  --input-bg: #18181b;
  --input-border: #3f3f46;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.2);
  
  /* Typography */
  --font-family: "Barlow Condensed", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

/* ==================== BASE STYLES ==================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

}

.logo-glow {
  color: rgba(138,92,246,1) !important;
  text-shadow: rgba(138,92,246,1) 0px 0px 39px;
}

/* Mainpage - Desktop only, mobile will be overridden in mobile media query */
/* Desktop .mainpage class styles are in @media (min-width: 769px) */


/* Force white text everywhere */
* {
  color: #ffffff !important;
}

/* Exceptions for specific elements that should keep their colors */
.btn-primary,
.btn-secondary,
.btn-danger,
.badge,
.chip.active,
.progress-bar,
.favorite-btn.active,
.marker-road,
.marker-gravel,
.marker-mtb {
  color: inherit !important;
}

body.dark {
  background: var(--bg-primary);
}

/* Grain texture overlay */
.grain {
  position: relative;
}

.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

.grain > * {
  position: relative;
  z-index: 2;
}

/* ==================== TYPOGRAPHY ==================== */
.heading-xs { font-size: var(--font-size-lg); font-weight: 600; }
.heading-sm { font-size: var(--font-size-xl); font-weight: 700; }
.heading-md { font-size: var(--font-size-2xl); font-weight: 700; }
.heading-lg { font-size: var(--font-size-3xl); font-weight: 700; }
.heading-xl { font-size: var(--font-size-4xl); font-weight: 700; }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }

.text-primary { color: #ffffff !important; }
.text-secondary { color: #ffffff !important; }
.text-muted { color: #ffffff !important; }

/* ==================== BRAND TITLE ==================== */
.brand-title {
  font-family: "Barlow Condensed", var(--font-family);
  font-weight: 700;
  font-style: italic;
  color: #ffffff !important;
  margin: 0;
  letter-spacing: -0.025em;
}

/* ==================== DESKTOP STYLES (min-width: 769px) ==================== */
@media (min-width: 769px) {
  /* Desktop App Container - Isolated Stacking Context */
  .desk-app {
    position: relative;
    z-index: 1;
  }
  
  /* Hide Mobile App on Desktop */
  .mob-app {
    display: none !important;
  }
  
  /* Desktop Navbar */
  .desk-navbar {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1000;
  }
  
  .desk-brand-title {
    font-family: "Barlow Condensed", var(--font-family);
    font-weight: 700;
    font-style: italic;
    color: #ffffff !important;
    margin: 0;
    letter-spacing: -0.025em;
  }
  
  .desk-brand-title::after {
    content: "";
  }
  
  /* Desktop Main Page Layout */
  .desk-mainpage {
    height: 100vh;
    overflow: hidden;
  }
  
  /* Desktop .mainpage class - only apply on desktop */
  .desk-app .mainpage,
  .mainpage {
    height: 100vh;
    overflow: hidden;
  }
  
  .desk-main-content-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 22px);
    overflow: hidden;
  }
  
  .desk-map-list-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    min-height: 0;
  }
  
  .desk-map-container {
    flex: 0 0 70%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    position: relative;
  }
  
  /* Position the single map element in desktop container */
  .desk-app #deskMap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }
  
  /* Hide map on mobile when desktop app is visible */
  .desk-app #deskMap {
    display: block;
  }
  
  .desk-list-container {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
  }
  
  .desk-list {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding-right: var(--spacing-sm);
    padding-bottom: 200px;
    min-height: 0;
  }
  
  .desk-list::-webkit-scrollbar {
    width: 8px;
  }
  
  .desk-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
  }
  
  .desk-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
  }
  
  .desk-list::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
  }
  
  /* Desktop Map */
  .desk-map {
    height: 100%;
    width: 100%;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
  }
  
  /* Desktop Filters */
  .desk-filters {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
  }
  
  .desk-filters-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
    flex-wrap: nowrap;
  }
  
  .desk-filters-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
  }
  
  .desk-filters-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
    min-width: 200px;
  }
  
  .desk-search-input-wrapper .form-control {
    width: 100%;
    height: 40px;
  }
  
  .desk-filters-right .form-select {
    min-width: 160px;
    height: 40px;
  }
  
  /* Desktop Containers */
  .desk-containers {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
  }
  
  #page-index .desk-containers {
    max-width: 100%;
    padding: 0 var(--spacing-lg);
  }
  
  /* Desktop Tour Cards */
  .desk-tour-card {
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 280px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
  }
  
  .desk-tour-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
  }
  
  /* Desktop Footer */
  .desk-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 0;
    margin-top: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  
  /* Desktop Leaflet - Separate z-index scale */
  .desk-app .leaflet-tile-pane {
    filter: brightness(0.6) contrast(1.3) saturate(1.1);
    z-index: 100;
  }
  
  .desk-app .leaflet-control-zoom a {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: #ffffff !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    text-align: center !important;
    z-index: 1000;
  }
  
  .desk-app .leaflet-marker-pane {
    z-index: 600;
  }
  
  .desk-app .leaflet-overlay-pane {
    z-index: 500;
  }
  
  .desk-app .leaflet-popup-pane {
    z-index: 700;
  }
  
  /* Desktop Tour Detail Page */
  /* Tour detail page desktop map container - ensure proper spacing */
  #page-tour-detail .desk-containers .card #deskMap,
  #page-tour-detail .desk-containers #deskMap {
    height: 500px !important;
    min-height: 500px !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border-radius: 0; /* No border-radius since it's in a card */
    border: none; /* No border since card handles it */
    overflow: hidden;
    box-shadow: none; /* No box-shadow since card handles it */
    margin-bottom: 0; /* No margin since card handles spacing */
    position: relative !important;
  }
  
  /* Ensure card containing map has proper padding removal */
  #page-tour-detail .desk-containers .card:has(#deskMap) {
    padding: 0 !important;
  }
  
  /* Ensure Leaflet container is visible inside card */
  #page-tour-detail .desk-containers .card #deskMap.leaflet-container {
    height: 500px !important;
    min-height: 500px !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  
  /* Desktop Tour Detail Page Map - Same appearance as main page */
  #page-tour-detail .desk-app .leaflet-tile-pane {
    filter: brightness(0.6) contrast(1.3) saturate(1.1);
    z-index: 100;
  }
  
  #page-tour-detail .desk-app .leaflet-control-zoom a {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: #ffffff !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    text-align: center !important;
    z-index: 1000;
  }
  
  #page-tour-detail .desk-app .leaflet-marker-pane {
    z-index: 600;
  }
  
  #page-tour-detail .desk-app .leaflet-overlay-pane {
    z-index: 500;
  }
  
  #page-tour-detail .desk-app .leaflet-popup-pane {
    z-index: 700;
  }
  
  /* Tour detail page favorite button - purple when active, no glow */
  #page-tour-detail #favoriteBtnHeader.active,
  #page-tour-detail #mobFavoriteBtnHeader.active {
    background: var(--purple-primary) !important;
    border-color: var(--purple-primary) !important;
    color: #ffffff !important;
    box-shadow: none !important;
  }
  
  #page-tour-detail #favoriteBtnHeader.active:hover,
  #page-tour-detail #mobFavoriteBtnHeader.active:hover {
    background: var(--purple-secondary) !important;
    border-color: var(--purple-secondary) !important;
    box-shadow: none !important;
  }
}

/* ==================== NAVIGATION (Global) ==================== */
.navbar {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-md) 0;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  color: var(--text-primary) !important;
  font-weight: 800;
  font-size: var(--font-size-2xl);
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--purple-secondary) !important;
}

.navbar-text {
  color: var(--text-secondary) !important;
}

/* ==================== BUTTONS ==================== */
.btn {
  font-family: var(--font-family);
  font-weight: 600;
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  -webkit-box-shadow:0px 0px 12px 2px rgba(138,92,246,0.9);
-moz-box-shadow: 0px 0px 12px 2px rgba(138,92,246,0.9);
box-shadow: 0px 0px 12px 2px rgba(138,92,246,0.9);
margin-right: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-secondary));
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.btn-outline-light {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline-light:hover {
  background: var(--bg-card);
  border-color: var(--purple-primary);
  color: var(--purple-secondary);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: var(--text-primary);
}

.btn-danger:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* ==================== CARDS ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.card-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-lg);
  font-weight: 600;
}

.card-body {
  padding: var(--spacing-lg);
}

.card-body p {

   color: var(--text-primary);
}

.card-title {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.card-text {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tour Cards with Background Images */
.card-background {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 200px;
  overflow: hidden;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 15, 0.7) 0%,
    rgba(20, 20, 32, 0.8) 50%,
    rgba(26, 26, 46, 0.9) 100%
  );
  z-index: 1;
}

.card-content {
  position: relative;
  z-index: 2;
  padding: var(--spacing-lg);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Activity Type Cards */
.type-mtb {
  border-left: 4px solid var(--mtb-color);
}

.type-gravel {
  border-left: 4px solid var(--gravel-color);
}

.type-road {
  border-left: 4px solid var(--road-color);
}

/* ==================== FORMS ==================== */
.form-control {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  font-family: var(--font-family);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--purple-primary);
  box-shadow: 0 0 0 3px var(--purple-glow);
  background: var(--input-bg) !important; /* Ne változzon a háttér */
  color: var(--text-primary) !important; /* Ne változzon a szöveg színe */
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: var(--spacing-sm) var(--spacing-md);
}

.form-select:focus {
  outline: none;
  border-color: var(--purple-primary);
  box-shadow: 0 0 0 3px var(--purple-glow);
  background: var(--input-bg) !important; /* Ne változzon a háttér */
  color: var(--text-primary) !important; /* Ne változzon a szöveg színe */
}

.form-label {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  display: block;
}

/* ==================== FILTERS & CHIPS ==================== */
.filters {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

/* Updated filter layout - single row */
.filters-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  width: 100%;
  flex-wrap: nowrap;
}

.filters-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex: 1;
  min-width: 0;
}

.filters-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-shrink: 0;
}

.search-input-wrapper {
  flex: 1;
  min-width: 200px;
}

.search-input-wrapper .form-control {
  width: 100%;
  height: 40px; /* Fixed height for single row */
}

.filters-right .form-select {
  min-width: 160px;
  height: 40px; /* Fixed height for single row */
}

/* Responsive */
@media (max-width: 1200px) {
  .filters-right .form-select {
    min-width: 140px;
  }
}

@media (max-width: 992px) {
  .filters-container {
    flex-wrap: wrap;
  }
  
  .filters-left {
    width: 100%;
  }
  
  .filters-right {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .filters-right .form-select {
    min-width: 140px;
    flex: 1 1 auto;
    max-width: 200px;
  }
  
  .search-input-wrapper {
    width: 100%;
  }
  
  .chip-group {
    flex-wrap: wrap;
    width: 100%;
  }
  
  .chip {
    flex: 1 1 auto;
    min-width: 80px;
  }
}

@media (max-width: 768px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters-container {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }
  
  .filters-left {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters-right {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .filters-right .form-select {
    min-width: 120px;
    flex: 1 1 calc(50% - var(--spacing-sm));
    max-width: none;
  }
  
  .search-input-wrapper {
    min-width: auto;
    width: 100%;
  }
  
  .chip-group {
    width: 100%;
    justify-content: center;
  }
  
  .chip {
    flex: 1 1 calc(25% - var(--spacing-sm));
    min-width: 70px;
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
  }
}

@media (max-width: 576px) {
  .filters-right .form-select {
    min-width: 100px;
    flex: 1 1 100%;
    font-size: var(--font-size-sm);
  }
  
  .chip {
    flex: 1 1 calc(50% - var(--spacing-sm));
    min-width: 60px;
  }
}

.chip-group {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: nowrap;
}

.chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: var(--spacing-sm) var(--spacing-lg);
  color: #ffffff;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  height: 40px; /* Fixed height for single row */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Chip borders with category colors and glow */
.chip[data-type="mtb"] {
  border-color: var(--mtb-color);
  box-shadow: 0 0 8px rgba(0, 255, 127, 0.3);
}

.chip[data-type="gravel"] {
  border-color: var(--gravel-color);
  box-shadow: 0 0 8px rgba(255, 153, 0, 0.3);
}

.chip[data-type="országúti"] {
  border-color: var(--road-color);
  box-shadow: 0 0 8px rgba(0, 163, 255, 0.3);
}

.chip[data-type=""] {
  border-color: var(--purple-primary);
  box-shadow: 0 0 8px var(--purple-glow);
}

.chip:hover {
  border-color: var(--purple-primary);
  box-shadow: 0 0 12px var(--purple-glow);
  color: #ffffff;
}

/* Active chip - category color background */
.chip.active {
  color: #ffffff;
}

.chip.active[data-type=""] {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-secondary));
  border-color: var(--purple-primary);
  box-shadow: 0 0 15px var(--purple-glow);
}

.chip.active[data-type="mtb"] {
  background: var(--mtb-color);
  border-color: var(--mtb-color);
  box-shadow: 0 0 15px rgba(0, 255, 127, 0.5);
}

.chip.active[data-type="gravel"] {
  background: var(--gravel-color);
  border-color: var(--gravel-color);
  box-shadow: 0 0 15px rgba(255, 153, 0, 0.5);
}

.chip.active[data-type="országúti"] {
  background: var(--road-color);
  border-color: var(--road-color);
  box-shadow: 0 0 15px rgba(0, 163, 255, 0.5);
}

/* ==================== BADGES ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.bg-primary {
  background: var(--purple-primary) !important;
  color: var(--text-primary);
}

.bg-secondary {
  background: var(--bg-secondary) !important;
  color: var(--text-secondary);
}

.bg-success {
  background: var(--mtb-color) !important;
  color: var(--text-primary);
}

.bg-warning {
  background: var(--gravel-color) !important;
  color: var(--text-primary);
}

.bg-info {
  background: var(--road-color) !important;
  color: var(--text-primary);
}

/* ==================== FAVORITE BUTTON ==================== */
.favorite-btn {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.favorite-btn:hover {
  transform: scale(1.1);
  border-color: var(--purple-primary);
  box-shadow: var(--shadow-glow);
}

.favorite-btn.active {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-secondary));
  border-color: var(--purple-primary);
}

.favorite-btn .lucide {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
  stroke-width: 2.5px;
}

/* ==================== MODALS ==================== */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--spacing-lg);
}

.modal-title {
  color: var(--text-primary);
  font-weight: 700;
  margin: 0;
}

.modal-body {
  padding: var(--spacing-lg);
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: var(--font-size-xl);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
}

.btn-close:hover {
  color: var(--text-primary);
}

/* ==================== MAP STYLES ==================== */
#map {
  height: 100%;
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Map styles for tour detail page */
#page-tour-detail .containers #map {
  height: 400px;
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--spacing-lg);
}

/* Much lighter and more contrasty map - mindkét oldalon */
.leaflet-tile-pane {
  filter: brightness(1.5) contrast(1.3) saturate(1.2);
}

/* Prevent page scroll when clicking zoom buttons */
.leaflet-control-zoom,
.leaflet-control-zoom a,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
}

/* Zoom control ikonok fehér színe - mindkét oldalon */
.leaflet-control-zoom a {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: #ffffff !important;
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
  text-align: center !important;
  text-decoration: none !important;
  font-size: 18px !important;
  font-weight: bold !important;
  cursor: pointer !important;
}

.leaflet-control-zoom a:hover {
  background-color: var(--bg-card-hover) !important;
  border-color: var(--purple-primary) !important;
  color: #ffffff !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  color: #ffffff !important;
}

/* Zoom control container háttér */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-md) !important;
}

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

.leaflet-bar a {
  border-bottom: 1px solid var(--border-color) !important;
}

.leaflet-bar a:last-child {
  border-bottom: none !important;
}

/* Main page layout - no scroll */


.main-content-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 22px); /* Minus footer height */
  overflow: hidden;
}

.map-list-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  min-height: 0;
}

.map-container {
  flex: 0 0 70%; /* 70% width for map */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.list-container {
  flex: 0 0 30%; /* 30% width for list */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

#list {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding-right: var(--spacing-sm);
  min-height: 0;
  padding-bottom: 200px;
}

#list::-webkit-scrollbar {
  width: 8px;
}

#list::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
}

#list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

#list::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.leaflet-popup-tip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.leaflet-popup-content h3 {
  color: var(--text-primary);
  font-weight: 700;
  margin: var(--spacing-sm) 0;
}

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

/* ==================== PROGRESS BARS ==================== */
.progress {
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  height: 24px;
  overflow: hidden;
  display: flex;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  transition: width 0.6s ease;
}

/* ==================== AUTHENTICATION ==================== */
.login-btn {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-secondary));
  color: var(--text-primary);
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-lg);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-glow);
}

.login-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--purple-primary);
  object-fit: cover;
}

.user-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);

  min-width: 180px;
  z-index: 10000;
  overflow: hidden;
}

.user-menu:hover .user-dropdown {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--border-color);
}

.user-dropdown a:last-child {
  border-bottom: none;
}

.user-dropdown a:hover {
  background: var(--bg-card-hover);
  color: var(--purple-secondary);
}

/* ==================== FINISHERS LIST ==================== */
.finishers-section {
  margin-top: var(--spacing-xl);
}

.finishers-section h3 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
}

.finishers-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.finisher-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  transition: all 0.2s ease;
}

.finisher-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.finisher-number {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-secondary));
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
}

.finisher-info {
  flex: 1;
}

.finisher-name {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.finisher-date {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  /* Hide Desktop App on Mobile */
  .desk-app {
    display: none !important;
  }
  
  /* Show Mobile App on Mobile */
  .mob-app {
    display: block !important;
  }
  
  .heading-xl { font-size: var(--font-size-3xl); }
  .heading-lg { font-size: var(--font-size-2xl); }
  
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters-container {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }
  
  .filters-left {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters-right {
    justify-content: center;
  }
  
  .search-input-wrapper {
    min-width: auto;
    max-width: none;
  }
  
  .chip-group {
    justify-content: center;
  }
  
  #map {
    height: 50vh;
    min-height: 300px;
  }
  
  .card-content {
    padding: var(--spacing-md);
  }
}

/* ==================== UTILITY CLASSES ==================== */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-none { display: none; }
.d-block { display: block; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }

.flex-direction-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }

.m-0 { margin: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.fw-normal { font-weight: 400; }
.fw-bold { font-weight: 700; }
.fw-bolder { font-weight: 800; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-lg);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.cookie-banner.active {
  transform: translateY(0);
}

.cookie-banner .content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-banner .actions {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

@media (max-width: 768px) {
  .cookie-banner .content {
    flex-direction: column;
    text-align: center;
  }
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 0;
  margin-top: 20px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  height: 100%;
  overflow: hidden;
}

.footer-links {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--spacing-md);
  justify-content: center;
  margin: 0;
  height: 100%;
  align-items: center;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
  transition: color 0.2s ease;
  line-height: 24px;
}

.footer-links a:hover {
  color: var(--purple-secondary);
  text-decoration: none;
}

.footer-copyright {
  text-align: center;
  color: #ffffff;
  font-size: 12px;
  margin: 0;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .footer {
    height: auto;
    min-height: 22px;
    padding: 2px 0;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 2px;
  }
  
  .footer-links {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }
}

/* ==================== TOUR CARDS ==================== */
.tour-card {
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 280px; /* Fixed height */
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  
}

.tour-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
  text-decoration: none;
  color: inherit;
}

.tour-card-image {
  width: 100%;
  height: 140px; /* Fixed image height */
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--spacing-sm);
  flex-shrink: 0;
}

.tour-card-top-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: var(--spacing-sm);
}

.tour-card-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 5;
  white-space: nowrap;
}

.tour-card-stats-overlay {
  display: flex;
  gap: var(--spacing-xs);
  align-items: center;
  flex-wrap: wrap;
}

.stat-chip {
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.tour-card-content {
  padding: var(--spacing-md);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tour-card-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  line-height: 1.3;
  flex-shrink: 0;
}

.tour-card-intro {
  font-size: var(--font-size-sm);
  color: #ffffff;
  line-height: 1.4;
  margin: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tour-card-region {
  font-size: var(--font-size-sm);
  color: #ffffff;
  margin: 0;
  flex-shrink: 0;
}

.tour-card-stats {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.tour-card-stats .stat {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: #ffffff;
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.tour-card-stats .stat i {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.tour-card-button {
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}

.tour-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tour-card.fade-out {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

/* ==================== CONTAINERS ==================== */
.containers {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Főoldal container teljes széles */
#page-index .containers {
  max-width: 100%;
  padding: 0 var(--spacing-lg);
}

/* Grid layout oldal ID alapján */
#page-profile .containers > *:not(.grain),
#page-events .containers > *:not(.grain),
#page-tour-detail .containers > .row {
  max-width: 1400px;
  margin: 0 auto;
}

.nav-tabs .nav-link {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-secondary));
  color: var(--text-primary);
 margin-right: 10px;
}

/* Térkép jelölők és popup design */
.leaflet-marker-icon {
  z-index: 100 !important;
}

.glowing-marker-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glowing-marker {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.glowing-marker:hover {
  transform: scale(1.1);
}

.marker-icon {
  color: white;
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.custom-div-icon {
  background: transparent !important;
  border: none !important;
}

/* Popup design */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: "Barlow Condensed", var(--font-family) !important;
}

.leaflet-popup-tip {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
}

.leaflet-popup-content {
  margin: var(--spacing-md) !important;
  font-family: "Barlow Condensed", var(--font-family) !important;
}

.leaflet-popup-content h3 {
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  margin: var(--spacing-sm) 0 !important;
  font-family: "Barlow Condensed", var(--font-family) !important;
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--text-secondary) !important;
  opacity: 0.8 !important;
  font-size: 20px !important;
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  opacity: 1 !important;
  color: var(--text-primary) !important;
}

/* Popup gombok */
.leaflet-popup-content .btn {
  font-family: "Barlow Condensed", var(--font-family) !important;
  font-weight: 600 !important;
}

/* Desktop brand title - csak a logo, nincs oldal név */
.desktop-brand-title::after {
  content: "";
}

/* Image Lightbox - Desktop */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.image-lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.2s;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--bg-card-hover);
  transform: scale(1.1);
  border-color: var(--purple-primary);
}

.lightbox-close {
  top: 30px;
  right: 30px;
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
}

.gallery-image-container {
  transition: transform 0.2s, opacity 0.2s;
  position: relative;

}

.gallery-image-container:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* ==================== MOBILE STYLES (max-width: 768px) ==================== */
@media (max-width: 768px) {
  /* Mobile App Container - Isolated Stacking Context */
  .mob-app {
    position: relative;
    z-index: 1;
  }
  
  /* Hide Desktop App on Mobile */
  .desk-app {
    display: none !important;
  }
  
  /* Prevent horizontal scrolling */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  * {
    max-width: 100% !important;
  }
  
  /* Mobile Brand Logo */
  .mob-brand {
    position: fixed;
    top: var(--spacing-md);
    left: var(--spacing-md);
    z-index: 1002;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: block;
    pointer-events: auto !important;
  }
  
  .mob-brand a {
    color: var(--text-primary) !important;
    text-decoration: none;
    font-size: var(--font-size-lg);
    font-weight: 700;
    font-style: italic;
    font-family: "Barlow Condensed", var(--font-family);
  }
  
  /* Mobile Hamburger Menu */
  .mob-menu-toggle {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 1002;
    display: block !important;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    pointer-events: auto !important;
  }
  
  .mob-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md);
    z-index: 1001;
    box-shadow: var(--shadow-lg);
  }
  
  .mob-menu.active {
    display: block;
  }
  
  .mob-menu .btn {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    text-align: center;
  }
  
  .mob-menu .btn:last-child {
    margin-bottom: 0;
  }
  
  /* Mobile User Info (logged in) - Hide desktop user-menu in mobile */
  #mobAuthContainer .user-menu,
  #mobAuthContainer .user-dropdown {
    display: none !important;
  }
  
  /* Mobile User Info (logged in) */
  .mob-user-info {
    width: 100%;
    text-align: center;
    display: block !important;
    margin-top: var(--spacing-sm);
  }
  
  .mob-user-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
  }
  
  .mob-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 2px solid var(--purple-primary);
    object-fit: cover;
    flex-shrink: 0;
  }
  
  .mob-user-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--font-size-md);
    text-align: center;
    margin: 0;
  }
  
  /* Mobile Login Button - Full Width */
  .mob-auth-container .btn,
  #mobAuthContainer .btn {
    width: 100% !important;
    display: block !important;
    margin-bottom: 15px;
    text-align: center;
  }
  
  #mobAuthContainer .btn:last-child {
    margin-bottom: 0;
  }
  
  /* Ensure mob-user-info is styled correctly */
  #mobAuthContainer .mob-user-info {
    width: 100% !important;
    margin-top: var(--spacing-sm);
  }
  
  #mobAuthContainer .mob-user-header {
    margin-bottom: var(--spacing-md) !important;
  }
  
  #mobAuthContainer .mob-user-name {
    margin: 0 !important;
  }
  
  /* Ensure user menu items in mobile are styled as buttons */
  #mobAuthContainer .mob-user-info .btn {
    text-align: center !important;
  }
  
  /* Hide Desktop Navbar on Mobile */
  .navbar {
    display: none !important;
  }
  
  /* Mobile Body and HTML - Auto height for scrolling */
  html.mob-app,
  body.mob-app,
  .mob-app html,
  .mob-app body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  
  .mob-app {
    min-height: 100vh !important;
    height: auto !important;
    overflow-y: visible !important;
  }
  
  /* Mobile Body Padding */
  .mob-app body {
    padding-top: 60px;
  }
  
  /* Mobile Main Page Layout */
  /* Override .mainpage for mobile */
  .mainpage.mob-app,
  .mob-app .mainpage,
  #page-index.mainpage {
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  #page-index.mob-mainpage {
    overflow-y: visible !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  .mob-main-content-wrapper {
    flex-direction: column;
    height: auto !important;
    overflow: visible !important;
    min-height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .mob-map-list-container {
    flex-direction: column;
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
    height: auto !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .mob-map-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 50vh !important;
    min-height: 50vh !important;
    max-height: 50vh !important;
    order: 1;
    overflow: hidden !important;
    position: relative !important;
    margin-bottom: 15px;
    flex-shrink: 0;
  }
  
  /* Position the single map element in mobile container */
  .mob-app #deskMap {
    position: fixed;
    top: auto;
    left: auto;
    width: 100%;
    height: 50vh;
    z-index: 100;
  }
  
  /* Move map into mobile container using JavaScript positioning */
  .mob-map-container #deskMap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
  }
  
  /* Hide map when mobile app is not visible */
  @media (min-width: 769px) {
    .mob-app #deskMap {
      display: none !important;
    }

    .gallery-image-container {
      transition: transform 0.2s, opacity 0.2s;
      position: relative;
      max-height: 180px;
      overflow: hidden;
    }
    
  }
  
  @media (max-width: 768px) {
    .desk-app #deskMap {
      display: none !important;
    }
  }
  
  .mob-list-container {
    flex: 1;
    width: 100% !important;
    max-width: 100% !important;
    order: 2;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }
  
  .mob-map,
  .mob-map-container #deskMap,
  .mob-app #deskMap {
    height: 100% !important;
    min-height: 50vh !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    display: block !important;
    visibility: visible !important;
  }
  
  /* Explicit height for Leaflet container on mobile */
  .mob-map-container #deskMap.leaflet-container {
    height: 100% !important;
    min-height: 50vh !important;
    width: 100% !important;
  }
  
  /* CRITICAL: Explicit height for Leaflet container on mobile */
  .mob-app #deskMap.leaflet-container {
    display: block !important;
    visibility: visible !important;
    background: var(--bg-primary) !important;
    opacity: 1 !important;
    z-index: 100 !important;
    height: 100% !important;
    min-height: 50vh !important;
    width: 100% !important;
  }
  
  /* Ensure Leaflet map tiles are visible on mobile */
  .mob-app #deskMap .leaflet-tile-pane {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 200 !important;
  }
  
  /* Ensure Leaflet map panes are visible on mobile */
  .mob-app #deskMap .leaflet-pane {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Ensure Leaflet tiles are visible on mobile */
  .mob-app #deskMap .leaflet-tile-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .mob-app #deskMap .leaflet-tile {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Override desktop map styles on mobile - EXPLICIT HEIGHT REQUIRED */
  .mob-app .desk-map {
    height: 100% !important;
    min-height: 50vh !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    visibility: visible !important;
    position: relative !important;
  }
  
  /* CRITICAL: Leaflet requires explicit height on container */
  .mob-map-container #deskMap.leaflet-container {
    height: 50vh !important;
    min-height: 50vh !important;
    max-height: 50vh !important;
    width: 100% !important;
  }
  
  .mob-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: var(--spacing-xl);
  }
  
  /* Mobile Filters */
  .mob-filters {
    padding: var(--spacing-sm) var(--spacing-md);
    padding-top: 80px;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0;
  }
  
  .mob-filters-container {
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .mob-filters-left {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .mob-search-input-wrapper {
    margin-bottom: 10px;
  }
  
  .mob-filters-right {
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .mob-filters-right .form-control,
  .mob-filters-right .form-select {
    margin-bottom: 10px;
  }
  
  .mob-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    width: 100% !important;
    max-width: 100% !important;
    order: 1;
    margin-bottom: 10px;
  }
  
  .mob-filters-advanced {
    display: none;
    width: 100% !important;
    max-width: 100% !important;
    order: 2;
    margin-top: var(--spacing-sm);
  }
  
  .mob-filters-advanced.active {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .mob-filters-toggle {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: var(--spacing-sm);
    order: 3;
  }
  
  /* Mobile Containers */
  .mob-containers {
    max-width: 100% !important;
    padding: 0 var(--spacing-sm) !important;
    overflow-x: hidden !important;
  }
  
  /* Mobile Tour Cards */
  .mob-tour-card {
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 280px;
    flex-shrink: 0;
  }
  
  /* Mobile Leaflet - Same appearance as desktop */
  .mob-app .leaflet-tile-pane {
    filter: brightness(0.6) contrast(1.3) saturate(1.1);
    z-index: 100 !important;
  }
  
  .mob-app .leaflet-control-zoom a {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: #ffffff !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    text-align: center !important;
    z-index: 1000 !important;
  }
  
  /* CRITICAL: Marker pane must be above tile pane on mobile */
  .mob-app .leaflet-marker-pane {
    z-index: 600 !important;
    position: relative !important;
    pointer-events: auto !important;
  }
  
  .mob-app .leaflet-overlay-pane {
    z-index: 500 !important;
  }
  
  .mob-app .leaflet-popup-pane {
    z-index: 700 !important;
  }
  
  /* Ensure markers are visible on mobile */
  .mob-app .leaflet-marker-icon {
    z-index: 600 !important;
    position: relative !important;
    pointer-events: auto !important;
  }
  
  /* Marker clusters if used */
  .mob-app .marker-cluster {
    z-index: 600 !important;
  }
  
  /* Mobile Marker Icons - Ensure markers are visible (markers are added to body, not .mob-app) */
  .glowing-marker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .glowing-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  .glowing-marker:hover {
    transform: scale(1.1);
  }
  
  .marker-icon {
    color: white;
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
  }
  
  .custom-div-icon {
    background: transparent !important;
    border: none !important;
  }
  
  .leaflet-marker-icon {
    z-index: 600 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Ensure marker icon elements are visible on mobile */
  .leaflet-marker-icon .glowing-marker-wrapper {
    display: flex !important;
    visibility: visible !important;
  }
  
  .leaflet-marker-icon .glowing-marker {
    display: flex !important;
    visibility: visible !important;
  }
  
  .leaflet-marker-icon .marker-icon {
    display: block !important;
    visibility: visible !important;
  }
  
  /* Mobile Popup Styles - Fixed width and responsive content */
  .mob-app .leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-lg) !important;
    font-family: "Barlow Condensed", var(--font-family) !important;
    width: 280px !important;
    max-width: 80vw !important;
    min-width: 250px !important;
  }
  
  .mob-app .leaflet-popup-tip {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
  }
  
  .mob-app .leaflet-popup-content {
    margin: var(--spacing-md) !important;
    font-family: "Barlow Condensed", var(--font-family) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Responsive popup content */
  .mob-app .leaflet-popup-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .mob-app .leaflet-popup-content a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  .mob-app .leaflet-popup-content h3 {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    margin: var(--spacing-sm) 0 !important;
    font-family: "Barlow Condensed", var(--font-family) !important;
    font-size: 14px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  .mob-app .leaflet-container a.leaflet-popup-close-button {
    color: var(--text-secondary) !important;
    opacity: 0.8 !important;
    font-size: 20px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
  }
  
  .mob-app .leaflet-container a.leaflet-popup-close-button:hover {
    opacity: 1 !important;
    color: var(--text-primary) !important;
  }
  
  .mob-app .leaflet-popup {
    margin-left: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Mobile popup content classes */
  .mob-popup-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 200px;
    max-width: 90vw;
  }
  
  .mob-popup-title {
    margin: 0;
    font-size: 14px;
    color: #ffffff;
    flex: 1;
  }
  
  .mob-popup-close {
    opacity: 1;
    flex-shrink: 0;
  }
  
  /* Desktop popup content classes */
  .desk-popup-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 200px;
  }
  
  .desk-popup-title {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
  }
  
  .desk-popup-close {
    opacity: 1;
  }
  
  /* Image Lightbox - Mobile */
  .mob-app .image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  
  .mob-app .image-lightbox.active {
    display: flex;
  }
  
  .mob-app .lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mob-app .lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  
  .mob-app .lightbox-close,
  .mob-app .lightbox-nav {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s;
  }
  
  .mob-app .lightbox-close:hover,
  .mob-app .lightbox-nav:hover {
    background: var(--bg-card-hover);
    transform: scale(1.1);
  }
  
  .mob-app .lightbox-close {
    top: 20px;
    right: 20px;
  }
  
  .mob-app .lightbox-prev {
    left: 10px;
  }
  
  .mob-app .lightbox-next {
    right: 10px;
  }
  
  .mob-app .lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
  }
  
  .mob-app .gallery-image-container {
    transition: transform 0.2s, opacity 0.2s;
  }
  
  .mob-app .gallery-image-container:hover {
    transform: scale(1.02);
    opacity: 0.9;
  }
  
  /* Mobile Tour Detail Page */
  #page-tour-detail .mob-containers {
    padding: 0 var(--spacing-sm);
  }
  
  #page-tour-detail .mob-map {
    height: 300px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 300px !important;
    z-index: 100;
    position: relative;
    display: block;
  }
  
  /* Mobile Events Page */
  #page-events .mob-containers {
    padding: 0 var(--spacing-sm);
    padding-top: 100px; /* Extra space below logo and hamburger menu */
  }
  
  #page-events .mob-containers .heading-md.mb-4 {
    margin-bottom: var(--spacing-md) !important; /* Reduced margin for event page headings */
  }
  
  #page-events .mob-map {
    height: 250px !important;
    margin-bottom: var(--spacing-md);
  }
  
  /* Mobile Profile Page */
  #page-profile .mob-containers {
    padding: 0 var(--spacing-sm);
  }
  
  /* Mobile Info Page */
  #page-info .mob-containers {
    padding: 0 var(--spacing-sm);
  }
}