/* ==========================================================================
   Mapa interactivo de Argentina + panel de proyectos + modal con galería
   ========================================================================== */

.gd-map {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.gd-map svg { display: block; width: 100%; height: auto; overflow: visible; }

.gd-map__province {
  fill: var(--map-province);
  stroke: var(--map-stroke);
  stroke-width: .8;
  stroke-linejoin: round;
  transition: fill .2s;
}
.gd-map__province.is-active { fill: var(--map-province-active); cursor: pointer; }
.gd-map__province.is-active:hover,
.gd-map__province.is-active:focus-visible { fill: var(--map-province-hover); outline: none; }
.gd-map__province.is-selected { fill: var(--map-province-selected); }

.gd-map__marker { cursor: pointer; }
.gd-map__marker circle {
  stroke: #fff;
  stroke-width: 2.5;
  transition: r .2s;
}
.gd-map__marker .gd-map__halo { fill: none; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.gd-map__marker:hover .gd-map__dot,
.gd-map__marker:focus-visible .gd-map__dot,
.gd-map__marker.is-selected .gd-map__dot { r: 10; }
.gd-map__marker.is-selected .gd-map__halo { animation: mapPulse 1.6s ease-out infinite; }
.gd-map__marker:focus-visible { outline: none; }
.gd-map__marker--sucursal .gd-map__dot { stroke: var(--gd-blue); }
@keyframes mapPulse {
  0%   { opacity: .9; transform: scale(1); }
  100% { opacity: 0;  transform: scale(2.6); }
}

.gd-map__tooltip {
  position: absolute;
  z-index: 5;
  padding: .45em .8em;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
  background: var(--color-dark);
  border-radius: var(--site-border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0;
  transition: opacity .15s;
}
.gd-map__tooltip.is-visible { opacity: 1; }

.gd-map__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem 1.2rem;
  margin-top: 1rem;
  font-size: 15px;
}
.gd-map__legend span { display: inline-flex; align-items: center; gap: .45em; }
.gd-map__legend i {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

/* --- Layout de la página de proyectos ----------------------------------- */
.projects {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: var(--columns-gap);
  align-items: start;
}
.projects__map {
  position: sticky;
  top: calc(var(--header-sticky-height) + 1.5rem);
  padding: 1.5rem;
  background: var(--color-content-bg-alt-section);
  border-radius: var(--media-radius);
}
@media (max-width: 899px) {
  .projects { grid-template-columns: 1fr; }
  .projects__map { position: static; }
  .gd-map { max-width: 340px; }
}

.projects__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}
.projects__title { margin: 0; color: var(--color-heading-accent); }
.projects__clear {
  padding: 0;
  font: inherit;
  font-size: 15px;
  color: var(--color-primary);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}
.projects__clear[hidden] { display: none; }

/* Filtros por tipo (chips) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .5em 1.1em;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-content-text);
  background: var(--color-content-bg-alt-section);
  border: 0;
  border-radius: 2em;
  box-shadow: var(--btn-shadow);
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--chip-color, var(--color-gray)); }
.chip:hover { box-shadow: var(--btn-shadow-hover); }
.chip[aria-pressed="true"] { background: var(--color-dark); color: #fff; }

/* Tarjetas de proyecto */
.project-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 600px) { .project-list { grid-template-columns: 1fr; } }
.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  background: var(--color-content-bg-alt-section);
  border: 0;
  border-radius: var(--media-radius);
  box-shadow: var(--btn-shadow);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .3s ease, transform .3s ease;
}
.project-card:hover,
.project-card:focus-visible { box-shadow: var(--btn-shadow-hover); transform: translateY(-2px); }
.project-card .media-frame { --ratio: 3 / 2; border-radius: 0; }
.project-card__body { padding: 1rem 1.2rem 1.2rem; }
.project-card__title {
  margin: .35rem 0 .25rem;
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-content-heading);
}
.project-card__meta { margin: 0; font-size: 15px; line-height: 1.4; }
.project-empty { grid-column: 1 / -1; margin: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tag-color, var(--color-primary));
}
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge-example {
  position: absolute;
  top: .7rem;
  left: .7rem;
  z-index: 1;
  padding: .2em .7em;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #1d1d1b;
  background: #ffd84d;
  border-radius: 2em;
}

/* --- Modal de proyecto -------------------------------------------------- */
.project-modal {
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  color: var(--color-content-text);
  background: var(--color-content-bg-alt-section);
  border: 0;
  border-radius: var(--media-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
  overflow: auto;
}
.project-modal::backdrop { background: rgba(0, 0, 0, .7); }
.project-modal[open] { animation: modalIn .3s cubic-bezier(.4, 0, .2, 1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

.project-modal__close {
  position: absolute;
  top: .8rem;
  right: .8rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s;
}
.project-modal__close:hover { background: var(--color-gray); }
.project-modal__close svg { width: 20px; height: 20px; }

.gallery { position: relative; background: #000; }
.gallery .media-frame { --ratio: 16 / 9; max-height: 58vh; width: 100%; border-radius: 0; }
.gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  transition: background .2s;
}
.gallery__nav:hover { background: var(--color-primary); }
.gallery__nav svg { width: 22px; height: 22px; }
.gallery__nav--prev { left: 1rem; }
.gallery__nav--next { right: 1rem; }
.gallery__nav[hidden] { display: none; }
.gallery__thumbs {
  display: flex;
  gap: .5rem;
  padding: .6rem;
  overflow-x: auto;
  background: var(--color-dark);
}
.gallery__thumbs[hidden] { display: none; }
.gallery__thumb {
  flex: 0 0 96px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  background: var(--media-placeholder);
  border: 2px solid transparent;
  border-radius: var(--site-border-radius);
  opacity: .6;
  cursor: pointer;
  transition: opacity .2s, border-color .2s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb[aria-current="true"] { opacity: 1; border-color: var(--gd-cyan); }

.project-modal__body {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  padding: 2rem;
}
.project-modal__body h2 { margin: .4rem 0 1rem; color: var(--color-heading-accent); }
.project-facts { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.project-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  font-size: 16px;
}
.project-facts span:first-child { font-weight: 700; }
@media (max-width: 700px) {
  .project-modal__body { grid-template-columns: 1fr; gap: 1rem; padding: 1.5rem; }
}
