/* =========================
   Videos Semanales (thumb)
   ========================= */
.project-box-inner.weekly-video-thumb{
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Oscurece un poco para que el texto se lea */
.project-box-inner.weekly-video-thumb:before{
  content:'';
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.55) 100%);
}

/* Asegura que el título quede arriba del overlay */
.project-box-inner.weekly-video-thumb h4{
  position: relative;
  z-index: 1;
}

/* Mantén título visible en hover (tu CSS lo pone negro al hover) */
.project-box:hover .project-box-inner.weekly-video-thumb h4{
  color: #fff;
}

.weekly-video-play{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:3.9rem;
  height:3.9rem;
  border:2px solid #fff;
  border-radius:50%;
  z-index: 1;
}

.weekly-video-play:before{
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  transform: translate(-35%,-50%);
  width:0;
  height:0;
  border-style: solid;
  border-width: .65rem 0 .65rem 1.05rem;
  border-color: transparent transparent transparent #fff;
}

/* =========================
   Modal (pop-up) video
   ========================= */
.is-weekly-video-open{
  overflow: hidden;
}

.weekly-video-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 2000;
}

.weekly-video-modal.is-open{
  display: flex;
}

.weekly-video-modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.75);
}

.weekly-video-modal__dialog{
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

.weekly-video-modal__player{
  width: 100%;
  height: auto;
  max-height: 80vh;
  display: block;
  background: #000;
  object-fit: contain; /* ideal para videos verticales tipo reel */
}

.weekly-video-modal__close{
  position:absolute;
  top: .5rem;
  right: .5rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 1.6rem;
  line-height: 2.5rem;
  text-align: center;
  z-index: 2;
  cursor: pointer;
}

.weekly-video-modal__close:hover{
  background: rgba(0,0,0,.8);
  color: #fff;
}

@media (max-width: 576px){
  .weekly-video-modal{ padding: .75rem; }
  .weekly-video-modal__player{ max-height: 70vh; }
}

/* Desktop */
/* Base compartida */
#home{ position: relative; overflow: hidden; }
#home .home-person{
  background-image: url('../img/bg-alone.png');
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

/* ----- Desktop ----- */
#home .home-person--desktop{
  position: absolute;
  right: 0;
  bottom: 0;
  left: auto;

  width: min(46vw, 520px);
  height: 92vh;

  background-position: right bottom;
  z-index: 1;
}

/* Oculta el mobile-person en desktop */
#home .home-person--mobile{ display: none; }
.btn-start-mobile{ display: none; }
.btn-start-mobile-fixed{ display: none; }
/* Texto arriba de la persona desktop */
#home .intro{ position: relative; z-index: 2; }

@media (max-width: 768px){

  /* Deja de centrar verticalmente el home para que pueda crecer hacia abajo */
  #home.pp-scrollable{
    align-items: flex-start !important; /* sobreescribe d-flex align-items-center */
  }

  /* Reduce padding vertical para ganar espacio útil */
  #home .pp-scrollable .scroll-wrap,
  #home .scroll-wrap{
    padding: 6rem 0 2.5rem !important;
  }

  /* Columna: texto arriba, luego persona */
  #home .row{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* Asegura que la columna no esté “fija” a un alto que impida crecer */
  #home .intro,
  #home .scroll-wrap,
  #home .container,
  #home .row,
  #home .col-lg-6.col-xl-5{
    height: auto !important;
    min-height: 0 !important;
  }

  /* usa el elemento “en flujo” */
  #home .home-person--desktop{ display: none; }
  #home .home-person--mobile{
    display: block;
    position: relative;
    margin: 1.25rem auto 5px;

    width: min(82vw, 360px);
    height: min(52vh, 420px);

    background-position: center bottom;
  }

  /* centra el H1 */
  #home h1{
    text-align: center;
    margin: 0;
    font-size: 2.1rem;
    line-height: 1.15;
  }

  #home .scroll-wrap{
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .btn-start-mobile{
    display: inline-block;
    margin-top: 1.25rem;
    margin-bottom: 1rem;
  }

    .btn-start-mobile-fixed{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-base);
    position: fixed;
    left: 50%;
    transform: translateX(-50%);

    bottom: max(16px, env(safe-area-inset-bottom)); /* iPhone notch */
    z-index: 3000;

    width: min(92vw, 420px);
    padding: 14px 18px;
    border-radius: 999px;
    box-shadow: 0 14px 30px rgba(0,0,0,.35);
  }

  /* Para que no tape contenido del home */
  #home .scroll-wrap{
    padding-bottom: 6rem !important;
  }
  .experience-info { padding-bottom: 3rem; }

}
