/*
 * Nederland Kaart Block Styles
 * @author The Goodplace
 * @package The Goodplace
 */

/* Base Styles */
.nederland-map-block {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 4rem 0;
}

.nederland-map-block .map-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.nederland-map-block .map-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-shark);
}

.nederland-map-block .map-description {
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 500px;
}

/* Institutions Grid */
.institutions-grid {
  margin-top: 2rem;
}

.institution-card {
  background: white;
  border-radius: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
  aspect-ratio: 1/1;
  display: flex;
  width: 120px;
  height: 120px;
  padding: 0 18.555px 0 19.22px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 4px;
}

.institution-card:hover {
  outline-offset: 1px;
  border: 2px solid #fc7465a0;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.institution-card.active {
  transform: scale(1.02);
  outline-offset: 1px;
  border: 2px solid #fc7465;
}

.institution-logo-wrapper {
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.institution-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.institution-placeholder {
  width: 50px;
  height: 50px;
  background: #e9ecef;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #6c757d;
  font-size: 1rem;
}

/* Map Container */
.map-container {
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
  aspect-ratio: 4/5;
}

.nederland-map {
  width: 100%;
  height: 100%;
  position: relative;
}

.nederland-map svg {
  width: 100%;
  height: 100%;
  /* filter: hue-rotate(160deg) saturate(0.8) brightness(1.1); */
  transition: all 0.3s ease;
}

/* Map Dots */
.map-dots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #fc7465;
  border: 1px solid #fc7465;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
  pointer-events: all;
  z-index: 10;
}

.map-dot:hover {
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 4px 15px rgba(252, 116, 101, 0.4);
}

.map-dot.active {
  transform: translate(-50%, -50%) scale(1.5);
  box-shadow: 0 0 0 4px rgba(252, 116, 101, 0.3);
  z-index: 15;
}

.map-dot:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(252, 116, 101, 0.5);
}

/* Tooltip */
.map-tooltip {
  position: absolute;
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-shark);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 20;
  white-space: nowrap;
}

.map-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid white;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .nederland-map-block {
    padding: 3rem 0;
  }

  .nederland-map-block .map-title {
    font-size: 2.5rem;
    text-align: center;
  }

  .nederland-map-block .map-description {
    text-align: center;
    margin: 0 auto 2rem;
  }

  .map-container {
    margin-top: 3rem;
  }

  .institution-card {
    height: 70px;
  }
}

@media (max-width: 767.98px) {
  .nederland-map-block {
    padding: 2rem 0;
  }

  .nederland-map-block .map-title {
    font-size: 2rem;
  }

  .nederland-map-block .map-description {
    font-size: 1rem;
  }

  .institution-card {
    height: 60px;
    padding: 0.75rem;
  }

  .map-dot {
    width: 14px;
    height: 14px;
  }

  .map-tooltip {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 575.98px) {
  .institutions-grid .col-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .institution-card {
    height: 50px;
    padding: 0.5rem;
  }

  .map-dot {
    width: 12px;
    height: 12px;
  }
}

/* Animation Enhancements */
/* .has-animation .institution-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
} */

/* .has-animation .institution-card.aos-animate {
    opacity: 1;
    transform: translateY(0);
} */

.has-animation .map-dot {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: all 0.6s ease;
}

.has-animation .map-dot.animate-in {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Focus States for Accessibility */
.institution-card:focus {
  outline-offset: 2px;
}

.map-dot:focus {
  outline-offset: 2px;
}

/* Loading States */
.institution-card.loading {
  opacity: 0.7;
  pointer-events: none;
}

.institution-card.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #fc7465;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Hover Effects */
/* .institution-card:hover .institution-logo {
    transform: scale(1.05);
} */

/* .nederland-map:hover svg {
    filter: hue-rotate(160deg) saturate(1) brightness(1.2);
} */

/* Connection Lines (Optional Enhancement) */
.map-connection-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, #fc7465, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.institution-card.active ~ .map-container .map-connection-line {
  opacity: 0.6;
}
