/* =========================================================================
   EMSI · PROYECTOS
   Estilos exclusivos de proyectos/. Se carga después de styles.css y
   reutiliza sus tokens (--accent, --text, --bg-cream, --font-heading…).
   ========================================================================= */

.projects-intro { background: var(--bg-cream); padding-top: 72px; padding-bottom: 72px; }
.projects-intro .resource-stats li { padding: 4px 30px; }
.projects-all { background: var(--bg-cream); }
.cases { background: var(--bg-white); }

/* ---------- Tarjeta de proyecto ---------- */
.project-grid { align-items: stretch; }
.project-grid.card-grid--3 { gap: 26px; }

.project-card { display: flex; }
.project-card.is-hidden { display: none; }

/* ---------- Carrusel de casos de éxito ---------- */
.section-heading__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 28px;
}

.cases-carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cases-carousel__viewport::-webkit-scrollbar { display: none; }

.cases-carousel__track {
  display: flex;
  gap: 26px;
}
.cases-carousel__track .project-card {
  flex: 0 0 calc((100% - 2 * 26px) / 3);
  scroll-snap-align: start;
}

.cases-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}
.cases-carousel__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--bg-white);
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cases-carousel__arrow:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cases-carousel__arrow:disabled { opacity: .35; cursor: default; }
.cases-carousel__counter {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-muted);
  min-width: 60px;
  text-align: center;
}
.cases-carousel__counter-current { color: var(--accent); }

@media (max-width: 991.98px) {
  .cases-carousel__track .project-card { flex-basis: calc((100% - 26px) / 2); }
}
@media (max-width: 767.98px) {
  .section-heading__side { align-items: flex-start; }
  .cases-carousel__controls { justify-content: flex-start; }
}
@media (max-width: 575.98px) {
  .cases-carousel__track .project-card { flex-basis: 100%; }
}

.project-card__btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--bg-white);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(26, 23, 20, .06);
  transition: transform .3s ease, box-shadow .3s ease;
}
.project-card__btn:hover,
.project-card__btn:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 22px 46px rgba(26, 23, 20, .14);
}
.project-card__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.project-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--text);
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}
.project-card__btn:hover .project-card__media img { transform: scale(1.06); }
.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 18, 16, .35) 0%, rgba(20, 18, 16, 0) 45%, rgba(20, 18, 16, .35) 100%);
}

/* Portada pendiente de fotografía: bloque de marca, no una imagen rota. */
.project-card__media--vacia {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 11px),
    linear-gradient(150deg, #211E1B 0%, #322C28 60%, var(--accent) 260%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card__sinfoto {
  position: relative;
  z-index: 1;
  padding: 0 26px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}

.project-card__flag,
.project-card__year {
  position: absolute;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.project-card__flag {
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(224, 31, 26, .35);
}
.project-card__year {
  bottom: 12px;
  right: 14px;
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}
.project-card__place {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 9px;
}
.project-card__name {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 9px;
}
.project-card--lg .project-card__name { font-size: 22px; }
.project-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.project-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border-soft);
}
.project-card__logo {
  max-height: 30px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) opacity(.65);
  transition: filter .25s ease;
}
.project-card__btn:hover .project-card__logo { filter: none; }

/* El logo de Constellation Brands es más cuadrado que el resto (que son
   horizontales), así que a los mismos 30px de alto se ve chico: se le da
   un poco más de alto para que su tamaño visual iguale al de los demás. */
.project-card__logo[src*="constellation-brands"] { max-height: 46px; }
.project-card__client {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.project-card__cta {
  flex: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  transition: transform .3s ease;
}
.project-card__btn:hover .project-card__cta { transform: translateX(4px); }

/* ---------- Barra de búsqueda y filtros ----------
   Una sola línea: buscador + dos desplegables + limpiar. Sustituye a la fila
   de pastillas, que con 22 estados se veía amontonada.
   ------------------------------------------------------------------------- */
.project-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 980px;
  margin: 0 auto;
  padding: 14px;
  background: var(--bg-white);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(26, 23, 20, .05);
}

.project-search {
  position: relative;
  flex: 1 1 260px;
  margin: 0;
}
.project-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 14px;
}
.project-search input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-cream);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.project-search input::placeholder { color: var(--text-faint); }
.project-search input:focus {
  outline: none;
  background: var(--bg-white);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 31, 26, .1);
}

.project-select {
  position: relative;
  flex: 0 1 248px;
  display: block;
}
.project-select > span {
  position: absolute;
  top: 7px;
  left: 17px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  pointer-events: none;
}
.project-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 21px 38px 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background-color: var(--bg-cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B635B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.project-select select:hover { border-color: rgba(26, 23, 20, .2); }
.project-select select:focus {
  outline: none;
  background-color: var(--bg-white);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 31, 26, .1);
}
/* Marca el desplegable cuando tiene un filtro puesto. */
.project-select select:not([data-vacio="1"]) { }

.project-clear {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(224, 31, 26, .08);
  transition: background .2s ease, color .2s ease;
}
.project-clear i { font-size: 11px; }
.project-clear:hover { background: var(--accent); color: #fff; }
.project-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 767.98px) {
  .project-toolbar { flex-direction: column; align-items: stretch; }
  .project-select { flex: 1 1 auto; }
  .project-clear { justify-content: center; }
}

.project-count {
  text-align: center;
  margin: 22px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-faint);
}
.project-grid#projectGrid { margin-top: 26px; }

/* ---------- Ficha emergente ---------- */
.project-modal .modal-content {
  border: none;
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: 0 40px 90px rgba(26, 23, 20, .35);
}
.project-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(26, 23, 20, .3);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.project-modal__close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }

.project-modal__grid {
  display: grid;
  grid-template-columns: 348px 1fr;
  min-height: 0;
}

/* Proyecto sin fotografía: la ficha ocupa una sola columna. */
.project-modal--sinfoto .project-modal__gallery { display: none; }
.project-modal--sinfoto .project-modal__grid { grid-template-columns: 1fr; }
.project-modal--sinfoto .project-modal__info { padding-right: 64px; }

.project-modal__gallery {
  background: var(--bg-cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  gap: 12px;
}

/* El marco se ajusta exactamente a la foto (445 x 276 px del archivo original,
   mostrada a 300 px) para que la imagen lo llene por completo y no quede fondo
   visible alrededor. Si llegan fotos más grandes, se sube este ancho. */
.project-modal__stage {
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 445 / 276;
  border-radius: 10px;
  overflow: hidden;
  background: var(--text);
  box-shadow: 0 14px 34px rgba(26, 23, 20, .22);
}
.project-modal__stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-modal__stage img:not([src]) { display: none; }

.project-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 18, 16, .45);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease;
}
.project-modal__nav:hover { background: var(--accent); }
.project-modal__nav--prev { left: 8px; }
.project-modal__nav--next { right: 8px; }
.project-modal__nav.is-off { display: none; }

.project-modal__counter {
  position: absolute;
  bottom: 8px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 18, 16, .5);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, .9);
}

.project-modal__thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
.project-modal__thumbs img {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: .5;
  transition: opacity .2s ease, transform .2s ease;
}
.project-modal__thumbs img { opacity: .55; }
.project-modal__thumbs img:hover { opacity: .9; }
.project-modal__thumbs img.is-active { opacity: 1; outline: 2px solid var(--accent); }
.project-modal__thumbs:empty { display: none; }

.project-modal__info { padding: 40px 40px 36px; display: flex; flex-direction: column; }
.project-modal__info .eyebrow { font-size: 12px; letter-spacing: .12em; margin-bottom: 14px; }
.project-modal__info h3 { font-size: 30px; line-height: 1.12; margin-bottom: 14px; }
.project-modal__desc { font-size: 16px; line-height: 1.65; color: var(--text-muted); margin: 0 0 24px; }

.project-modal__data {
  display: grid;
  gap: 14px;
  margin: 0 0 22px;
  padding: 20px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.project-modal__data > div { display: grid; grid-template-columns: 108px 1fr; gap: 14px; align-items: baseline; }
.project-modal__data dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.project-modal__data dd { margin: 0; font-size: 15.5px; font-weight: 600; color: var(--text); }

.project-modal__logo { margin-bottom: 20px; }
.project-modal__logo img { max-height: 46px; max-width: 160px; width: auto; object-fit: contain; }
.project-modal__logo:empty { display: none; }

.project-modal__links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.project-modal__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: rgba(26, 23, 20, .05);
  border-radius: 999px;
  padding: 8px 15px;
  transition: background .2s ease, color .2s ease;
}
.project-modal__links a:hover { background: var(--accent); color: #fff; }
.project-modal__links a.is-tool { background: rgba(224, 31, 26, .1); color: var(--accent); }
.project-modal__links a.is-tool:hover { background: var(--accent); color: #fff; }

.project-modal__info .btn { align-self: flex-start; margin-top: auto; }

@media (max-width: 991.98px) {
  .project-modal__grid { grid-template-columns: 1fr; }
  .project-modal__gallery { padding: 20px; }
  .project-modal__info { padding: 32px 26px 30px; }
  .project-modal__info h3 { font-size: 25px; }
}

@media (max-width: 575.98px) {
  .projects-intro .resource-stats li { padding: 0; }
  .project-filters { justify-content: flex-start; }
  .project-modal__data > div { grid-template-columns: 1fr; gap: 2px; }
}

/* =========================================================================
   MAPA DE PRESENCIA
   Mapa de México con un punto "vivo" por estado. El tamaño del punto crece
   con el número de proyectos y al hacer clic se filtra el catálogo.
   Los trazos vienen de data/mapa-mexico.php.
   ========================================================================= */
.map-section { background: var(--bg-cream); }

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
}

/* ---------- Mapa ---------- */
.mapa {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding-top: min(var(--vb-ratio, 63%), 516px);  /* conserva la proporción del trazo */
}
.mapa__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mapa__estado {
  fill: #ECE7DF;
  stroke: var(--bg-white);
  stroke-width: 14;
  stroke-linejoin: round;
  transition: fill .3s ease;
}
.mapa__estado.is-activo { fill: #D9D2C7; }
.mapa__estado.is-hover { fill: color-mix(in srgb, var(--accent) 22%, #D9D2C7); }

/* ---------- Punto vivo ----------
   El marcador tiene cuatro estilos intercambiables. Se elige poniendo la clase
   correspondiente junto a .mapa en proyectos.php:

     .mapa--halo      resplandor difuso que respira   (el que está puesto)
     .mapa--burbuja   círculo translúcido proporcional
     .mapa--onda      punto con una onda que se expande
     .mapa--nodo      rombo de instrumento con marco

   El tamaño (--tam) lo calcula proyectos.php a partir del número de proyectos.
   ------------------------------------------------------------------------- */
.mapa__punto {
  --tam: 20px;
  all: unset;
  position: absolute;
  transform: translate(-50%, -50%);
  width: var(--tam);
  height: var(--tam);
  cursor: pointer;
  z-index: 2;
}
.mapa__punto:hover,
.mapa__punto:focus-visible { z-index: 5; }
.mapa__punto:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 50%; }

.mapa__nucleo,
.mapa__anillo {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.mapa__nucleo { background: var(--accent); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }

/* --- A · Halo: un punto sólido con resplandor difuso que respira --- */
.mapa--halo .mapa__nucleo {
  width: max(7px, calc(var(--tam) * .32));
  height: max(7px, calc(var(--tam) * .32));
}
.mapa--halo .mapa__anillo {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 78%, transparent) 0%, color-mix(in srgb, var(--accent) 30%, transparent) 45%, transparent 72%);
  animation: mapa-respira 3.6s ease-in-out infinite;
}
.mapa--halo .mapa__anillo--2 { display: none; }
.mapa--halo .mapa__punto:hover .mapa__nucleo { transform: translate(-50%, -50%) scale(1.4); }

@keyframes mapa-respira {
  0%, 100% { transform: translate(-50%, -50%) scale(.8);  opacity: .55; }
  50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* --- B · Burbuja: círculo translúcido del tamaño del dato --- */
.mapa--burbuja .mapa__nucleo { width: 5px; height: 5px; }
.mapa--burbuja .mapa__anillo {
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  animation: mapa-burbuja 4.2s ease-in-out infinite;
  transition: background .25s ease;
}
.mapa--burbuja .mapa__anillo--2 { display: none; }
.mapa--burbuja .mapa__punto:hover .mapa__anillo { background: color-mix(in srgb, var(--accent) 42%, transparent); }

@keyframes mapa-burbuja {
  0%, 100% { transform: translate(-50%, -50%) scale(.96); }
  50%      { transform: translate(-50%, -50%) scale(1.06); }
}

/* --- C · Onda: punto fijo y una sola onda limpia que se expande --- */
.mapa--onda .mapa__nucleo { width: max(7px, calc(var(--tam) * .3)); height: max(7px, calc(var(--tam) * .3)); }
.mapa--onda .mapa__anillo {
  width: 100%;
  height: 100%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  animation: mapa-onda 3.4s cubic-bezier(.22, 1, .36, 1) infinite;
}
.mapa--onda .mapa__anillo--2 { animation-delay: 1.7s; }
.mapa--onda .mapa__punto:hover .mapa__nucleo { transform: translate(-50%, -50%) scale(1.35); }

@keyframes mapa-onda {
  0%   { transform: translate(-50%, -50%) scale(.3); opacity: .75; }
  70%  { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

/* --- D · Nodo: rombo de instrumento dentro de un marco --- */
.mapa--nodo .mapa__nucleo {
  width: max(8px, calc(var(--tam) * .34));
  height: max(8px, calc(var(--tam) * .34));
  border-radius: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.mapa--nodo .mapa__anillo {
  width: 100%;
  height: 100%;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 3px;
  transform: translate(-50%, -50%) rotate(45deg);
  animation: mapa-nodo 3.8s ease-in-out infinite;
}
.mapa--nodo .mapa__anillo--2 { display: none; }
.mapa--nodo .mapa__punto:hover .mapa__nucleo { transform: translate(-50%, -50%) rotate(45deg) scale(1.3); }

@keyframes mapa-nodo {
  0%, 100% { transform: translate(-50%, -50%) rotate(45deg) scale(.9);  opacity: .45; }
  50%      { transform: translate(-50%, -50%) rotate(45deg) scale(1.05); opacity: .9; }
}

@media (prefers-reduced-motion: reduce) {
  .mapa__anillo { animation: none !important; opacity: .55; }
}

/* ---------- Globo de información ---------- */
.mapa__tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 6px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--text);
  color: rgba(255, 255, 255, .72);
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 14px 30px rgba(26, 23, 20, .3);
  transition: opacity .2s ease, transform .25s ease, visibility .2s;
  z-index: 6;
}
.mapa__tip strong {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.mapa__tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--text);
}
.mapa__punto:hover .mapa__tip,
.mapa__punto:focus-visible .mapa__tip,
.mapa__punto.is-activo .mapa__tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- Lista lateral ---------- */
.map-side { align-self: stretch; display: flex; flex-direction: column; }
.map-side__title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.map-side__title--sep {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.map-list { display: flex; flex-direction: column; }
.map-list li { display: block; }
.map-list button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 12px;
  border-radius: 11px;
  transition: background .2s ease;
}
.map-list button:hover,
.map-list button:focus-visible,
.map-list button.is-activo { background: rgba(224, 31, 26, .07); }
.map-list button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.map-list__punto {
  --tam: 10px;
  flex: none;
  width: var(--tam);
  height: var(--tam);
  border-radius: 50%;
  background: var(--accent);
  opacity: .85;
}
.map-list__nombre {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.map-list__n {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}
.map-list--extra .map-list__nombre { font-weight: 500; color: var(--text-muted); }

@media (max-width: 991.98px) {
  .map-layout { grid-template-columns: 1fr; gap: 32px; }
  .map-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
  .map-list--extra { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  /* El mapa se ve más chico: los puntos se reducen para que no se encimen. */
  .mapa__punto { width: calc(var(--tam) * .68); height: calc(var(--tam) * .68); }
}
@media (max-width: 575.98px) {
  .map-list { grid-template-columns: 1fr; }
  .mapa__tip { font-size: 11.5px; padding: 7px 11px; }
}

/* =========================================================================
   PANEL CON SCROLL PROPIO PARA EL CATÁLOGO — usado en nosotros.php.
   "Mostrar más proyectos" revela más tarjetas dentro de este panel de
   altura fija, en vez de alargar la página: así el CTA de contacto y el
   pie de página quedan siempre en el mismo lugar, sin importar cuántos
   de los 115 proyectos se hayan desplegado.
   ========================================================================= */
.project-grid-scroll {
  max-height: 1180px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 26px;
  padding-right: 14px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent;
}
.project-grid-scroll .project-grid#projectGrid { margin-top: 0; }
.project-grid-scroll::-webkit-scrollbar { width: 8px; }
.project-grid-scroll::-webkit-scrollbar-track { background: transparent; }
.project-grid-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
}
.project-grid-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (max-width: 767.98px) {
  .project-grid-scroll { max-height: 1500px; padding-right: 8px; }
}
