/* ===== TRAVEL MAP ===== */

body {
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  background-color: var(--color-page-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow: hidden;
}

.header {
  text-align: center;
  padding: 16px 20px;
  background-color: var(--color-section-bg);
  border-bottom: 1px solid var(--color-section-border);
  position: relative;
  z-index: 100;
}

.header h1 {
  color: var(--color-title-text);
  margin: 0 0 4px;
  font-size: 1.5rem;
}

.header p {
  color: var(--color-footer-text);
  font-size: 0.9rem;
  margin: 0;
}

.admin-link,
.gallery-link {
  position: absolute;
  right: 20px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  z-index: 101;
}

.gallery-link {
  top: 16px;
}

.admin-link {
  top: 44px;
}

.admin-link:hover,
.gallery-link:hover {
  text-decoration: underline;
}

.travel-home-link {
  position: absolute;
  left: 20px;
  top: 20px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  z-index: 101;
}

.travel-home-link:hover {
  text-decoration: underline;
}

.map-container {
  position: relative;
  height: calc(100vh - 100px);
  width: 100%;
}

#map {
  height: 100%;
  width: 100%;
  z-index: 1;
}

/* ---- Custom marker ---- */
.custom-marker {
  background: none;
  border: none;
}

.marker-pin {
  width: 30px;
  height: 30px;
  position: relative;
  background: linear-gradient(135deg, #0070f3 0%, #7928ca 100%);
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 20%);
  box-shadow: 0 2px 8px rgb(0 0 0 / 50%);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.marker-pin::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #7928ca;
  transform: translateX(-50%);
}

.custom-marker:hover .marker-pin {
  transform: scale(1.15);
}

/* ---- Travel line ---- */
.travel-line {
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 30%));
}

.arrow-marker {
  background: none;
  border: none;
}

/* ---- Marker clusters ---- */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: linear-gradient(135deg, #0070f3 0%, #7928ca 100%) !important;
  box-shadow: 0 3px 8px rgb(0 0 0 / 40%) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: linear-gradient(135deg, #0070f3 0%, #7928ca 100%) !important;
  color: #fff !important;
  font-weight: 600 !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

/* ---- Sidebar ---- */
.sidebar {
  position: absolute;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background-color: var(--color-section-bg);
  border-left: 1px solid var(--color-section-border);
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.25s ease;
}

.sidebar.hidden {
  transform: translateX(100%);
}

.sidebar-header {
  padding: 16px 20px;
  background-color: var(--color-card-bg);
  border-bottom: 1px solid var(--color-section-border);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-title-text);
  flex-grow: 1;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--color-footer-text);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.15s ease;
}

.sidebar-close:hover {
  color: var(--color-title-text);
}

.sidebar-content {
  padding: 20px;
}

.sidebar-picture {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-section-border);
}

.sidebar-picture:last-child {
  border-bottom: none;
}

.sidebar-picture img {
  width: 100%;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.sidebar-picture img:hover {
  opacity: 0.9;
}

.sidebar-picture .picture-description {
  color: var(--color-text);
  margin: 8px 0 4px;
  font-style: italic;
}

.sidebar-picture .picture-date {
  color: var(--color-yellow);
  font-size: 0.875rem;
  margin: 4px 0 0;
}

/* ---- Modal ---- */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 90%);
}

.modal-content {
  display: block;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: var(--color-title-text);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--color-footer-text);
}

@media (width <= 768px) {
  .sidebar {
    width: 100%;
    max-width: 100%;
  }

  .header h1 {
    font-size: 1.2rem;
  }

  .header p {
    font-size: 0.85rem;
  }

  .admin-link,
  .gallery-link,
  .travel-home-link {
    position: static;
    display: inline-block;
    margin: 8px 10px 0 0;
    font-size: 0.875rem;
  }

  .map-container {
    height: calc(100vh - 120px);
  }
}
