.tp-gallery img {
  cursor: zoom-in;
  transition: transform .2s ease, box-shadow .2s ease;
}

.tp-gallery img:hover,
.tp-gallery img:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(7, 27, 77, .25);
  outline: 3px solid #f6b728;
  outline-offset: 3px;
}

.tp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(2, 12, 38, .94);
  backdrop-filter: blur(7px);
}

.tp-lightbox.open {
  display: grid;
}

.tp-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(94vw, 1200px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}

.tp-lightbox-close {
  position: fixed;
  top: 14px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #071b4d;
  font: 700 32px/1 Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}

body.tp-lightbox-open {
  overflow: hidden;
}

#comunidad figure.dupla-psicosocial {
  grid-column: auto !important;
}

#comunidad figure.dupla-psicosocial img {
  width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: contain !important;
}

.organigrama-institucional {
  margin: 38px auto 8px;
  padding: clamp(18px, 3vw, 32px);
  max-width: 1180px;
  border: 1px solid rgba(13, 51, 118, .14);
  border-radius: 22px;
  background: linear-gradient(145deg, #f5f9ff, #fff);
  box-shadow: 0 14px 38px rgba(7, 27, 77, .1);
}

.organigrama-texto span {
  color: #1762a8;
  font-weight: 800;
  letter-spacing: .08em;
  font-size: .78rem;
}

.organigrama-texto h2 {
  margin: 6px 0 8px;
  color: #071b4d;
}

.organigrama-documento {
  display: flex;
  align-items: center;
  gap: 18px;
}

.organigrama-icono {
  display: grid;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  background: #0b3a82;
  font-size: 30px;
}

.organigrama-acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.organigrama-acciones a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 999px;
  background: #0b3a82;
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(7, 27, 77, .18);
}

.organigrama-acciones a:last-child {
  background: #f5b522;
  color: #071b4d;
}

.modalidad-hc {
  margin: 34px auto 4px;
  padding: clamp(22px, 4vw, 40px);
  max-width: 1100px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #071b4d 0%, #123f8b 62%, #1762a8 100%);
  box-shadow: 0 18px 42px rgba(7, 27, 77, .2);
}

.modalidad-hc span {
  display: inline-block;
  margin-bottom: 8px;
  color: #ffd05a;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.modalidad-hc h2 {
  margin: 0 0 14px;
  color: #fff;
}

.modalidad-hc p {
  color: rgba(255,255,255,.94);
  line-height: 1.7;
}

@media (max-width: 600px) {
  .tp-lightbox {
    padding: 14px;
  }
  .tp-lightbox img {
    max-width: 96vw;
    max-height: 82vh;
  }
}
#comunidad figure.dupla-psicosocial img{height:208px!important;aspect-ratio:auto!important;object-fit:contain!important}
