/*Boton generic cards*/

.card-list.ypfcom__panels-cards-info .generic-card__body {
  flex: 1;
}
.card-list.ypfcom__panels-cards-info .generic-card__content {
  flex: 1;
}
.card-list.ypfcom__panels-cards-info .generic-card__links {
  align-items: flex-start;
}
.card-list.ypfcom__panels-cards-info .generic-card__links a {
  background-color: var(--Primary-Brand-Colour-700);
  color: var(--Grey-Scale-0);
  height: 36px;
  padding: 0 16px;
  font: var(--text-body-2-bold);
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--border-radius-large);
  text-decoration: none;
  transition: var(--buttons-transition);
}
.card-list.ypfcom__panels-cards-info .generic-card__links a:hover {
  background-color: var(--Primary-Brand-Colour-500);
  color: var(--Grey-Scale-0) !important;
  border-radius: var(--border-radius-extra-large-2);
}
.card-list.ypfcom__panels-cards-info
  .generic-card__links
  a:not([disabled]):focus-visible {
  color: var(--Grey-Scale-0);
}

/* #region MINERIA: MAPA INTERACTIVO  */

.c-map-interactive-ds2 {
  display: flex;
  background: var(--Grey-Scale-0);
  overflow: hidden;
  height: 650px;
  margin-bottom: 80px;
  padding-inline: var(--border-view-distance);
}

.c-map-interactive-ds2__sidebar {
  flex: 0 0 400px;
  overflow-y: auto;
  background: var(--Grey-Scale-0);
}

/* Scrollbar Sidebar */
.c-map-interactive-ds2__sidebar::-webkit-scrollbar {
  width: 4px;
}

.c-map-interactive-ds2__sidebar::-webkit-scrollbar-track {
  background: var(--Grey-Scale-100);
  border-radius: 4px;
  margin: 8px 0;
}

.c-map-interactive-ds2__sidebar::-webkit-scrollbar-thumb {
  background: var(--Primary-Brand-Colour-700);
  border-radius: 4px;
}

.c-map-interactive-ds2__map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--Grey-Scale-50);
  cursor: grab;
  border-radius: 8px;
  margin-left: 15px;
}

.c-map-interactive-ds2__map-container:active {
  cursor: grabbing;
}

.c-map-interactive-ds2__svg-wrapper {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  transition: transform 0.15s ease-out;
}

.c-map-interactive-ds2__svg-wrapper > svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Estilos para las provincias dentro del SVG */
#svg-map-wrapper svg path {
  fill: var(--Grey-Scale-50);
  stroke: var(--Grey-Scale-400);
  stroke-opacity: 0.8;
  stroke-linejoin: round;
  /* Esto hace que el relleno se dibuje encima del borde, 
     evitando que los bordes internos se solapen feo */
  paint-order: stroke fill;
  stroke-width: 3;
  transition: fill 0.3s ease;
}

#svg-map-wrapper .c-map-pin svg path {
  fill: var(--Primary-Brand-Colour-700);
  stroke: transparent;
  stroke-width: 0.5;
  transition: fill 0.3s ease;
}

#svg-map-wrapper .c-map-pin__icon.terminal svg path {
  fill: var(--Primary-Brand-Colour-500);
  stroke: transparent;
  stroke-width: 0.5;
  transition: fill 0.3s ease;
}

#svg-map-wrapper svg path.is-active-province {
  fill: var(--Grey-Scale-500) !important;
}

/* PINES */
.c-map-pin {
  position: absolute;
  background: var(--Grey-Scale-0);
  border: 1px solid var(--Grey-Scale-0);
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  padding: 0;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0;
  /* Ancla el CENTRO del ícono (40px) en el punto del mapa.
     El texto se expande hacia la derecha sin mover el ícono. */
  transform: translate(-20px, -50%);
  transition: all 0.2s ease;
}

.c-map-pin.is-active {
  border-color: var(--Grey-Scale-0);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0px 8px 10px 0px rgba(var(--Grey-Scale-900), 0.1);
  border-radius: 2px;
  padding-right: 16px;
  gap: 16px;
  z-index: 20;
}

.c-map-pin__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Desktop: el ícono activo crece a 47×47 */
.c-map-pin.is-active .c-map-pin__icon {
  width: 47px;
  height: 47px;
  background: var(--Primary-Brand-Colour-700);
}

/* Compensa el crecimiento 40→47px en desktop para que el centro del ícono
   siga clavado exactamente en el punto del mapa. */
.c-map-pin.is-active {
  transform: translate(-23.5px, -50%);
}

/* Mobile / Tablet: el ícono activo se queda en 40×40, sin crecer.
   Se restaura también el transform al de inactivo (sin compensación). */
@media (max-width: 1439px) {
  .c-map-pin.is-active .c-map-pin__icon {
    width: 40px;
    height: 40px;
    background: var(--Primary-Brand-Colour-700);
  }

  .c-map-pin.is-active {
    transform: translate(-20px, -50%);
  }
}

.c-map-pin.is-active .c-map-pin__icon svg {
  filter: brightness(0) invert(1);
  width: 24px;
  height: 24px;
}

.c-map-pin__text {
  text-align: left;
  display: none;
  /* Only visible when active */
  flex-direction: column;
  justify-content: center;
}

.c-map-pin.is-active .c-map-pin__text {
  display: flex;
}

.c-map-pin__title {
  font: var(--text-body-1-bold);
  color: var(--Primary-Brand-Colour-500);
  white-space: nowrap;
}

.c-map-pin__subtitle {
  font: var(--text-body-3);
  color: var(--Grey-Scale-700);
}

/* ACORDEÓN */
.c-map-accordion {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
}

.c-map-accordion__item {
  border: 1px solid var(--Grey-Scale-100);
  background: var(--Grey-Scale-0);
  border-radius: 8px;
}

.c-map-accordion__item.is-active {
  background: var(--Grey-Scale-50);
}

.c-map-accordion__header {
  width: 100%;
  padding: 16px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
}

.c-map-accordion__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c-map-accordion__text {
  font: var(--title-h6);
  color: var(--Primary-Brand-Colour-700);
}

.c-map-accordion__subtext {
  font: var(--subtitle);
  color: var(--Grey-Scale-700);
}

.c-map-accordion__toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--Grey-Scale-0);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="%230451DD" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.c-map-accordion__item.is-active .c-map-accordion__toggle {
  transform: rotate(180deg);
}

.c-map-accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: transparent;
}

.c-map-accordion__item.is-active .c-map-accordion__content {
  max-height: 800px;
}

.c-map-accordion__info {
  padding: 0 20px 20px;
  padding-left: 16px;
}

.c-map-accordion__info-title {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--Primary-Brand-Colour-700);
}

.c-map-accordion__info-block {
  padding-left: 24px;
  font-size: 14px;
}

.c-map-accordion__info-block .c-map-accordion__info-label {
  display: block;
  font-weight: 500;
}

.c-map-accordion__info-block .c-map-accordion__info-value {
  font-size: 14px;
  line-height: 18px;
}

.c-map-accordion__info-label {
  color: var(--Grey-Scale-900);
  font-size: 12px;
}

.c-map-accordion__info-block .c-map-accordion__info-value ul,
.c-map-accordion__info-block .c-map-accordion__info-value ul li {
  font-size: 14px;
  line-height: 18px;
  color: var(--Grey-Scale-700);
  padding-top: 2px;
  list-style: disc;
}

/* LEYENDA */
.c-map-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--Grey-Scale-0);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 0.05);
  z-index: 30;
  display: none;
}

.c-map-legend__title {
  font-weight: 400;
  font-size: 14px;
  display: block;
  color: var(--Grey-Scale-700);
  margin-bottom: 12px;
}

.c-map-legend__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-map-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.c-map-legend__icon {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  border-radius: 2px 0 0 2px;
  border: 0.5px solid var(--Grey-Scale-0);
  background: var(--Grey-Scale-0);
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.07);
  align-items: center;
}

.c-map-legend__icon.terminal svg {
  transform: scaleY(0.7);
  transform-origin: center;
  overflow: visible;
}
.c-map-legend__icon svg {
  width: 24px;
  height: 24px;
  aspect-ratio: 1/1;
}

.c-map-legend__text.ypfdirecto {
  color: var(--Primary-Brand-Colour-700);
}

.c-map-legend__text {
  font: var(--text-body-1-bold);
}

@media (min-width: 1366px) {
  .c-map-legend {
    display: block;
  }
}

/* =========================================================
   MAPA INTERACTIVO - RESPONSIVE (MOBILE / TABLET)
   ========================================================= */

.c-map-interactive-ds2--mobile {
  flex-direction: column !important;
  gap: 16px;
  width: 100%;
  /* Para que el mapa no toque los bordes del dispositivo */
}

.c-map-interactive-ds2--mobile .c-map-interactive-ds2__map-container {
  width: 100%;
  height: 450px;
  /* Ventana fija: el mapa es más alto y se puede panear */
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  background: var(--Grey-Scale-50);
  cursor: grab;
  touch-action: none;
  /* JS maneja el pan manual, se previene scroll nativo del body */
}

/* Tablet: ventana del mapa más alta */
@media (min-width: 768px) and (max-width: 1439px) {
  .c-map-interactive-ds2--mobile .c-map-interactive-ds2__map-container {
    height: 700px;
  }
}

.c-map-interactive-ds2--mobile .c-map-interactive-ds2__slider-container {
  width: 100%;
  position: relative;
}
.c-map-referencia-container {
  padding-inline: var(--border-view-distance);
  margin-bottom: 40px;
}
.c-map-referencia-container .c-map-legend__list {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.c-map-referencia-container .c-map-legend__text {
  font-size: 12px;
}

@media (max-width: 1439px) {
  .c-distribution-ds2__text-block {
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .c-map-referencia-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: end;
  }

  .c-map-referencia-container p {
    width: 50%;
    margin-bottom: 0;
  }

  .c-map-referencia-container div {
    width: 40%;
  }

  .c-map-legend-mobile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
  }

  .c-map-legend-mobile .c-map-legend__title {
    margin-bottom: 0;
  }
}

@media (min-width: 1366px) {
  .c-map-legend-mobile {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1365px) {
  .c-map-interactive-ds2--mobile {
    margin: 0 auto;
    margin-bottom: 50px !important;
  }

  .c-map-interactive-ds2,
  .c-map-interactive-ds2--mobile .c-map-interactive-ds2__map-container {
    height: 700px;
  }
}

@media (min-width: 0) and (max-width: 1365px) {
  .c-map-interactive-ds2__map-container {
    overflow: visible;
  }

  #mineria-map-carousel {
    position: absolute;
    top: -90px;
    left: 0;
    width: 100%;
    overflow: visible;
  }
}

#mineria-map-carousel .swiper-slide {
  height: auto;
  display: flex;
  padding-right: 16px;
}
#mineria-map-carousel .swiper-slide:last-child {
  padding-right: 0px;
}

.c-map-interactive-ds2--mobile .c-map-accordion__item {
  width: 100%;
  height: 100%;
  background: var(--Grey-Scale-0);
  border: 1px solid var(--Grey-Scale-100);
  border-radius: 8px;
  margin-bottom: 0;
  display: flex;
  align-items: stretch;
}

.c-map-interactive-ds2--mobile .c-map-accordion__header {
  padding: 24px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.c-map-interactive-ds2--mobile .c-map-accordion__item.is-active {
  background: var(--Grey-Scale-50);
}

.c-map-interactive-ds2--mobile
  .c-map-accordion__item.is-active
  .c-map-accordion__text {
  color: var(--Primary-Brand-Colour-700);
}

/* Pagination */
.c-map-interactive-ds2 .c-map-slider-controls {
  margin-block-start: 30px;
}

.c-map-interactive-ds2 .c-map-arrows {
  display: flex;
  gap: 12px;
  align-items: center;
}

.c-map-interactive-ds2 .c-map-arrows button {
  margin: 0;
}

/* Mobile legends inside map */
.c-map-interactive-ds2--mobile .c-map-legend {
  padding: 16px;
  bottom: 12px;
  right: 12px;
  border-radius: 8px;
  transform: scale(0.85);
  /* shrink legend a bit for mobile */
  transform-origin: bottom right;
}

/* Visibility Overrides */
@media (max-width: 1365px) {
  .only-desktop {
    display: none !important;
  }
}

@media (min-width: 1366px) {
  .only-mobile-tablet {
    display: none !important;
  }
}

.c-map-interactive-ds2--mobile .c-map-interactive-ds2__map-container {
  margin-left: 0;
  /* Reset desktop left margin */
}

/* SVG wrapper: el JS controla width/height/transform para que el mapa sea más alto que el container */
.c-map-interactive-ds2--mobile .c-map-interactive-ds2__svg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  /* width y height los setea el JS dinámicamente */
  transform-origin: 0 0;
}

.c-map-interactive-ds2--mobile .c-map-interactive-ds2__svg-wrapper > svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Explicit map aesthetics */
/* Card aesthetics when overlapping map */
.c-map-interactive-ds2--mobile .c-map-accordion__item {
  background: var(--Grey-Scale-0);
  border-radius: 8px;
  border: 1px solid var(--Grey-Scale-300);
}

/* ------------------------------------------- */

/* Explicit Mobile map boundaries — misma estética que desktop.
   IMPORTANTE: fill: var(--Grey-Scale-50) (no transparent) para que paint-order funcione
   correctamente y los bordes entre provincias adyacentes no aparezcan dobles. */
.c-map-interactive-ds2--mobile .c-map-interactive-ds2__svg-wrapper svg path {
  fill: var(--Grey-Scale-50) !important;
  stroke: var(--Grey-Scale-400) !important;
  stroke-width: 2 !important;
  stroke-opacity: 0.85 !important;
  stroke-linejoin: round !important;
  paint-order: stroke fill !important;
}

.c-map-interactive-ds2--mobile
  .c-map-interactive-ds2__svg-wrapper
  svg
  path.is-active-province {
  fill: var(--Grey-Scale-500) !important;
  stroke: var(--Grey-Scale-900) !important;
  transition: fill 0.3s ease;
}

.c-map-interactive-ds2--mobile
  .c-map-interactive-ds2__svg-wrapper
  .c-map-pin
  svg
  path {
  fill: var(--Primary-Brand-Colour-700) !important;
  stroke: none !important;
}

.c-map-interactive-ds2--mobile
  .c-map-interactive-ds2__svg-wrapper
  .c-map-pin__icon.terminal
  svg
  path {
  fill: var(--Primary-Brand-Colour-500) !important;
  stroke: none !important;
}

/* #endregion MINERIA: MAPA INTERACTIVO  */
