.sigi-map.container {
  position: relative;
  width: 100%;
  margin: 20px auto;
  /* overflow: hidden; */
}

.sigi-map .main-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 0px 0px 0px 20px;
  border: 1px solid #ccc;
  max-width: 100%;
  position: relative;
}

.sigi-map .logo {
  width: auto;
  height: 200%;
  aspect-ratio: 1;
  object-fit: cover;
}

.sigi-map .content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
}

.sigi-map .copyrights {
  position: absolute;
  bottom: 10px;
  font-size: 12px;
  color: #000;
  margin: 0px auto;
  text-align: center;
  width: 100%;
}

.sigi-map .slide-ins {
  position: absolute;
  top: 50%;
  right: 0px;
  transform: translate(calc(100% - 84px), -50%);
  width: max-content;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.sigi-map .slide-in {
  background-color: #a9da74;
  color: #000;
  width: 240px;
  height: max-content;
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
  gap: 10px;
}

.sigi-map .slide-in.active {
  transform: translate(calc(-100% + 84px), 0);
}

.sigi-map .slide-in.active a:hover {
  color: #fff !important;
}

.sigi-map.container a {
  color: #000;
  text-decoration: none;
}

.sigi-map.container:has(.slide-in) a {
  font-size: 1.5em;
}

.sigi-map .headings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
  margin: 20px 0px
}

.sigi-map .headings .item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #ccc;
}

.sigi-map .headings .item.last {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
}

.sigi-map .headings .item h3 {
  cursor: pointer;
}

.sigi-map .headings .item h3.dark {
  color: #000000 !important;
}

.sigi-map .headings .item h3.dark:hover,
.sigi-map .headings .item h3.dark.active {
  color: #000000;
  /* dark */
}

.sigi-map .headings .item h3.blue:hover,
.sigi-map .headings .item h3.blue.active {
  color: #0070c0;
  /* blue */
}

.sigi-map .headings .item h3.green:hover,
.sigi-map .headings .item h3.green.active {
  color: #92d050;
  /* green */
}

.sigi-map .headings .item h3.green.darkgreen:hover,
.sigi-map .headings .item h3.green.darkgreen.active {
  color: #0d7658;
  /* dark green */
}

.sigi-map .circle {
  width: 24px;
  height: 24px;
  aspect-ratio: 1/1;
  border-radius: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.sigi-map .headings .item:has(h3.active) .circle::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6L9 17L4 12' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.sigi-map .circle.dark {
  background-color: #000000;
  /* dark */
}

.sigi-map .circle.blue {
  background-color: #0070c0;
  /* blue */
}

.sigi-map .circle.green {
  background-color: #92d050;
  /* green */
}

.sigi-map .circle.green.darkgreen {
  background-color: #0d7658;
  /* dark green */
}

.sigi-map .map-container {
  position: relative;
  width: 100%;
  margin: 0px auto;
  height: max-content;
}

.sigi-map .map-image {
  width: 100%;
  display: block;
}

.sigi-map .icon i {
  font-size: 38px;
  transition: transform 0.3s;
}

@media (max-width: 1023px) {

  .sigi-map .main-container {
    flex-direction: column-reverse !important;
    padding: 0px !important;
    padding-bottom: 40px !important;
    max-width: 100vw !important;
    border: none;
  }

  .sigi-map .content {
    padding: 16px !important;
  }

  .sigi-map .copyrights {
    font-size: 12px !important;
    position: relative;
    bottom: auto;
  }

  /* Add these rules to scale down map markers */
  .sigi-map .icon i {
    font-size: 24px !important;
    /* Reduced from 38px */
  }

  .sigi-map .icon .fas.fa-map-marker-alt {
    font-size: 32px !important;
    /* Reduced from 48px */
  }

  .sigi-map .slide-ins {
    transform: translate(calc(100% - 72px), -50%) !important;
  }

  .sigi-map .slide-in {
    padding: 5px !important;
  }

  .sigi-map .slide-in.active {
    transform: translate(calc(-100% + 72px), 0);
  }
}

.sigi-map .row.row-main:has(.map-container),
.sigi-map .container:has(.map-container) {
  margin: 0px !important;
  max-width: 100% !important;
}

/* ========================================================== */
/* GENERAL DOCUMENT & LAYOUT STYLES                           */
/* ========================================================== */
body {
  margin: 0;
  padding: 0;
}

.sigi-map.container {
  width: 100%;
  margin: 20px auto;
  overflow: hidden;
}

.sigi-map .main-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 0 0 0 20px;
  border: 1px solid #ccc;
  max-width: 100%;
  position: relative;
}

.sigi-map .map-container {
  position: relative;
  width: 100%;
  height: max-content;
  margin: 0 auto;
}

.sigi-map #distributor-map {
  height: 100vh;
  width: 100%;
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
}

.leaflet-popup-tip {
  background: transparent !important;
  border-top: 10px solid white !important;
  border-right: 10px solid transparent !important;
  border-left: 10px solid transparent !important;
}

/* Popup content styles */
.popup-info {
  font-family: Arial, sans-serif;
  padding: 10px;
  max-height: 100%;
  overflow-y: auto;
}

.popup-info .title {
  background-color: #0d7658;
  color: white;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
}

.popup-info .title strong {
  font-size: 1.5em;
}

.popup-info .detail {
  display: flex;
  flex-direction: row;
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.popup-info .detail .left {
  width: 32%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.popup-info .detail .right {
  width: 66%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popup-info .image img {
  max-width: 100%;
  height: auto;
}

.popup-info .website a.popup-button {
  display: block;
  color: #0d7658;
  border: 2px solid #0d7658;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.popup-info .website a.popup-button:hover {
  background-color: #0d7658;
  color: white;
}

.popup-info .contacts ul {
  padding: 0 0 0 20px !important;
  margin: 0;
}

.popup-info .contacts ul li {
  margin-bottom: 8px;
}

.popup-info .heading {
  font-weight: bold;
  margin-bottom: 5px;
}

/* ========================================================== */
/* FULLSCREEN MOBILE POPUP FIX                                */
/* ========================================================== */

.leaflet-popup.fullscreen-mobile {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  z-index: 1000 !important;
  position: fixed !important;
}

.leaflet-popup.fullscreen-mobile .leaflet-popup-content-wrapper {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.leaflet-popup.fullscreen-mobile .leaflet-popup-tip-container {
  display: none;
}

.leaflet-popup.fullscreen-mobile .popup-info {
  height: 100%;
  padding: 20px !important;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leaflet-popup.fullscreen-mobile .popup-info .detail {
  flex-direction: column;
}

/* Responsive styles for close button */
a.leaflet-popup-close-button {
  top: -5px !important;
  right: -5px !important;
  border: 2px solid #0d7658 !important;
  border-radius: 50% !important;
  line-height: 1em !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  background-color: white !important;
  padding: 0px !important;
  margin: 0px !important;
  z-index: 1001 !important;
  width: 30px !important;
  height: 30px !important;
  /* Ensures button is on top of popup */
}

a.leaflet-popup-close-button:hover {
  background-color: #0d7658 !important;
  color: white !important;
  text-decoration: none !important;
}

a.leaflet-popup-close-button span {
  font-size: 24px !important;
  color: #0d7658 !important;
  line-height: 1em !important;
  padding: 0px 0px 2px 0px !important;
  margin: 0px !important;
}

a.leaflet-popup-close-button:hover span {
  color: white !important;
}

/* ========================================================== */
/* RESPONSIVE STYLES                                          */
/* ========================================================== */
@media (max-width: 1023px) {

  .popup-info {
    font-size: 16px !important;
  }

  .popup-info .detail .left {
    width: 100% !important;
  }

  .popup-info .detail .right {
    width: calc(100% - 32px) !important
  }

  .sigi-map #distributor-map {
    height: 60vh;
  }

  .leaflet-popup-content {
    width: 100% !important;
    height: 100% !important;
  }

  .leaflet-popup {
    transform: none !important;
  }

  .container:has(.leaflet-popup.leaflet-zoom-animated.fullscreen-mobile) {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
  }

  #wrapper:has(.leaflet-popup.leaflet-zoom-animated.fullscreen-mobile),
  #main:has(.leaflet-popup.leaflet-zoom-animated.fullscreen-mobile),
  .col:has(.leaflet-popup.leaflet-zoom-animated.fullscreen-mobile),
  .col-inner:has(.leaflet-popup.leaflet-zoom-animated.fullscreen-mobile) {
    position: unset !important;
  }

  #distributor-map:has(.leaflet-popup.leaflet-zoom-animated.fullscreen-mobile) {
    height: 100vh !important;
  }

  .leaflet-popup.fullscreen-mobile {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999998 !important;
  }

  .leaflet-popup-content {
    width: 100% !important;
    height: 100% !important;
  }

  .leaflet-popup {
    transform: none !important;
  }

  a.leaflet-popup-close-button {
    top: 5px !important;
    right: 5px !important;
    position: fixed !important;
    width: 24px !important;
    height: 24px !important;
  }

  a.leaflet-popup-close-button span {
    padding: 0px !important;
  }
}

@media (min-width: 1024px) {
  .leaflet-popup.fullscreen-mobile {
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    width: 600px !important;
    height: auto !important;
    transform: translate(-50%, -50%);
  }

  .leaflet-popup.fullscreen-mobile .leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
  }

  .leaflet-popup.fullscreen-mobile .leaflet-popup-tip-container {
    display: block;
  }

  .leaflet-popup.fullscreen-mobile .popup-info {
    height: auto;
  }
}

.leaflet-popup-tip {
  background: white !important;
  border-top: unset !important;
  border-right: unset !important;
  border-left: unset !important;
}

.container:has(.sigi-map),
.row:has(.sigi-map),
.sigi-map.container {
  max-width: 100% !important;
}