*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

#urt-map-app{
  width:100%;
}

#urt-map-app .app{
  width:100%;
  min-height:760px;

  display:grid;
  grid-template-columns:minmax(700px,1fr) 360px;

  gap:30px;

  background:linear-gradient(
    135deg,
    #e9eef8 0%,
    #d8dfed 100%
  );

  padding:30px;
}

#urt-map-app .map-container{
  position:relative;
  width:100%;
  height:100%;
  padding:28px;
}

#urt-map-app svg{
  width:100%;
  height:100%;
  display:block;
}



#urt-map-app .department.active{
  fill:#2f64c4;
  filter:drop-shadow(0 8px 12px rgba(47,100,196,.35));
}

#urt-map-app .pin{
  pointer-events:none;
}

#urt-map-app .pin-halo{
  animation:pulse 1.8s infinite;
  transform-origin:center;
  transform-box:fill-box;
}

@keyframes pulse{
  0%{
    transform:scale(.75);
    opacity:.65;
  }

  70%{
    transform:scale(1.5);
    opacity:0;
  }

  100%{
    transform:scale(.75);
    opacity:0;
  }
}



#urt-map-app .eyebrow{
  color:#2f64c4;
  font-size:clamp(22px,2vw,30px);
  font-weight:400;
  margin-bottom:8px;
}

#urt-map-app .title{
  color:#2f64c4;
  font-size:clamp(42px,4.5vw,64px);
  font-weight:800;
  line-height:.95;
  margin-bottom:38px;
  text-transform:capitalize;
}

#urt-map-app .cards{
  display:grid;
  gap:22px;
}

#urt-map-app .card{
  min-height:64px;
  padding:22px 30px;
  border:2px solid #316ce7;
  border-radius:28px;
  background:rgba(255,255,255,.24);
  backdrop-filter:blur(12px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  transition:transform .2s ease,background .2s ease,box-shadow .2s ease;
}

#urt-map-app .card:hover{
  transform:translateY(-2px);
  background:rgba(255,255,255,.36);
  box-shadow:0 14px 30px rgba(49,108,231,.12);
}

#urt-map-app .label{
  color:#2f64c4;
  font-size:23px;
  font-weight:500;
}

#urt-map-app .value{
  color:#2f64c4;
  font-size:23px;
  font-weight:800;
  min-width:42px;
  text-align:right;
}

#urt-map-app .status{
  height:24px;
  margin-top:20px;
  color:#2f64c4;
  font-size:15px;
}

#urt-map-app .tooltip{
  position:fixed;
  z-index:999;
  padding:9px 12px;
  border-radius:12px;
  background:rgba(18,34,64,.92);
  color:#fff;
  font-size:13px;
  pointer-events:none;
  opacity:0;
  transform:translate(-50%,-130%);
  transition:opacity .15s ease;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
}

#urt-map-app .skeleton .value{
  color:transparent;
  border-radius:8px;
  background:linear-gradient(
    90deg,
    rgba(47,100,196,.12),
    rgba(47,100,196,.25),
    rgba(47,100,196,.12)
  );
  background-size:200% 100%;
  animation:shimmer 1.1s infinite linear;
}

@keyframes shimmer{
  from{
    background-position:200% 0;
  }

  to{
    background-position:-200% 0;
  }
}

@media (max-width:1000px){

  #urt-map-app .app{
    grid-template-columns:1fr;
  }

  #urt-map-app .map-container{
    height:58vh;
    min-height:430px;
  }

  #urt-map-app .sidebar{
    padding:0 28px 44px;
    align-items:flex-start;
  }

  #urt-map-app .panel{
    width:100%;
    max-width:none;
  }

}

.urt-dane-wrapper{
  margin-bottom:30px;
}

.urt-dane-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
  margin-top:15px;
}

.urt-dane-grid table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}

.urt-dane-grid th{
  background:#003f8c;
  color:#fff;
  padding:8px;
  text-align:left;
}

.urt-dane-grid td{
  border:1px solid #ddd;
  padding:6px 8px;
}

.urt-dane-grid tr:nth-child(even){
  background:#f5f7fa;
}

#urt-map-app .panel{
  width:100%;
  max-width:none;
}

@media (max-width:1200px){

  #urt-map-app .app{
    grid-template-columns:1fr;
  }

  

}

@media (max-width:768px){

  #urt-map-app .app{
    padding:15px;
  }

  #urt-map-app .title{
    font-size:48px;
  }

  #urt-map-app .label{
    font-size:18px;
  }

  #urt-map-app .value{
    font-size:18px;
  }

  .urt-project-image{
    width:70px;
    height:70px;
  }

  .urt-project-name{
    font-size:15px;
  }

}

.gt-card-map{
  display:flex;
  gap:40px;
  align-items:center;
  justify-content:space-between;
}

.gt-card-map__map{
  flex:0 0 55%;
  min-width:auto;
}

.gt-card-map__map svg{
  display:block;
  width:100%;
  min-height:520px;
}

.gt-card-map__content{
  flex:0 0 360px;
}

.gt-card-map__title{
  color:#3565D8;
  font-size:26px;
  line-height:1.2;
  margin-bottom:25px;
  margin-left: -150px;
}

.gt-card-map__title strong{
  display:block;
  font-size:30px;
  font-weight:700;
  line-height:1;
  margin-top:8px;
}

.gt-card-map__list{
  display:flex;
  flex-direction:column;
  gap:16px;
  
}

.gt-card-map__item{
  display:flex;
  justify-content:space-between;
  align-items:center;

  border:1px solid #3565D8;

  border-radius:20px;

  padding:18px 24px;

  background:#fff;
}

.gt-card-map__item p{
  margin:0;
  color:#3565D8;
}

.gt-card-map__item strong{
  color:#3565D8;
  font-size:24px;
}

.tooltip{
  position:fixed;
  z-index:9999;

  pointer-events:none;

  opacity:0;
}

.gt-card-map__map{
  flex:1;
  min-width:600px;
}

#map{
  width:100%;
  height:520px;
  display:block;
}

.gt-card-map{
  position:relative;
}

.gt-card-map__map{
  position:relative;
  z-index:10;
}

.gt-card-map__content{
  position:relative;
  z-index:20;
  margin-left: -65px;
}

#map{
  pointer-events:auto;
}

#map path{
  pointer-events:auto;
}

.app{
  display:grid !important;
  grid-template-columns:minmax(700px,1fr) 380px !important;
  gap:24px;
}

.gt-left-column{
  display:flex;
  flex-direction:column;
}

.gt-right-column{
  background:#ffffff;
  border-radius:24px;
  padding:20px;

  box-shadow:
    0 2px 10px rgba(0,0,0,.06);

  min-height:720px;
}

.urt-projects-title{
  color:#3565D8;
  font-size:28px;
  font-weight:700;
  margin-bottom:20px;
}

.urt-projects-list{
  display:flex;
  flex-direction:column;
  gap:16px;

  max-height:650px;
  overflow-y:auto;

  padding-right:8px;
}

.gt-main-title{
  color:#3565D8;
  font-size:28px;
  font-weight:700;
  margin-bottom:20px;
}

@media (max-width:1200px){

  .app{
    grid-template-columns:1fr !important;
  }

  .gt-right-column{
    min-height:auto;
  }

}

.urt-projects-list::-webkit-scrollbar{
  width:8px;
}

.urt-projects-list::-webkit-scrollbar-track{
  background:#EDF2FB;
  border-radius:20px;
}

.urt-projects-list::-webkit-scrollbar-thumb{
  background:#3565D8;
  border-radius:20px;
}

.urt-projects-list::-webkit-scrollbar-thumb:hover{
  background:#244FB8;
}


/* =========================================================
   BLOQUE 1 - PIXEL PERFECT AJUSTE FINAL
   ========================================================= */

#urt-map-app{
  width:100%;
  padding:20px 28px;
  background:#f3f6fb;
}

#urt-map-app .app{
  width:100%;
  display:grid !important;
  grid-template-columns:minmax(680px, 1fr) 360px !important;
  gap:22px;
  background:transparent !important;
  padding:0 !important;
  min-height:auto !important;
}

.gt-left-column,
.gt-right-column{
  background:#fff;
  border-radius:20px;
  box-shadow:0 2px 10px rgba(0,0,0,.10);
}

.gt-left-column{
  padding:18px;
}

.gt-right-column{
  padding:18px;
  min-height:560px;
}

.gt-main-title{
  color:#3565D8;
  font-size:26px;
  line-height:1.15;
  font-weight:700;
  margin:0 0 18px;
}

.gt-card-map{
  min-height:465px !important;
  padding:24px 18px !important;
  border-radius:14px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:22px !important;
  background:
    linear-gradient(
      180deg,
      #eef4ff 0%,
      #dfe9f8 100%
    ) !important;
}

.gt-card-map__map{
  flex:0 0 54% !important;
  min-width:0 !important;
  height:430px !important;
  display:flex;
  align-items:center;
  justify-content:center;
}

#map{
  width:100% !important;
  height:430px !important;
  display:block !important;
}

.gt-card-map__content{
  flex:0 0 40% !important;
  width:auto !important;
  padding-right:8px;
}

.gt-card-map__title{
  color:#3565D8;
  font-size:23px !important;
  line-height:1.15 !important;
  font-weight:400;
  margin:0 0 22px !important;
}

.gt-card-map__title strong{
  display:block;
  color:#3565D8;
  font-size:30px !important;
  line-height:1 !important;
  font-weight:700 !important;
  margin-top:6px;
  text-transform:capitalize;
}

.gt-card-map__list{
  display:flex;
  flex-direction:column;
  gap:14px !important;
}

.gt-card-map__item{
  height:48px;
  padding:0 18px !important;
  border:1.5px solid #3565D8 !important;
  border-radius:18px !important;
  background:rgba(255,255,255,.70) !important;
}

.gt-card-map__item p{
  color:#3565D8;
  font-size:16px;
  font-weight:400;
  margin:0;
}

.gt-card-map__item strong{
  color:#3565D8;
  font-size:20px !important;
  font-weight:700;
}

/* Columna derecha */

.urt-projects-title{
  color:#3565D8;
  font-size:27px !important;
  line-height:1.1;
  font-weight:400 !important;
  margin:0 0 18px !important;
}

.urt-projects-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  max-height:500px;
  overflow-y:auto;
  padding-right:4px;
}

.gt-territory__item{
  display:flex !important;
  align-items:center;
  gap:12px;
  min-width:0;
  min-height:94px;
  padding:8px !important;
  overflow:hidden;
  border:1.3px solid #3565D8 !important;
  border-radius:17px !important;
  background:#fff;
}

.gt-territory__item-img{
  width:84px !important;
  height:84px !important;
  max-width:84px !important;
  border-radius:14px !important;
  object-fit:cover;
  object-position:center;
  flex-shrink:0;
}

.gt-territory__item .item:last-child{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
}

.gt-territory__item-title{
  display:block;
  width:100%;
  max-width:100%;
  margin:0 0 5px;
  overflow:hidden;
  color:#3565D8;
  font-size:14px;
  line-height:1.2;
  font-weight:500;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.gt-territory__item-text{
  color:#6f6f6f;
  font-size:14px;
  line-height:1.2;
  margin:0 0 8px;
}

.gt-btn.gt-btn--primary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:88px;
  height:28px;
  padding:0 16px;
  border-radius:16px;
  background:#3565D8;
  color:#fff !important;
  font-size:12px;
  font-weight:600;
  text-decoration:none;
}

.gt-btn.gt-btn--primary:hover{
  background:#244fb8;
  color:#fff !important;
}

.urt-project-empty{
  padding:24px 12px;
  color:#333;
  font-size:14px;
}

/* Scroll elegante */

.urt-projects-list::-webkit-scrollbar{
  width:6px;
}

.urt-projects-list::-webkit-scrollbar-track{
  background:#edf2fb;
  border-radius:20px;
}

.urt-projects-list::-webkit-scrollbar-thumb{
  background:#3565D8;
  border-radius:20px;
}

/* Tooltip no debe bloquear clicks */
#tooltip,
.tooltip{
  pointer-events:none !important;
}

/* =========================================================
   CARDS DE PROYECTOS - ALINEACIÓN DE ESCRITORIO
   ========================================================= */

#urt-map-app .gt-territory__item {
  box-sizing: border-box;
  min-width: 0;
  min-height: 96px;
  padding: 8px !important;
  align-items: center;
  overflow: hidden;
}

#urt-map-app .gt-territory__item > .item:first-child {
  display: flex;
  flex: 0 0 76px !important;
  width: 76px;
  height: 76px;
  min-width: 76px;
  align-items: center;
  justify-content: center;
  align-self: center;
  overflow: hidden;
  border-radius: 12px;
}

#urt-map-app .gt-territory__item-img {
  display: block;
  width: 76px !important;
  height: 76px !important;
  max-width: 76px !important;
  margin: 0;
  border-radius: 12px !important;
  object-fit: cover;
  object-position: center;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1200px) {
  #urt-map-app .app {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #urt-map-app .gt-left-column,
  #urt-map-app .gt-right-column {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #urt-map-app .gt-right-column {
    min-height: auto;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {
  #urt-map-app {
    width: 100%;
    max-width: 100%;
    padding: 16px 0;
    overflow-x: hidden;
  }

  #urt-map-app .app {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 16px;
    padding: 0 !important;
  }

  #urt-map-app .gt-left-column,
  #urt-map-app .gt-right-column {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 14px;
    border-radius: 16px;
  }

  #urt-map-app .gt-main-title,
  #urt-map-app .urt-projects-title {
    font-size: 20px !important;
    line-height: 1.2;
    margin: 0 0 14px !important;
  }

  /* Mapa y datos del territorio. */
  #urt-map-app .gt-card-map {
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    min-height: 0 !important;
    gap: 14px !important;
    padding: 14px !important;
  }

  #urt-map-app .gt-card-map__map {
    display: flex;
    flex: none !important;
    width: 100% !important;
    max-width: 100%;
    min-width: 0 !important;
    height: auto !important;
    aspect-ratio: 700 / 650;
    align-items: center;
    justify-content: center;
  }

  #urt-map-app #map {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 700 / 650;
  }

  #urt-map-app .gt-card-map__content {
    flex: none !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    padding: 0;
  }

  #urt-map-app .gt-card-map__title {
    margin: 0 0 14px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    text-align: center;
  }

  #urt-map-app .gt-card-map__title strong {
    margin-top: 5px;
    font-size: 24px !important;
    line-height: 1.1 !important;
  }

  #urt-map-app .gt-card-map__list {
    width: 100%;
    gap: 10px !important;
  }

  #urt-map-app .gt-card-map__item {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 14px !important;
  }

  #urt-map-app .gt-card-map__item p {
    font-size: 14px;
  }

  #urt-map-app .gt-card-map__item strong {
    font-size: 18px !important;
  }

  /* Listado de proyectos. */
  #urt-map-app .urt-projects-list {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 480px;
    gap: 10px;
    padding-right: 4px;
  }

  #urt-map-app .gt-territory__item {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 82px;
    gap: 10px;
    padding: 8px !important;
    align-items: center;
    overflow: hidden;
  }

  #urt-map-app .gt-territory__item > .item:first-child {
    display: flex;
    flex: none !important;
    width: 64px;
    height: 64px;
    min-width: 64px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 11px;
  }

  #urt-map-app .gt-territory__item-img {
    display: block;
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    margin: 0;
    border-radius: 11px !important;
    object-fit: cover;
    object-position: center;
  }

  #urt-map-app .gt-territory__item .item:last-child {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  #urt-map-app .gt-territory__item-title {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 4px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #urt-map-app .gt-territory__item-text {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.2;
  }
}


/* =========================================================
   MOBILE PEQUEÑO
   ========================================================= */

@media (max-width: 380px) {
  #urt-map-app .gt-left-column,
  #urt-map-app .gt-right-column {
    padding: 12px;
  }

  #urt-map-app .gt-main-title,
  #urt-map-app .urt-projects-title {
    font-size: 18px !important;
  }

  #urt-map-app .gt-card-map {
    padding: 12px !important;
  }

  #urt-map-app .gt-card-map__title {
    font-size: 17px !important;
  }

  #urt-map-app .gt-card-map__title strong {
    font-size: 22px !important;
  }

  #urt-map-app .gt-territory__item {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 76px;
    gap: 9px;
    padding: 7px !important;
  }

  #urt-map-app .gt-territory__item > .item:first-child {
    width: 58px;
    height: 58px;
    min-width: 58px;
  }

  #urt-map-app .gt-territory__item-img {
    width: 58px !important;
    height: 58px !important;
    max-width: 58px !important;
  }

  #urt-map-app .gt-territory__item-title {
    font-size: 12px;
  }
}