/* Google Fonts - Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

:root {
  /* Uyumlu Renk Paleti - Harmoni & Doğa */
  --nav-bg: #2d6a4f;
  /* Koyu yeşil - doğa ve miras */
  --sidebar-bg: linear-gradient(135deg, #40916c 0%, #52b788 100%);
  /* Yeşil gradient */
  --right-sidebar-bg: linear-gradient(135deg, #74c69d 0%, #95d5b2 100%);
  /* Açık yeşil */
  --media-window-bg: linear-gradient(135deg, #b7e4c7 0%, #d8f3dc 100%);
  /* Çok açık yeşil */

  --details-window-bg: rgba(45, 106, 79, 0.85);
  --details-window-border: rgba(82, 183, 136, 0.6);
  --spinner-primary: #40916c;
  --spinner-secondary: #52b788;
  --spinner-accent: #74c69d;

  /* Hover states - cam efektli */
  --hover-bg: rgba(255, 255, 255, 0.2);
  --active-bg: rgba(255, 255, 255, 0.35);
}

/* ============================================
   PAGE LOADER / SPINNER
   ============================================ */
.page-loader {
  position: fixed;
  top: 107px;
  left: 0;
  width: 100%;
  height: calc(100% - 107px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  overflow: hidden;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Video Background */
.loader-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

.loader-video.loaded {
  opacity: 1;
}

/* Dark overlay for better contrast */
.loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 106, 79, 0.5);
  z-index: 2;
}

.spinner-container {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: -40px;
}

/* Logo at bottom-center of loader */
.loader-logo {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-logo-img {
  height: 220px;
  width: auto;
  opacity: 0.9;
}

/* Spinner with animated rings */
.spinner {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: absolute;
  border: 3px solid transparent;
  border-radius: 50%;
  animation: spin 2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
  width: 120px;
  height: 120px;
  border-top-color: rgba(255, 255, 255, 0.8);
  animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
  width: 90px;
  height: 90px;
  border-right-color: rgba(255, 255, 255, 0.6);
  animation-delay: -0.3s;
  animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
  width: 60px;
  height: 60px;
  border-bottom-color: rgba(255, 255, 255, 0.4);
  animation-delay: -0.6s;
}

.spinner-logo {
  position: absolute;
  font-size: 36px;
  color: white;
  animation: pulse 2s ease-in-out infinite;
}

.spinner-logo i {
  display: block;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* Loading text */
.loading-text {
  font-size: 24px;
  font-weight: 500;
  color: white;
  letter-spacing: 1px;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Progress bar */
.progress-bar-container {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffffff 0%, #d8f3dc 100%);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }

  50% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.4);
  }

  100% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }
}

.progress-percentage {
  font-size: 18px;
  font-weight: 600;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile responsive for spinner */
@media (max-width: 768px) {
  .spinner {
    width: 100px;
    height: 100px;
  }

  .spinner-ring:nth-child(1) {
    width: 100px;
    height: 100px;
  }

  .spinner-ring:nth-child(2) {
    width: 75px;
    height: 75px;
  }

  .spinner-ring:nth-child(3) {
    width: 50px;
    height: 50px;
  }

  .spinner-logo {
    font-size: 28px;
  }

  .loading-text {
    font-size: 20px;
  }

  .progress-bar-container {
    width: 250px;
  }

  .progress-percentage {
    font-size: 16px;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
}

body {
  min-height: 100%;
  background: #d8f3dc;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 65px;
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
  transition: all 0.4s ease;
}

nav .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}

nav .menu-icon {
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  position: absolute;
  left: 24px;
  z-index: 5;
}

.logo .logo-name {
  color: #fff;
  font-size: 22px;
  font-weight: 500;
}

.sidebar-logo-img {
  height: 174px;
  width: auto;
  transform: scale(0.75);
}

.sidebar-content {
  position: fixed;
  top: 107px; /* 65px nav + 42px tabs */
  left: -100%;
  height: calc(100% - 107px);
  width: 260px;
  padding: 30px 16px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
  z-index: 299;
}

nav.open ~ .sidebar-content {
  left: 0;
}

.sidebar-content .list {
  list-style: none;
}

.sidebar-content form {
  /* Remove absolute positioning from the form */
  margin-top: 3px;
  /* Adjust as needed for spacing */
  margin-bottom: 15px;
  /* Add space between forms to prevent overlap */
  z-index: 1;
  width: 228px;
  height: 42px;
  /* Fixed height for consistency */
  position: relative;
  /* Keep relative for absolute positioning of options */
}

.list .nav-link {
  display: flex;
  align-items: center;
  margin: 4px 0;
  padding: 4px 3px;
  border-radius: 8px;
  text-decoration: none;
}

.lists .nav-link:hover {
  background-color: var(--hover-bg);
  backdrop-filter: blur(10px);
}

.nav-link .icon {
  margin-right: 14px;
  font-size: 20px;
  color: #fff;
}

.nav-link .link {
  font-size: 16px;
  color: #fff;
  font-weight: 400;
}

.lists .nav-link:hover .icon,
.lists .nav-link:hover .link {
  color: #fff;
}

.overlay {
  position: fixed;
  top: 107px;
  left: -100%;
  height: 1000vh;
  width: 200%;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  background: rgba(0, 0, 0, 0.3);
}

nav.open~#map {
  width: calc(100% - 260px);
  /* Adjust width when sidebar is open */
  left: 260px;
}

nav.open~.overlay {
  opacity: 1;
  left: 260px;
  pointer-events: auto;
}

/* ============================================
   VIEW TABS (Locations / Routes) - Fixed below nav
   ============================================ */
.view-tabs {
  position: fixed;
  top: 65px;
  left: 0;
  width: 100%;
  height: 42px;
  display: flex;
  gap: 0;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  z-index: 298;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.view-tab {
  flex: 1;
  padding: 0 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.view-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: #74c69d;
  border-radius: 3px 3px 0 0;
  transition: width 0.3s ease;
}

.view-tab.active {
  color: #fff;
  font-weight: 600;
}

.view-tab.active::after {
  width: 60%;
}

.view-tab:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

.view-tab:hover::after {
  width: 40%;
}

.view-tab.active:hover::after {
  width: 60%;
}

.view-tab .tab-icon {
  font-size: 15px;
}

/* ============================================
   ROUTES VIEW
   ============================================ */
.routes-view {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.route-selector {
  width: 100%;
  margin-bottom: 12px;
}

.route-selector label {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.route-selector select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #2d6a4f;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.route-selector select:focus {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.route-selector select option {
  padding: 6px;
}

.route-info {
  margin-top: 8px;
  color: #fff;
}

.route-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #fff;
}

.route-info p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  line-height: 1.5;
}

.route-point-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.route-point-item:hover {
  background: rgba(255, 255, 255, 0.22);
}

.route-point-number {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: #2d6a4f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.route-point-name {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  flex: 1;
}

.route-point-coords {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

/* Route marker numbered circle */
.route-marker-icon {
  background: none !important;
  border: none !important;
}

.route-marker-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.route-marker-number:hover {
  transform: scale(1.2);
}

/* Route polyline popup */
.route-point-popup {
  font-size: 12px;
}

.route-point-popup b {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

/* Mobile adjustments for routes */
@media (max-width: 768px) {
  .view-tabs {
    margin-bottom: 12px;
  }
  
  .view-tab {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .route-selector select {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .route-point-item {
    padding: 8px 10px;
  }
  
  .route-point-name {
    font-size: 13px;
  }
}

/* Tablet adjustments for routes */
@media (min-width: 769px) and (max-width: 1023px) {
  .view-tab {
    font-size: 12px;
    padding: 6px 10px;
  }
}

#categories-menu {
  margin-top: 30px;

}

/* Make sure the map container fills the screen */
#map {
  height: 100vh;
  /* 100% of the viewport height */
  width: 100%;
  /* Full width */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  /* Ensure the map is behind other elements */
  transition: all 0.4s ease;
  /* Smooth transition */
}

/* Custom marker icon styling with semi-transparent background */
.custom-div-icon {
  background: none !important;
  border: none !important;
}

/* Make sure the other content (like #itms) is displayed over the map */
#itms {
  position: relative;
  z-index: 1;
}

/* Optional: For the scroll-pane (if it's needed) */
.scroll-pane {
  overflow-y: auto;
  height: calc(100vh - 100px);
  /* Adjust based on the content height you want */
}

.sub-menu {
  list-style: none;
  padding-left: 20px;
  max-height: 0;
  overflow: visible;
  transition: max-height 0.3s ease-out;
}

.sub-menu li {
  padding: 5px 0;
}

.sub-menu a {
  text-decoration: none;
  color: #fff;
  font-size: 14px;
}

.list.has-sub.active .sub-menu {
  max-height: 200px;
  /* Adjust as needed */
}

/* Style for selected category link */
.nav-link.category-link.selected {
  background-color: var(--active-bg);
  /* Selected item background */
  color: #fff;
  /* White text color */
  font-weight: 600;
  /* Bold text for selected category */
  backdrop-filter: blur(10px);
  border-radius: 8px;
  /* Rounded corners */
}

/* Optional: Add a slight shadow to make it stand out more */
.nav-link.category-link.selected:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}


/* Right Sidebar */
.right-sidebar {
  position: fixed;
  right: -100%;
  /* Initially hidden */
  top: 107px;
  bottom: 0;
  width: 400px;
  /* Set the width of the sidebar */
  transition: right 0.3s ease-in-out;
  z-index: 1000;
  overflow: scroll;
  background: var(--right-sidebar-bg);
  padding: 5px;
  transition: opacity 0.3s ease-in-out;
  z-index: 10000;
  opacity: 0.95;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
  color: #081a08;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

/* Close button for right sidebar */
.right-sidebar-close-btn {
  position: fixed;
  top: 4px;
  right: 4px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  z-index: 10001;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  background: #2d6a4f;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
  pointer-events: auto;
}

body:has(.right-sidebar.show) .right-sidebar-close-btn {
  display: flex;
}

.right-sidebar-close-btn:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

.right-sidebar.show {
  right: 0;
  /* When visible */
  top: 107px;
}

/* Overlay */
.right-sidebar-overlay {
  display: none;
  /* Initially hidden */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.right-sidebar-overlay.active {
  display: block;
}



.location-summary {
  color: #fff;
  font-size: 16px;
}

.location-summary h3 {
  font-weight: 600;
}

.location-details {
  margin-top: 10px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.location-photos img {
  max-width: 100%;
  height: auto;
  margin-top: 10px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  color: #fff;
  text-decoration: none;
}

.facebook-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url('/cekulharita/img/facebook.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 5px;
}

.instagram-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url('/cekulharita/img/instagram.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 5px;
}

.social-links a:hover {
  color: #004d4d;
}

.location-windows-container {
  display: flex;
  flex-wrap: wrap;
  color: #081a08;
}

.location-window {
  width: 390px;
  /* Adjust as needed */
  background: rgba(45, 106, 79, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  margin: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  color: #081a08;
}

.location-window-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #081a08;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  margin: 3px;
}

.location-window-header h3 {
  margin: 0;
  font-size: 16px;
  color: #2c313d;
  ;
}

.location-window-content {
  padding: 10px;
  color: #ffffff;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.location-window-content p {
  color: #ffffff;
  line-height: 1.6;
}

.location-window-content strong {
  color: #ffffff;
  font-weight: 700;
}

.location-window-content a {
  color: #4dd4ac !important;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.location-window-content a:hover {
  color: #5ffac8 !important;
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(95, 250, 200, 0.4);
}



.search-container {
  display: flex;
  align-items: stretch;
  padding: 0;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 228px;
  height: 50px;
  box-sizing: border-box;
  overflow: hidden;
}

.search-container input {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 4px 0 0 4px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  font-size: 14px;
  height: 100%;
}

.search-container input:focus {
  border-color: #40916c;
}

.search-container button {
  background: #40916c;
  color: white;
  border: none;
  border-left: 1px solid #367a5c;
  padding: 0 12px;
  cursor: pointer;
  border-radius: 0 4px 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  height: 100%;
  min-width: 40px;
}

.search-container button:hover {
  background: #2d6a4f;
}

.search-container button i {
  font-size: 16px;
}

/* Search results panel */
#searchResultsPanel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 58%;
  max-height: 70vh;
  background: rgba(45, 106, 79, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: white;
  padding: 15px;
  border-radius: 12px;
  overflow-y: auto;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10002;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#searchResultsPanel.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

#searchResultsPanel h3 {
  margin-top: 0;
  color: #d8f3dc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

#searchResultsPanel button#closeSearchPanelButton {
  position: fixed;
  top: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  opacity: 1;
  border-radius: 50%;
  font-size: 20px;
  color: white;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#searchResultsPanel button#closeSearchPanelButton:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}


.search-result {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.search-result:hover {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
}

* {
  user-select: none;
}

*:focus {
  outline: none;
}

html,
body {
  height: 100%;
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  padding-bottom: 100px;
  margin: 0;
  background-color: #ecfdf5;
}

.fx {
  display: flex;
}

.fx-justify-between {
  justify-content: space-between;
}

#info {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  color: #2d3667;
  font-size: 16px;
  text-align: center;
  padding: 14px;
  background-color: #f3f9f9;
}

form {
  position: absolute;
  margin: 5px auto 0 auto;
  z-index: 1;
  width: 240px;
}

#subcategory-select-btn {
  position: relative;
  /* Keep relative for absolute positioning of options */
  height: 30px;
  padding: 5px 5px;
  background-color: #fff;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #e2eded;
  border-color: #eaf1f1 #e4eded #dbe7e7 #e4eded;
  display: block;
  /* Ensure it takes full width */
  width: 228px;
  /* Same width as other elements */
  box-sizing: border-box;
  margin-top: 3px;
  /* Add consistent spacing between label and input */
}

#category-select-btn {
  position: relative;
  /* Keep relative for absolute positioning of options */
  height: 30px;
  padding: 5px 5px;
  background-color: #fff;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #e2eded;
  border-color: #eaf1f1 #e4eded #dbe7e7 #e4eded;
  display: block;
  /* Ensure it takes full width */
  width: 228px;
  /* Same width as other elements */
  box-sizing: border-box;
  margin-top: 3px;
  /* Add consistent spacing between label and input */
  margin-bottom: 0;
}

#category-checkbox-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

#subcategory-checkbox-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

#category-selected-value {
  font-size: 16px;
  line-height: 1;
  margin-right: 26px;
}

#subcategory-selected-value {
  font-size: 16px;
  line-height: 1;
  margin-right: 26px;
}

.option i {
  width: 16px;
  height: 16px;
}

.option,
.option-label {
  color: #2d3667;
  font-size: 12px;
}

.chevrons {
  position: absolute;
  /* Position them relative to the select button */
  top: 37%;
  right: 6px;
  /* Adjust spacing from the right */
  transform: translateY(-50%);
  /* Vertically center them */
  width: 16px;
  /* Adjust width as needed */
  height: 16px;
  /* Adjust height as needed */
  display: flex;
  /* Arrange icons within */
  flex-direction: column;
  /* Stack them vertically */
  justify-content: space-between;
  /* Space them out */
  align-items: center;
  /* Center them horizontally */
}

.chevrons i {
  display: block;
  /* Keep as block for individual styling */
  height: auto;
  /* Adjust height based on font-size */
  color: #d1dede;
  font-size: 12px;
  line-height: 1;
  /* Prevent extra space around the icon */
}

#category-checkbox-btn:checked+#category-select-btn .chevrons i,
#subcategory-checkbox-btn:checked+#subcategory-select-btn .chevrons i {
  color: #2d3667;
}


.options {
  position: absolute;
  left: 0;
  width: 250px;
}

#category-options {
  position: absolute;
  top: 42px;
  left: 100%;
  margin-left: 5px;
  background-color: #fff;
  border-radius: 4px;
  width: 230px;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#subcategory-options {
  position: absolute;
  top: 9px;
  left: 100%;
  margin-left: 5px;
  background-color: #fff;
  border-radius: 4px;
  width: 230px;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#category-checkbox-btn:checked~#category-options {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  border: 1px solid #e2eded;
  border-color: #eaf1f1 #e4eded #dbe7e7 #e4eded;
}

#subcategory-checkbox-btn:checked~#subcategory-options {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  border: 1px solid #e2eded;
  border-color: #eaf1f1 #e4eded #dbe7e7 #e4eded;
}

.option {
  position: relative;
  line-height: 1;
  transition: all 0.2s ease;
  cursor: pointer;
}

.option:active {
  transform: scale(0.98);
}

.option i {
  position: absolute;
  left: 14px;
  padding: 0;
  display: none;
  color: #95d5b2;
  transition: color 0.2s ease;
}

#category-checkbox-btn:checked~#category-options .option i {
  display: block;
  padding: 12px 0;
}

#subcategory-checkbox-btn:checked~#subcategory-options .option i {
  display: block;
  padding: 12px 0;
}

.option input[type="radio"]:checked~i {
  color: #2d6a4f;
  font-weight: 900;
}

.option-label {
  display: none;
  padding: 0;
  margin-left: 27px;
}

#category-checkbox-btn:checked~#category-options .option-label {
  display: block;
  padding: 12px 14px;
}

#subcategory-checkbox-btn:checked~#subcategory-options .option-label {
  display: block;
  padding: 12px 14px;
}

.option-radio-btn {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
}

.option-radio-btn.top {
  top: 0;
}

.option-radio-btn.bottom {
  bottom: 0;
}

input[type="radio"] {
  position: absolute;
  right: 0;
  left: 0;
  width: 100%;
  height: 50%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.option-radio-btn:hover~i {
  color: #40916c;
}

.option-radio-btn:hover {
  height: 100%;
  z-index: 1;
}

.option-radio-btn.bottom:hover+i {
  bottom: -25px;
  animation: moveup 0.3s ease 0.1s forwards;
}


@keyframes moveup {
  from {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}



.option-label {
  transition: 0.3s ease all;
}

.option-value {
  display: none;
}

.option input[type="radio"]:checked~.option-value {
  opacity: 1;
  transform: scale(1);
}

.option input[type="radio"]:checked~i {
  top: 0;
  bottom: auto;
  opacity: 1;
  animation: unset;
}

.option input[type="radio"]:checked~i,
.option input[type="radio"]:checked~.option-label {
  color: #2d6a4f;
  font-weight: 600;
}

.option input[type="radio"]:checked~.option-label:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: linear-gradient(135deg, #d8f3dc 0%, #b7e4c7 100%);
  border-radius: 6px;
  box-shadow: inset 0 1px 3px rgba(64, 145, 108, 0.15);
}

#category-checkbox-btn:not(:checked)~#category-options .option input[type="radio"]:checked~.option-value {
  top: -30px;
}

#subcategory-checkbox-btn:not(:checked)~#subcategory-options .option input[type="radio"]:checked~.option-value {
  top: 12px;
}

.option:nth-child(1) input[type="radio"]:checked~.option-label:before {
  border-radius: 6px;
}

.option:nth-child(1) input[type="radio"]:checked~.option-value {
  top: -31px;
}

.option:nth-child(2) input[type="radio"]:checked~.option-label:before {
  border-radius: 6px;
}

.option:nth-child(2) input[type="radio"]:checked~.option-value {
  top: -71px;
}

.option:nth-child(3) input[type="radio"]:checked~.option-label:before {
  border-radius: 6px;
}

.option:nth-child(3) input[type="radio"]:checked~.option-value {
  top: -111px;
}

.option:nth-child(4) input[type="radio"]:checked~.option-label:before {
  border-radius: 6px;
}

.option:nth-child(4) input[type="radio"]:checked~.option-value {
  top: -151px;
}

.option:nth-child(5) input[type="radio"]:checked~.option-label:before {
  border-radius: 6px;
}

.option:nth-child(5) input[type="radio"]:checked~.option-value {
  top: -191px;
}

.option:nth-child(6) input[type="radio"]:checked~.option-label:before {
  border-radius: 6px;
}

.option:nth-child(6) input[type="radio"]:checked~.option-value {
  top: -231px;
}

.option .fa-codepen {
  color: #000;
}

.option .fa-dribbble {
  color: #ea4c89;
}

.option .fa-behance {
  color: #0057ff;
}

.option .fa-hackerrank {
  color: #32c766;
}

.option .fa-stack-overflow {
  color: #f48024;
}

.option .fa-free-code-camp {
  color: #006400;
}

#category-option-bg {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 40px;
  transition: 0.3s ease all;
  z-index: 1;
  display: none;
}

#subcategory-option-bg {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 40px;
  transition: 0.3s ease all;
  z-index: 1;
  display: none;
}

#category-checkbox-btn:checked~#category-options #category-option-bg {
  display: block;
}

#subcategory-checkbox-btn:checked~#subcategory-options #subcategory-option-bg {
  display: block;
}

.option:hover .option-label {
  color: #2d6a4f;
  background: linear-gradient(135deg, #e8f5e9 0%, #d8f3dc 100%);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.option:hover~#category-option-bg,
.option:hover~#subcategory-option-bg {
  top: calc((var(--index) - 1) * 40px);
  background: linear-gradient(135deg, #e8f5e9 0%, #d8f3dc 100%);
  border-radius: 6px;
}

.option:first-child:hover {
  --index: 1;
  border-radius: 4px 4px 0 0;
}

.option:last-child:hover {
  --index: 6;
  border-radius: 0 0 4px 4px;
}

.leaflet-top .leaflet-control {
  margin-top: 58px !important;
}

.category-filter-block {
  margin-top: 5px;
}

/* Tag select dropdown styling */
#tagFilterForm {
  width: 229px !important;
  height: auto;
  min-height: 43px;
  box-sizing: border-box;
  margin-top: 3px;
}

#tagSelect {
  width: 229px !important;
  min-height: 30px !important;
  box-sizing: border-box;
}

.select2-container {
  width: 229px !important;
  min-height: 30px !important;
}

.select2-container .select2-selection {
  min-height: 30px !important;
  height: auto !important;
  min-height: 30px;
  border-radius: 4px !important;
  border: 1px solid #e2eded !important;
  border-color: #eaf1f1 #e4eded #dbe7e7 #e4eded !important;
  background: #fff !important;
}

.select2-container .select2-selection--multiple {
  min-height: 30px !important;
  height: auto !important;
  min-height: 34px;
}

.select2-container .select2-selection__rendered {
  line-height: 25px !important;
  padding: 2px 5px !important;
}

.select2-container .select2-selection__choice {
  margin: 2px !important;
  padding: 2px 5px !important;
  border-radius: 3px !important;
  background-color: #40916c !important;
  color: white !important;
  border: none !important;
}

.select2-container .select2-selection__choice__remove {
  color: white !important;
  margin-right: 3px !important;
}

.tag-pil {
  display: inline-block;
  padding: 3px 6px;
  margin: 3px;
  background-color: transparent;
  color: #f0f2f4;
  border: 2px solid #dadee3;
  /* Border around the pill */
  border-radius: 5px;
  /* Border radius */
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Clickable tag hover effect */
.tag-pil.clickable-tag:hover {
  background-color: #52b788;
  border-color: #52b788;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(82, 183, 136, 0.3);
}

.tag-pil.clickable-tag:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(82, 183, 136, 0.2);
}

/* Style for the media slide-up window */
.media-window {
  position: fixed;
  bottom: 0;
  left: 260px;
  width: calc(100% - 660px);
  max-height: 180px;
  /* Reduced from default to make it more compact */
  background: var(--media-window-bg);
  color: white;
  padding: 7px;
  transition: all 0.4s ease;
  z-index: 999;
  /* Below right-sidebar (z-index: 10000) */
  overflow: hidden;
  border-radius: 10px;
  /* Rounded corners */
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.media-window.open {
  opacity: 1;
}

/* When left sidebar is closed */
.media-window.sidebar-closed {
  left: 0;
  width: calc(100% - 400px);
}

/* When right sidebar is open */
.media-window.right-sidebar-open {
  width: calc(100% - 660px) !important;
  left: 260px !important;
}

/* When left sidebar closed but right sidebar open */
.media-window.sidebar-closed.right-sidebar-open {
  width: calc(100% - 400px) !important;
  left: 0 !important;
}

.media-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

/* Close button for the media window */
.close-media-window {
  position: absolute;
  top: 5px;
  right: 10px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  opacity: 0.8;
  transition: opacity 0.2s ease-in-out;
  text-decoration: none;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.3);
}

.close-media-window:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
}

.media-content {
  position: relative;
  overflow-x: auto;
  /* Enable horizontal scrolling */
  overflow-y: hidden;
  /* Prevent vertical scrollbar */
  padding: 10px 60px 15px 60px;
  /* Add side padding for navigation buttons */
  border-radius: 5px;
  scroll-behavior: smooth;
  /* We'll manage rounded corners on the parent */
}

.slider {
  display: flex;
  position: relative;
  transition: transform 0.3s ease-in-out;
  /* Keep the transition for button navigation */
  padding-bottom: 2px;
  /* Small padding to ensure scrollbar is fully visible */
}

.photo-slide,
.video-slide {
  flex: 0 0 auto;
  width: 250px;
  /* Reduced from 300px for more compact view */
  height: auto;
  margin-right: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.photo-slide:hover,
.video-slide:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.photo-slide:last-child,
.video-slide:last-child {
  margin-right: 0;
}

.photo-slide img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: inherit;
}

/* Photo info below thumbnails */
.photo-info {
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.photo-info .photo-date,
.photo-info .photo-photographer {
  font-size: 10px;
  color: #f0f0f0;
  line-height: 1.2;
}

.photo-info .photo-date {
  font-weight: 500;
}

.photo-info .photo-photographer {
  font-style: italic;
  opacity: 0.9;
}

.video-slide {
  position: relative;
  background: rgba(0, 0, 0, 0.5);
}

.video-slide::before {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
}

.video-slide:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
}

.video-slide iframe {
  display: block;
  width: 100%;
  height: 150px;
  border-radius: inherit;
  pointer-events: none;
}

/* Styles for WebKit browsers (Chrome, Safari, newer Edge) */
.media-content::-webkit-scrollbar {
  height: 6px;
  /* Adjust height of the scrollbar */
}

.media-content::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.7);
  /* Light white with some transparency */
  border-radius: 3px;
  /* Optional: rounded corners for the thumb */
}

.media-content::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.2);
  /* Darker background for the track */
  border-radius: 3px;
  /* Optional: rounded corners for the track */
}

/* Navigation buttons positioned individually to avoid blocking */
.slider-navigation {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  height: 50px;
  pointer-events: none;
  z-index: 1001;
}

.slider-navigation button {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 15px 20px;
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  border-radius: 8px;
  transition: all 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  min-width: 50px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-navigation button:first-child {
  left: 10px;
}

.slider-navigation button:last-child {
  right: 10px;
}

.slider-navigation button:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.slider-navigation button:active {
  transform: scale(0.95);
}

.slider-navigation button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.slider-navigation button:disabled:hover {
  transform: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

.social-media-sidebar {
  position: fixed;
  right: 162px;
  top: 85px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10002;
  padding: 5px;
  background-color: black;
  border: 1px solid black;
  border-radius: 5px;
  transform: translateX(0);
  transition: right 0.3s ease;
}

.social-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.social-wrapper a {
  margin-bottom: 3px;
  text-decoration: none;
  display: block;
}

.social-wrapper i {
  padding: 1px;
  text-shadow: 0px 7px 10px rgba(0, 0, 0, 0.4);
  transition: all ease-in-out 150ms;
}

.social-wrapper a:first-child i {
  color: #4867AA;
  /* Facebook */
}

.social-wrapper a:first-child i:hover {

  text-shadow: 0px 16px 10px rgba(0, 0, 0, 0.3);
  transform: translate(0, -3px);
}

.social-wrapper a:nth-child(2) i {
  color: #E1306C;
  /* Instagram */
}

.social-wrapper a:nth-child(2) i:hover {

  text-shadow: 0px 16px 10px rgba(0, 0, 0, 0.3);
  transform: translate(0, -3px);
}

.social-wrapper a:nth-child(3) i {
  color: #0077B5;
  /* LinkedIn */
}

.social-wrapper a:nth-child(3) i:hover {

  text-shadow: 0px 14px 10px rgba(0, 0, 0, 0.4);
  transform: translate(0, -2px);
}

.social-wrapper a:nth-child(4) i {
  color: #1DA1F2;
  /* Twitter */
}

.social-wrapper a:nth-child(4) i:hover {

  text-shadow: 0px 16px 10px rgba(0, 0, 0, 0.3);
  transform: translate(0, -3px);
}

/* Adjust icon size if needed */
.fa-5x {
  font-size: 2em;
  /* Adjust as needed */
}

.marker-button {
  margin-top: 8px;
  padding: 3px 5px;
  background-color: #40916c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.3s ease-in-out;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  position: relative;
}

.marker-button i {
  font-size: 16px;
}

/* Leaflet popup styling - desktop */
.leaflet-popup-content-wrapper {
  background: white;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
  margin: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.marker-button:hover {
  background-color: #2d6a4f;
}

/* Your existing CSS for .media-window, .slider, .photo-slide, etc. */

/* CSS for the large image slideshow */
/* Backdrop for large slideshow */
.large-slideshow-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10001;
  display: none;
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.large-slideshow-backdrop.active {
  display: block;
  pointer-events: auto;
}

.large-slideshow-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - 660px);
  /* Full width minus left sidebar (260px) and right sidebar (400px) */
  max-height: 80vh;
  height: auto;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  z-index: 10003;
  /* Above backdrop (10001) and right-sidebar (10000) */
}

.large-slideshow-container .mySlides {
  display: none;
  text-align: center;
  padding: 20px;
}

.large-slideshow-container .mySlides img {
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.large-slideshow-container .mySlides iframe {
  max-width: 100%;
  max-height: 75vh;
  width: calc(100vw - 700px);
  height: calc((100vw - 700px) * 0.56);
  /* 16:9 aspect ratio */
}

.large-slideshow-container .prev,
.large-slideshow-container .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  background-color: black;
  opacity: 0.6;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

.large-slideshow-container .next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.large-slideshow-container .prev:hover,
.large-slideshow-container .next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.large-slideshow-container .numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* Large photo info in slideshow */
.large-photo-info {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  border-radius: 6px;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.large-photo-info .photo-date,
.large-photo-info .photo-photographer {
  font-size: 12px;
  color: #f0f0f0;
  line-height: 1.4;
  text-align: center;
}

.large-photo-info .photo-date {
  font-weight: 600;
}

.large-photo-info .photo-photographer {
  font-style: italic;
  opacity: 0.95;
}

.large-slideshow-container .fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

/* Close button for large slideshow */
.close-large-slideshow {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  opacity: 0.8;
  transition: opacity 0.2s ease-in-out;
  text-decoration: none;
  z-index: 10001;
}

.close-large-slideshow:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.9);
}

@keyframes fade {
  from {
    opacity: .4
  }

  to {
    opacity: 1
  }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {

  /* Root font size - better readability */
  * {
    font-size: 14px;
  }

  /* Leaflet popup styling for mobile */
  .leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, #40916c 0%, #52b788 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 10px 12px;
  }

  .leaflet-popup-content {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
  }

  .leaflet-popup-content b {
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
  }

  .leaflet-popup-content strong {
    font-weight: 500;
    font-size: 11px;
  }

  .leaflet-popup-tip {
    background: linear-gradient(135deg, #40916c 0%, #52b788 100%);
  }

  /* Marker button - mobile smaller */
  .marker-button {
    margin-top: 6px;
    padding: 4px 8px;
    background-color: #2d6a4f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.3s ease-in-out;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    position: relative;
  }

  .marker-button i {
    font-size: 12px;
  }

  .marker-button:hover {
    background-color: #1b4332;
  }

  /* Navbar adjustments - taller for touch */
  nav {
    height: 50px;
  }

  /* Mobile view tabs - thinner */
  .view-tabs {
    top: 50px;
    height: 38px;
  }

  .view-tab {
    font-size: 12px;
  }

  .page-loader {
    top: 88px;
    height: calc(100% - 88px);
  }

  nav .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0 16px;
  }

  nav .logo .sidebar-logo-img {
    display: block;
  }

  .logo .logo-name {
    font-size: 16px;
    max-width: calc(100vw - 120px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-content form {
    width: 100%;
    height: 36px;
    margin-bottom: 10px;
  }

  #category-select-btn,
  #subcategory-select-btn {
    height: 28px;
    font-size: 13px;
    width: 100%;
  }

  #category-selected-value,
  #subcategory-selected-value {
    font-size: 13px;
  }

  /* Navbar stays full width */
  nav.open {
    width: 100%;
    left: 0;
  }

  /* Map stays full width */
  nav.open~#map {
    width: 100%;
    left: 0;
  }

  /* Overlay - hide on mobile so sidebar is usable */
  nav.open~.overlay {
    display: none;
  }

  /* Map container - adjust top position for mobile */
  #map {
    top: 88px !important;
    height: calc(100vh - 88px) !important;
    background-color: transparent !important;
  }

  /* Show the top nav when sidebar is open */
  nav.open {
    z-index: 300;
  }

  nav .menu-icon {
    font-size: 24px;
    left: 16px;
  }

  .logo .logo-name {
    font-size: 14px;
  }

  .sidebar-content {
    top: 88px;
    width: 100vw;
    height: calc(100vh - 88px);
    left: -100vw;
    padding: 20px 15px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  nav.open ~ .sidebar-content {
    left: 0;
  }

  .sidebar-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.95;
  }

  .sidebar-content form {
    width: 100%;
    height: auto;
    margin-bottom: 16px;
  }

  .search-container {
    width: 100%;
    height: 36px;
    padding: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: stretch;
    gap: 0;
    background: transparent;
    border: none;
  }

  .search-container input {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px 0 0 8px;
    border: none;
    height: 36px;
    box-sizing: border-box;
    background: #fff;
    outline: none;
  }

  .search-container input:focus {
    border: none;
  }

  .search-container button {
    padding: 0 12px;
    min-width: 36px;
    height: 36px;
    border-radius: 0 8px 8px 0;
    background: #2d6a4f;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .search-container button:active {
    background: #1b4332;
  }

  .search-container button i {
    font-size: 15px;
  }

  #category-select-btn,
  #subcategory-select-btn {
    height: 36px;
    font-size: 13px;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }

  #category-selected-value,
  #subcategory-selected-value {
    font-size: 13px;
  }

  #tagFilterForm {
    width: 100% !important;
    height: auto;
    min-height: 36px;
  }

  #tagSelect,
  .select2-container {
    width: 100% !important;
    min-height: 36px !important;
  }

  .select2-container .select2-selection {
    min-height: 36px !important;
    font-size: 13px;
    box-sizing: border-box;
    background: #fff !important;
  }

  .select2-container .select2-selection--multiple {
    min-height: 36px !important;
  }

  .select2-container .select2-selection__rendered {
    line-height: 28px !important;
    font-size: 12px;
    padding: 2px 8px !important;
  }

  /* Fix select2 inline search on mobile */
  .select2-container .select2-search--inline {
    float: left;
  }
  .select2-container .select2-search--inline .select2-search__field {
    width: auto !important;
    min-width: 100px;
    font-size: 13px;
    margin-top: 0;
    height: 28px;
  }

  .chevrons {
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
  }

  .chevrons i {
    font-size: 10px;
  }


  .option-label {
    font-size: 12px;
    padding: 8px 10px !important;
    margin-left: 20px;
  }

  /* Nav links */
  .nav-link {
    padding: 6px 8px;
    margin: 3px 0;
  }

  .nav-link .icon {
    font-size: 16px;
    margin-right: 10px;
  }

  .nav-link .link {
    font-size: 13px;
  }


  /* Category filters - full width */
  .sidebar-content form {
    position: relative;
    width: 100%;
    max-width: none;
    height: auto;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar-content form:last-child {
    border-bottom: none;
  }

  #category-select-btn,
  #subcategory-select-btn {
    position: relative;
    width: 100%;
    height: 36px;
    font-size: 13px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }

  #category-selected-value,
  #subcategory-selected-value {
    font-size: 13px;
    flex: 1;
  }

  /* Options panels - fixed overlay modal on mobile to prevent overlap */
  #category-options,
  #subcategory-options {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 90vw !important;
    max-width: 400px !important;
    max-height: 70vh !important;
    margin: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    z-index: 10002 !important;
    padding: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(0.9) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
  }

  #category-checkbox-btn:checked~#category-options,
  #subcategory-checkbox-btn:checked~#subcategory-options {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
    display: block !important;
  }

  /* Clear any interfering styles */
  #category-options *,
  #subcategory-options * {
    box-sizing: border-box;
  }

  /* Ensure options and labels are visible and properly styled */
  #category-checkbox-btn:checked~#category-options .option,
  #subcategory-checkbox-btn:checked~#subcategory-options .option {
    display: block !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #category-checkbox-btn:checked~#category-options .option-label,
  #subcategory-checkbox-btn:checked~#subcategory-options .option-label {
    display: block !important;
    padding: 18px 24px !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }

  /* Hide check icons in mobile view */
  #category-checkbox-btn:checked~#category-options .option i,
  #subcategory-checkbox-btn:checked~#subcategory-options .option i {
    display: none !important;
  }

  /* Hide option background elements in mobile */
  #category-option-bg,
  #subcategory-option-bg {
    display: none !important;
  }

  /* Lower z-index of checkbox overlays on mobile so they don't overlap modals */
  #category-checkbox-btn,
  #subcategory-checkbox-btn {
    z-index: 0;
  }

  /* Lower z-index of sidebar content so options panels can go above */
  .sidebar-content {
    z-index: 200;
  }

  /* Keep the open dropdown above everything */
  #category-checkbox-btn:checked~#category-options,
  #subcategory-checkbox-btn:checked~#subcategory-options {
    z-index: 99999 !important;
  }

  /* When a dropdown is open, hide other forms via CSS (backup to JS) */
  #category-checkbox-btn:checked~#category-select-btn,
  #category-checkbox-btn:checked~#category-options {
    z-index: 99999 !important;
  }
  #subcategory-checkbox-btn:checked~#subcategory-select-btn,
  #subcategory-checkbox-btn:checked~#subcategory-options {
    z-index: 99999 !important;
  }

  /* Ensure select2 container doesn't overlap the modal */
  .select2-container {
    z-index: 1 !important;
  }

  /* Fix select2 dropdown opening to the right/off-screen on mobile */
  .select2-dropdown {
    z-index: 100000 !important;
  }

  /* Dropdown header for mobile modal */
  #category-options::before {
    content: 'Kategori Seçin';
    display: block;
    padding: 16px;
    background: linear-gradient(135deg, #40916c 0%, #52b788 100%);
    color: white;
    font-weight: 600;
    font-size: 18px;
    border-radius: 12px 12px 0 0;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  #subcategory-options::before {
    content: 'Alt Kategori Seçin';
    display: block;
    padding: 16px;
    background: linear-gradient(135deg, #40916c 0%, #52b788 100%);
    color: white;
    font-weight: 600;
    font-size: 18px;
    border-radius: 12px 12px 0 0;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .option {
    border-bottom: 1px solid #e8f0ee;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .option:hover {
    background: #f0f9f4 !important;
  }

  .option:first-child {
    margin-top: 0;
  }

  .option:last-child {
    border-bottom: none;
    margin-bottom: 0;
    border-radius: 0 0 12px 12px;
  }

  .option-label {
    font-size: 16px !important;
    padding: 16px 20px !important;
    line-height: 1.5 !important;
    display: block !important;
    margin-left: 0 !important;
  }

  /* Make radio buttons more accessible */
  .option input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;
    pointer-events: auto !important;
  }

  /* Ensure option is clickable */
  .option {
    position: relative !important;
    cursor: pointer !important;
  }

  /* Chevron icons - better visibility */
  .chevrons {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .chevrons i {
    font-size: 12px;
    color: #40916c;
  }

}

/* RIGHT SIDEBAR - Full screen overlay (mobile only) */
@media (max-width: 768px) {
.right-sidebar {
  width: 100vw;
  height: calc(100vh - 130px);
  right: -100vw;
  top: 130px;
  padding: 60px 15px 15px 15px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 10000 !important;
}

.right-sidebar.show {
  right: 0;
  top: 299px;
  height: calc(100vh - 299px);
}

/* Hide overlay on mobile - sidebar is full screen */
.right-sidebar-overlay {
  display: none !important;
}

/* Right sidebar close button - only visible when sidebar is open on mobile */
.right-sidebar-close-btn {
  display: none !important;
  position: fixed;
  top: 4px;
  right: 4px;
  z-index: 10001;
}

/* Show close button when right sidebar has 'show' class */
body:has(.right-sidebar.show) .right-sidebar-close-btn {
  display: flex !important;
}
}

/* Location windows stack vertically */
.location-window {
  width: 100%;
  margin: 10px 0;
}

.location-window-header h3 {
  font-size: 18px;
}

/* SEARCH RESULTS PANEL */
#searchResultsPanel {
  width: 95vw;
  max-height: 80vh;
  padding: 20px 15px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#searchResultsPanel.show {
  transform: translate(-50%, -50%) scale(1);
}

#searchResultsPanel h3 {
  font-size: 20px;
  margin-top: 10px;
}

.search-result {
  padding: 15px;
  font-size: 16px;
}

#closeSearchPanelButton {
  width: 44px;
  height: 44px;
  font-size: 32px;
}

/* MEDIA WINDOW - Inside right sidebar on mobile */
.media-window.mobile-media {
  position: relative !important;
  width: 100% !important;
  left: auto !important;
  bottom: auto !important;
  max-height: none !important;
  padding: 10px !important;
  margin-top: 40px;
  z-index: 1 !important;
}

.media-window.mobile-media.sidebar-closed {
  width: 100% !important;
  left: auto !important;
}

.media-window.mobile-media .media-content {
  padding: 10px 10px 15px 10px !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

.media-window.mobile-media .slider {
  flex-direction: column !important;
  gap: 15px;
}

.media-window.mobile-media .photo-slide,
.media-window.mobile-media .video-slide {
  width: 100% !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}

.media-window.mobile-media .photo-slide img {
  width: 100% !important;
  height: auto !important;
  max-height: 300px !important;
  object-fit: cover;
}

.media-window.mobile-media .video-slide iframe {
  width: 100% !important;
  height: 250px !important;
}

.media-window.mobile-media .slider-navigation button {
  display: none !important;
}

.media-window.mobile-media .close-media-window {
  display: none !important;
}

/* Large slideshow */
.large-slideshow-container {
  width: 100vw;
  max-height: 90vh;
  padding: 10px;
}

.large-slideshow-container .mySlides {
  padding: 10px;
}

.large-slideshow-container .mySlides img {
  max-height: 80vh;
}

.large-slideshow-container .mySlides iframe {
  width: calc(100vw - 40px);
  height: calc((100vw - 40px) * 0.56);
}

.close-large-slideshow {
  width: 44px;
  height: 44px;
  font-size: 28px;
}

/* Social media sidebar - align with close button */
.social-media-sidebar {
  right: 15px;
  top: 60px;
  left: auto;
  transform: none;
}

/* Leaflet controls */
.leaflet-top .leaflet-control {
  margin-top: 60px !important;
}

/* Ensure zoom controls appear above sidebar */
.leaflet-control-zoom,
.leaflet-bar {
  z-index: 1000 !important;
}

.leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 20px;
}

/* Tag pills - mobile */
.tag-pil {
  font-size: 14px;
  padding: 3px 6px;
  margin: 3px 3px;
}

/* End of mobile media query (max-width: 768px) */

/* MOBILE LANDSCAPE */
@media (max-width: 768px) and (orientation: landscape) {
  .media-window {
    max-height: 50vh;
  }

  .right-sidebar {
    width: 70vw;
    right: -70vw;
  }

  .right-sidebar.show {
    right: 0;
  }
}

/* TABLET STYLES (769px - 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
  nav.open {
    width: calc(100% - 200px);
    left: 200px;
  }

  nav.open~#map {
    width: calc(100% - 200px);
    left: 200px;
  }

  nav.open~.overlay {
    left: 200px;
  }

  .right-sidebar {
    width: 350px;
  }

  .social-media-sidebar {
    right: 162px;
  }

  .media-window {
    width: calc(100% - 610px);
    left: 260px;
  }

  .media-window.sidebar-closed {
    width: calc(100% - 350px);
    left: 0;
  }

  .location-window {
    width: 330px;
  }

  .search-container,
  .sidebar-content form,
  #category-select-btn,
  #subcategory-select-btn {
    width: 180px;
  }

  #tagFilterForm {
    width: 180px !important;
  }

  #tagSelect,
  .select2-container {
    width: 180px !important;
  }
}

/* DESKTOP CONFIRMATION (1024px+) */
@media (min-width: 1024px) {
  /* All other dimensions remain as default */
}

/* TOUCH DEVICE OPTIMIZATIONS */
@media (hover: none) and (pointer: coarse) {

  button,
  .nav-link,
  .option,
  .search-result,
  .marker-button,
  .tag-pil {
    min-width: 44px;
    min-height: 44px;
  }

  button:active,
  .nav-link:active,
  .search-result:active {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
  }
}