/*SVG Map -Background Overlay Image and Labels*/
.svg-map-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;       /* Adjust as needed */
    height: 0;
    aspect-ratio: 1000 / 367; /* Keep aspect ratio of SVG */
    margin: 0 auto;
    padding-bottom: 45%;
    background-image: url('/wp-content/uploads/2025/05/Community.jpg'); /* your overlay image */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    overflow: visible;
    z-index: 1;
}
  
/* Semi-transparent white overlay */
.svg-map-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
}
  
/* SVG container */
.svg-map-inner {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
}
  
.svg-map-inner svg {
    width: 90%;
    height: 90%;
    display: block;
    pointer-events: auto;
}

.svg-map-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
    padding: 50px;
}

.svg-map-header .stats {
    color: rgb(0, 0, 0);
    display: flex;
    flex-wrap: wrap; /* Changed to vertical layout to match <br> in HTML */
    gap: 10px;
    align-items: center;
    font-size: 30px;
    text-align: center;
  }
  
  .office-stats {
    position: relative;
    display: inline-block;
    margin: 10px auto;
  }
  
  .office-stats::after {
    content: "";
    display: block;
    width: 40%;
    height: 5px;
    background-color: #fcb714;
    margin: 8px auto 0 auto;
  }
  
  /* For medium devices (tablets/small desktops) */
  @media (min-width: 456px) and (max-width: 1200px) {
    .svg-map-header .stats {
      font-size: 18px;
      gap: 6px;
    }
  
    .office-stats::after {
      height: 3px;
      margin-top: 6px;
    }
  }
  
  /* For smaller devices (phones) */
  @media (max-width: 455px) {
    .svg-map-header .stats {
      font-size: 12px;
      gap: 3px;
    }
  
    .office-stats::after {
      height: 2px;
      margin-top: 4px;
    }
  }  

/* Region label base style */
.region-label {
    position: absolute;
    padding: 6px 12px;
    color: #fff;
    font-weight: bold;
    border-radius: 4px;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 3;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%);
}
  
/* Position adjustments for labels */
.label-central {
    top: 75%;
    left: 55%;
    /*background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), #339933;*/
    background: rgba(0, 0, 0, 0.6)
}
  
.label-western {
    top: 50%;
    left: 25%;
    /*background-color: #fcb714;*/
    background: rgba(0, 0, 0, 0.6)
}
  
.label-eastern {
    top: 55%;
    left: 80%;
    /*background-color: #f68b1d;*/
    background: rgba(0, 0, 0, 0.6)
}
  
@media (max-width: 768px) {
    .label-central, .label-western, .label-eastern {
      font-size: 10px;
    }
}

.district {
    /*fill: #187007;*/
    stroke: #fff;
    stroke-width: 1;
    cursor: pointer;
    transition: fill 0.3s ease, transform 0.2s ease;
    transform-origin: center;
}

.district:hover,
.district:focus {            
  transform: scale(1.05);     /* Slight zoom on hover */
  filter: drop-shadow(0 0 5px rgb(0, 0, 0)); /* Soft shadow */
}

/* Western Bhutan - Yellow */
.district[data-region="western"] {
    fill: #fcb714;
}

/* Central Bhutan - Green */
.district[data-region="central"] {
    fill: #339933;
}

/* Eastern Bhutan - Orange */
.district[data-region="eastern"] {
    fill: #f78d1f;
}

.district:hover {
    fill: #ffffff;
    transform: scale(1.02);
    opacity: 0.6;
}

.bhutan-map-tooltip {
    position: absolute; /* IMPORTANT */
    pointer-events: none;
    background-color: rgba(0,0,0,0.85);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    word-wrap: break-word;         /* older syntax */
    overflow-wrap: break-word;     /* modern syntax */
    white-space: normal;           /* allow wrapping */
    display: none;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

@media screen and (max-width: 600px) {
    .bhutan-map-tooltip {
      font-size: 10px;
      max-width: 160px;
      padding: 6px 10px;
    }
}

