/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap');

/* ----------------------------
   Base Styles
----------------------------- */
:root {
  --primary: #202945;
  --accent: #ffb600;
  --background: #dce2eb;
  --text-color: #202945;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--background);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #dce2eb;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23cfd5dd' stroke-width='0.4'%3E%3Cpath d='M0 20 H200 M0 40 H200 M0 60 H200 M0 80 H200 M0 100 H200 M0 120 H200 M0 140 H200 M0 160 H200 M0 180 H200 M0 200 H200 M20 0 V200 M40 0 V200 M60 0 V200 M80 0 V200 M100 0 V200 M120 0 V200 M140 0 V200 M160 0 V200 M180 0 V200 M200 0 V200' /%3E%3C/g%3E%3C/svg%3E");
}

/* ----------------------------
   Typography
----------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--primary);
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover,
a:focus,
a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  outline: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

/* ----------------------------
   Navbar
----------------------------- */
.navbar-custom {
  background: linear-gradient(135deg, #202945, #2a355f);
  border-bottom: 2px solid #16233b;
  box-shadow: 0 4px 12px rgba(32, 41, 69, 0.45);
  font-weight: 600;
  letter-spacing: 0.04em;
  user-select: none;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
  color: #fff !important;
  transition: color 0.3s ease-in-out;
}

.navbar-custom .nav-link:hover {
  color: var(--accent) !important;
  text-decoration: underline;
}

.navbar-custom .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease-in-out;
}

.navbar-custom .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* ----------------------------
   Logo Styling
----------------------------- */
.navbar-logo,
.hero-logo {
  border: 2px solid black;
  background-color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

.navbar-logo {
  border: 0px solid black;
  height: 40px;
  width: 40px;
  margin-right: 10px;
}

.navbar-logo img,
.hero-logo img {
  height: 80%;
  width: 80%;
  object-fit: contain;
  display: block;
}

.hero-logo {
  padding-left: 5px;
  height: 130px;
  width: 130px;
}

/* ----------------------------
   Main Content
----------------------------- */
main {
  flex: 1;
  padding: 2rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}

.hero-title h1 {
  font-size: 3rem;
  margin: 0;
}

/* ----------------------------
   Map Section
----------------------------- */
#map {
  flex: 1;
  width: 100%;
}

/* ----------------------------
   Leaflet Marker Styling
----------------------------- */
.leaflet-interactive.dot-marker {
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.15));
  transition: filter 0.3s ease;
  cursor: pointer;
}

.leaflet-interactive.dot-marker:hover {
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3));
}

/* ----------------------------
   Pop-up Styling
----------------------------- */
.popup-card {
  max-width: 600px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.popup-image-container {
  position: relative;
  display: inline-block;
}

.popup-image-container img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: pointer;
}

.magnify-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(32, 41, 69, 0.75);
  color: #fff;
  font-size: 1.1rem;
  padding: 8px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.magnify-icon i {
  color: #fff;
}

.popup-image-container:hover .magnify-icon {
  transform: scale(1.1);
}

.popup-body {
  padding: 1rem 1.25rem;
}

.popup-body h6 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.popup-body p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.popup-body p strong {
  display: inline-block;
  width: 130px;
  font-weight: 600;
}

/* ----------------------------
   Badges
----------------------------- */
.badge {
  font-weight: 600;
  padding: 0.4em 0.75em;
  font-size: 0.85rem;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.badge-himalayan-yes {
  background-color: #dc3545;
  color: #fff;
  box-shadow: 0 0 6px #dc354580;
}

.badge-himalayan-no {
  background-color: #198754;
  color: #fff;
  box-shadow: 0 0 6px #19875480;
}

.badge-himalayan-unknown {
  background-color: #6c757d;
  color: #fff;
  box-shadow: 0 0 6px #6c757d80;
}

/* ----------------------------
   Buttons
----------------------------- */
button,
.btn {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid transparent;
  padding: 0.4rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2a355f);
  color: #fff;
  border: none;
  box-shadow: 0 4px 8px rgba(32, 41, 69, 0.4);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #2a355f, var(--primary));
  box-shadow: 0 6px 12px rgba(32, 41, 69, 0.6);
}

button:disabled,
.btn:disabled {
  color: #6c757d;
  border-color: transparent;
  cursor: not-allowed;
  box-shadow: none;
}

/* ----------------------------
   Media Queries
----------------------------- */
@media (max-width: 576px) {
  .hero-title h1 {
    font-size: 2.2rem;
  }
  .hero-logo {
    height: 100px;
    width: 100px;
  }
}

/* ----------------------------
   Marker Cluster Styling (updated)
----------------------------- */
.marker-cluster {
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #f0f0f0, #d9d9d9) !important;
  color: white !important;
  border: 3px solid white !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.15),
    inset 0 -3px 6px rgba(255,255,255,0.6) !important;
  cursor: pointer !important;
  user-select: none !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
}

.marker-cluster-red {
  background: linear-gradient(145deg, #f25f5c, #d9433a) !important;
  box-shadow:
    0 2px 8px rgba(210, 45, 45, 0.75) !important,
    inset 0 -3px 6px rgba(255, 255, 255, 0.6) !important;
}

.marker-cluster-green {
  background: linear-gradient(145deg, #51c878, #3ca85d) !important;
  box-shadow:
    0 2px 8px rgba(40, 150, 65, 0.75) !important,
    inset 0 -3px 6px rgba(255, 255, 255, 0.6) !important;
}
