/* ==========================================================================
   Paneles de Impacto Social — Banca Responsable
   Requiere: Bootstrap 3.4.1 + jQuery 1.12.4
   Todo el CSS está bajo  y usa el prefijo .pis- para no
   interferir con los estilos de SharePoint 2013 (corev15.css).

   Breakpoints (los de Bootstrap 3):
     xs  < 768px      -> móvil
     sm  768–991px    -> iPad mini / tablet vertical
     md  992–1199px   -> iPad Pro / laptop pequeña
     lg  >= 1200px    -> desktop (diseño original)
   ========================================================================== */



/* Contenedor fluido con ancho máximo: se adapta al ancho real de la zona
   del Web Part (no al de la ventana), evitando desbordes en SharePoint. */
.pis-container {
  max-width: 1248px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.pis-aportes{
  background-color: #f1f0f0 !important;
}



@media (min-width: 768px) {
  .pis-container {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (min-width: 1200px) {
  .pis-container {
    padding-left: 24px;
    padding-right: 24px;
  }
}



a {
  color: #005f7a;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #081849;
}

a:focus,
button:focus {
  outline: 3px solid #e8890c;
  outline-offset: 3px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Filas flex (alineación vertical / alturas iguales): solo en el breakpoint
   donde la fila es flex se ocultan los pseudo-elementos clearfix de
   Bootstrap, para que no actúen como items. En los demás se conservan. */
.pis-cards:before,
.pis-cards:after {
  display: none;
}

@media (min-width: 768px) {

  .pis-hero-row:before,
  .pis-hero-row:after {
    display: none;
  }
}

@media (min-width: 992px) {

  .pis-panels-head:before,
  .pis-panels-head:after,
  .pis-panel-main:before,
  .pis-panel-main:after {
    display: none;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.pis-hero {
  position: relative;
  background-color: #e8e6df;
  background-repeat: no-repeat;
  /* xs: banner móvil (ilustración arriba, texto debajo) */
  background-image: url(../img/banner-movil-paneles-impacto.png);
  background-image: image-set(url(../img/banner-movil-paneles-impacto.webp) type("image/webp"), url(../img/banner-movil-paneles-impacto.png) type("image/png"));
  background-size: 100% auto;
  background-position: center top;
  padding: 40% 0 48px;
}

.pis-hero-text {
  padding: 8px 6px 0;
}

.pis-hero-title {
  font-size: 32px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #081849;
  text-wrap: balance;
}

.pis-hero-lead {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.5;
  font-style: italic;
  color: #00667c;
  max-width: 30em;
}

.pis-back-link {
  display: inline-block;
  margin-top: 14px;
  min-height: 44px;
  line-height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: #a35200;
}

.pis-back-link:hover,
.pis-back-link:focus {
  color: #7a3d00;
  text-decoration: underline;
}

.pis-back-link svg {
  margin: -2px 6px 0 0;
}

/* sm: banner iPad mini */
@media (min-width: 768px) {
  .pis-hero {
    padding: 0;
    background-image: url(../img/banner-ipad-mini-paneles-impacto.png);
    background-image: image-set(url(../img/banner-ipad-mini-paneles-impacto.webp) type("image/webp"), url(../img/banner-ipad-mini-paneles-impacto.png) type("image/png"));
    background-size: cover;
    background-position: left center;
  }

  .pis-hero-row {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    min-height: 420px;
  }

  .pis-hero-text {
    padding: 48px 8px 48px 16px;
  }

  .pis-hero-title {
    font-size: 34px;
  }

  .pis-hero-lead {
    font-size: 16px;
  }
}

/* md: banner iPad Pro */
@media (min-width: 992px) {
  .pis-hero {
    background-image: url(../img/banner-ipad-pro-paneles-impacto.png);
    background-image: image-set(url(../img/banner-ipad-pro-paneles-impacto.webp) type("image/webp"), url(../img/banner-ipad-pro-paneles-impacto.png) type("image/png"));
  }

  .pis-hero-row {
    min-height: 460px;
  }

  .pis-hero-text {
    padding: 56px 0;
  }

  .pis-hero-title {
    font-size: 42px;
  }

  .pis-hero-lead {
    margin-top: 20px;
    font-size: 18px;
  }
}

/* lg: banner desktop (diseño a partir de 1200px) */
@media (min-width: 1200px) {
  .pis-hero {
    background-image: url(../img/banner-desktop-paneles-impacto-social.png);
    background-image: image-set(url(../img/banner-desktop-paneles-impacto-social.webp) type("image/webp"), url(../img/banner-desktop-paneles-impacto-social.png) type("image/png"));
    background-position: center center;
  }

  .pis-hero-row {
    min-height: 480px;
  }

  .pis-hero-text {
    padding: 72px 0;
  }

  .pis-hero-title {
    font-size: 52px;
  }

  .pis-hero-lead {
    font-size: 20px;
  }
}

@media (min-width: 1440px) {
  .pis-hero-row {
    min-height: 520px;
  }

  .pis-hero-title {
    font-size: 60px;
  }

  .pis-hero-lead {
    font-size: 21px;
  }
}

/* ==========================================================================
   INTRO
   ========================================================================== */
.pis-intro {
  background: #ffffff;
  padding: 56px 0;
  text-align: center;
}

.pis-section-title {
  font-size: 26px !important;
  line-height: 1.2 !important;
  font-weight: 600;
  color: #081849 !important;
  text-wrap: balance;
}

.pis-divider {
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: #e8890c;
  margin: 24px auto;
}

.pis-intro p {
  font-size: 17px;
  line-height: 1.7;
  color: #081849;
}

.pis-intro p+p {
  margin-top: 20px;
  color: #2b3350;
}

@media (min-width: 768px) {
  .pis-intro {
    padding: 72px 0;
  }

  .pis-section-title {
    font-size: 30px;
  }

  .pis-intro p {
    font-size: 18px;
  }
}

@media (min-width: 1200px) {
  .pis-intro {
    padding: 88px 0;
  }

  .pis-section-title {
    font-size: 34px;
  }
}

/* ==========================================================================
   PANELES
   ========================================================================== */
.pis-panels {
  background: #081849;
  color: #ffffff;
  padding: 56px 0 72px;
}

.pis-panels-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

/* Filtros (chips) */
.pis-chips {
  margin: 0 -5px;
}

.pis-chip {
  display: inline-block;
  margin: 0 5px 10px;
  min-height: 44px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 41px;
  color: #ffffff;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  cursor: pointer;
  -webkit-transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.pis-chip:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.pis-chip.is-active,
.pis-chip.is-active:hover {
  background: #ffffff;
  color: #081849;
  border-color: #ffffff;
}

/* Panel */
.pis-panel {
  margin-top: 46px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

/* Reproductor de video: 16:9 en móvil y tablet, 450px de alto en desktop.
   Contiene el poster (.pis-thumb) y, al hacer clic, el iframe de YouTube. */
.pis-player {
  position: relative;
  height: 0;
  padding-bottom: 56.25%;
  border-radius: 18px;
  overflow: hidden;
  background: #000000;
  margin-bottom: 32px;
  -webkit-transform: translateZ(0);
  /* recorta el iframe con border-radius en Safari */
  transform: translateZ(0);
}

.pis-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  border: 0;
}

.pis-thumb {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0e2260;
  background-image: -webkit-linear-gradient(315deg, #0e2260 0%, #013f7c 100%);
  background-image: linear-gradient(135deg, #0e2260 0%, #013f7c 100%);
}

.pis-player.is-playing .pis-thumb {
  display: none;
}

.pis-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  -webkit-transition: -webkit-transform .4s ease, opacity .3s ease;
  transition: transform .4s ease, opacity .3s ease;
}

/* Con JS activo, la imagen aparece al cargar y se oculta si no existe */
.pis-js .pis-thumb img {
  opacity: 0;
}

.pis-js .pis-thumb img.is-loaded {
  opacity: 1;
}

.pis-thumb img.is-broken {
  display: none;
}

.pis-thumb:hover img,
.pis-thumb:focus img {
  -webkit-transform: scale(1.03);
  transform: scale(1.03);
}

.pis-thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: rgba(8, 24, 73, 0.55);
  -webkit-transition: background-color .2s ease;
  transition: background-color .2s ease;
}

.pis-thumb-play svg {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -12px 0 0 -9px;
}

.pis-thumb:hover .pis-thumb-play,
.pis-thumb:focus .pis-thumb-play {
  background: #e8890c;
  border-color: #e8890c;
}

.pis-thumb-duration {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(8, 24, 73, 0.88);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* Información del panel */
.pis-panel-kicker {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4fd1ee;
}

.pis-panel-title {
  font-size: 28px !important;
  line-height: 1.1 !important;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
}

.pis-panel-desc {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.65;
  color: #e4e8f6;
}

.pis-host {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.pis-host-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f3a33a;
}

.pis-host-name {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.pis-host-role {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.5;
  color: #cfd6ee;
}

/* Organizaciones aliadas */
.pis-orgs {
  margin-top: 40px;
}

.pis-orgs-title {
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cfd6ee !important;
}

.pis-cards {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.pis-cards>[class*="col-"] {
  display: -ms-flexbox;
  display: flex;
  margin-bottom: 20px;
}

.pis-card {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  width: 100%;
  padding: 24px;
  border-radius: 16px;
  background: #ffffff;
  color: #081849;
}

.pis-card-title {
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
  color: #081849;
  margin: 0 0 10px;
}

.pis-card-desc {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #2b3350;
}

.pis-card-rep {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #dfe2ee;
}

/* separación mínima entre descripción y representante */
.pis-card-desc {
  margin-bottom: 16px;
}

.pis-card-rep-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4a5273;
}

.pis-card-rep-name {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  font-weight: 700;
  color: #081849;
}

.pis-card-rep-role {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.45;
  color: #2b3350;
}

.pis-card-link {
  display: inline-block;
  margin-top: 8px;
  min-height: 44px;
  line-height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: #005f7a;
}

.pis-card-link:hover,
.pis-card-link:focus {
  color: #081849;
  text-decoration: underline;
}

.pis-card-link svg {
  margin: -3px 0 0 6px;
}

/* sm */
@media (min-width: 768px) {
  .pis-panels {
    padding: 72px 0 96px;
  }

  .pis-panel {
    margin-top: 56px;
    padding-top: 56px;
  }

  .pis-panel-title {
    font-size: 32px;
  }

  .pis-panel-desc {
    font-size: 17px;
  }

  .pis-card {
    padding: 28px;
  }

  .pis-cards>[class*="col-"] {
    margin-bottom: 30px;
  }
}

/* sm (tablet vertical): si queda una tarjeta impar al final, ocupa todo el ancho */
@media (min-width: 768px) and (max-width: 991px) {
  .pis-cards>[class*="col-"]:last-child:nth-child(odd) {
    width: 100%;
  }
}

/* md: miniatura e información lado a lado, centradas verticalmente */
@media (min-width: 992px) {
  .pis-panels-head {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
  }

  .pis-panels-title {
    margin-bottom: 0;
  }

  .pis-chips {
    margin-bottom: -10px;
  }

  .pis-panel-main {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
  }

  .pis-player {
    margin-bottom: 0;
  }

  .pis-panel-info {
    padding-left: 12px;
  }

  .pis-panel-title {
    font-size: 30px;
  }

  .pis-panel-desc {
    font-size: 16px;
    line-height: 1.6;
    margin-top: 14px;
  }

  .pis-host {
    margin-top: 18px;
    padding-top: 14px;
  }

  .pis-host-name {
    font-size: 17px;
  }

  .pis-host-role {
    font-size: 14px;
  }
}



/* ==========================================================================
   APORTES / VIDEO
   ========================================================================== */
.pis-aportes {
  padding: 64px 0;
  text-align: center;
}

.pis-aportes-title {
  font-size: 26px !important;
  line-height: 1.15 !important;
  font-weight: 700;
  color: #081849 !important;
  text-wrap: balance;
  margin-bottom: 32px !important;
}

/* Video de Aportes: mismo reproductor que los paneles, centrado.
   Ancho máximo 800px → en desktop mide 800 × 450 (16:9). */
.pis-player-aportes {
  max-width: 800px;
  margin: 0 auto;
}

.pis-readmore {
  display: inline-block;
  margin-top: 24px;
  min-height: 44px;
  line-height: 44px;
  font-size: 18px;
  font-weight: 700;
  color: #005f7a;
}

.pis-readmore:hover,
.pis-readmore:focus {
  color: #081849;
  text-decoration: underline;
}

.pis-readmore svg {
  margin: -3px 0 0 8px;
}



@media (min-width: 1200px) {
  .pis-aportes {
    padding: 96px 0;
  }

  .pis-aportes-title {
    font-size: 42px;
  }

  .pis-readmore {
    margin-top: 40px;
  }
}

@media (min-width: 1200px) {
  .pis-panels {
    padding: 80px 0 112px;
  }

  .pis-panel {
    margin-top: 72px;
    padding-top: 72px;
  }

  .pis-panel-title {
    font-size: 36px;
  }

  .pis-orgs {
    margin-top: 48px;
  }

  /* Desktop: video de 450px de alto (columna de 8/12 ≈ 776px de ancho) */
  .pis-player {
    height: 450px;
    padding-bottom: 0;
  }
}

@media (min-width: 992px) {
  .pis-aportes-title {
    font-size: 36px;
  }
}


@media (min-width: 768px) {
  .pis-aportes {
    padding: 80px 0;
  }

  .pis-aportes-title {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .pis-readmore {
    margin-top: 32px;
  }
}




/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *:before,
  *:after {
    -webkit-transition: none !important;
    transition: none !important;
  }

  .pis-thumb:hover img,
  .pis-thumb:focus img {
    -webkit-transform: none;
    transform: none;
  }
}