
/* Task 1: Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f2f0ec;
  overflow: hidden;
}

/* --- HEADER / TOP BAR --- */
.top-bar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #FFFFFF;
  color: #111827;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.top-bar-left {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.1s;
}

.brand-logo:hover {
  opacity: 0.8;
}

/* --- DESKTOP NAVIGATION --- */
.top-bar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.nav-link {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #111827;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  background-color: #f3f4f6;
  color: #6045a0;
}

.icon {
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* SVG Icon Styling - Desktop Specifics */
.nav-link .icon svg {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  transition: stroke 0.2s ease;
  color: #111827; /* Inherit logic */
}

/* Desktop Hover Effects */
.nav-link:hover .icon svg {
  stroke: #6045a0;
}

/* Specific override for meléti logo to always keep its color or allow hover */
/* Task requires meléti icon to keep color #6045a0 */
.nav-link .icon svg[stroke="#6045a0"] {
  stroke: #6045a0 !important;
}

/* SVG Icon Styling - General (Mobile fallback) */
.icon svg {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  transition: stroke 0.2s ease;
}

/* --- HAMBURGER MENU BUTTON --- */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s ease;
  color: #6045a0;
}

.hamburger-menu:hover {
  transform: scale(1.05);
}

.hamburger-icon {
  width: 32px;
  height: 32px;
  display: block;
}

/* --- MOBILE MENU OVERLAY --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #FFFFFF;
  z-index: 100;
  overflow-y: auto;
  flex-direction: column;
}

.mobile-menu.active {
  display: flex;
  animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-logo {
  height: 40px;
  width: auto;
}

.close-menu {
  background: #f3f4f6;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111827;
  font-size: 24px;
  transition: background-color 0.2s;
}

.close-menu:hover {
  background: #e5e7eb;
}

.mobile-menu-list {
  list-style: none;
  padding: 16px 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.mobile-menu-list li {
  width: 100%;
}

.mobile-menu-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  text-decoration: none;
  color: #111827;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  background: #f3f4f6;
  margin: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-menu-list a:hover {
  background: #e5e7eb;
  color: #6045a0;
  transform: translateX(4px);
}

.mobile-menu-list a:hover .icon svg {
  stroke: #6045a0;
}

/* Mobile specific icon sizing to override any deskop rules if needed */
.mobile-menu-list .icon svg {
  width: 24px;
  height: 24px;
}

.mobile-menu-list .icon {
  margin-right: 0; /* Gap handled by parent flex container */
  min-width: 24px;
}

/* --- MAP --- */
#map {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
}

/* --- MARKERS --- */
@keyframes pulse-scale {
  0% { transform: scale(1); }
  50% { transform: scale(0.85); }
  100% { transform: scale(1); }
}

.marker {
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.marker:hover {
  transform: scale(0.85) translateY(-2px);
  z-index: 10;
  animation-play-state: paused;
}

.marker-core {
  width: 16px;
  height: 16px;
  background-color: #888;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 5px 6px rgba(0, 0, 0, 0.3);
  animation: pulse-scale 0.999s ease-in-out infinite;
}

/* --- TOOLTIP / POPUP --- */
.mapboxgl-popup-content {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.mapboxgl-popup-tip {
  display: none;
}

.marker-tooltip {
  background: rgba(0, 0, 0, 0.7);
  color: #f2f0ec;
  padding: 12px;
  border-radius: 8px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: left;
  backdrop-filter: blur(4px);
}

.marker-tooltip h3 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.marker-tooltip p {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #e5e7eb;
}

.marker-button {
  display: block;
  text-align: center;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 11px;
  margin-top: 5px;
  background: #6045a0;
  color: white;
  transition: opacity 0.2s;
}

.marker-button:hover {
  opacity: 0.9;
}

/* --- LEGEND FOOTER --- */
.legend-footer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.legend-content {
  display: flex;
  gap: 24px;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 640px) {
  /* Hide desktop nav */
  .top-bar-right {
    display: none;
  }

  /* Show hamburger menu */
  .hamburger-menu {
    display: block;
  }

  /* Adjust header padding */
  .top-bar {
    padding: 8px 16px;
  }

  .brand-logo {
    height: 32px;
  }

  /* Adjust map position */
  #map {
    top: 50px;
  }

  /* Adjust footer */
  .legend-footer {
    bottom: 16px;
    width: auto;
    padding: 6px 12px;
  }

  .legend-content {
    gap: 16px;
  }

  .legend-item {
    font-size: 11px;
  }
}
