/**
 * Speakers & Mentores — Galería y Popup
 * Impact Regional Fellowship 2026
 *
 * Paleta:
 *   Primary   #ffa726  ·  Secondary  #ffc725
 *   Surface   #121212  ·  Background #0A0A0A
 *   Font      Montserrat 300 / 400 / 600 / 700 / 900
 */

/* ─────────────────────────────────────────────
   GALERÍA — CARDS
───────────────────────────────────────────── */

.mentores-search:focus-within {
  box-shadow: 0 0 12px rgba(255, 199, 37, 0.15);
  border-color: rgba(255, 199, 37, 0.5);
}

.mentor-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.mentor-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 167, 38, 0.45);
  box-shadow: 0 12px 40px -12px rgba(255, 167, 38, 0.22);
}

.mentor-img {
  filter: grayscale(100%) contrast(110%);
  transition: filter 0.35s ease;
}

.mentor-card:hover .mentor-img {
  filter: grayscale(0%) contrast(100%);
}

.mentor-popup-glow {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(255, 167, 38, 0.1),
    0 0 60px rgba(255, 167, 38, 0.06),
    0 40px 120px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Scrollbar personalizado (solo bio) */
.ponente-bio::-webkit-scrollbar        { width: 3px; }
.ponente-bio::-webkit-scrollbar-track  { background: transparent; }
.ponente-bio::-webkit-scrollbar-thumb  {
  background: rgba(255, 167, 38, 0.3);
  border-radius: 99px;
}
.ponente-bio::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 199, 37, 0.6);
}

/* Aliados */
#aliados-container .mentor-card .aspect-square { aspect-ratio: 3/2; padding: 0.75rem; }
#aliados-container .mentor-card > div:last-child { padding: 0.375rem 0.5rem 0.5rem; }


/* ═══════════════════════════════════════════════
   POPUP — ANIMACIONES DE ENTRADA
═══════════════════════════════════════════════ */

@keyframes popup-scale-in {
  from { opacity: 0; transform: scale(0.96) translateY(14px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

@keyframes ponente-section-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.ponente-popup-enter {
  animation: popup-scale-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ponente-anim {
  opacity: 0;
  animation: ponente-section-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ponente-popup-enter .ponente-anim-1 { animation-delay: 0.10s; }
.ponente-popup-enter .ponente-anim-2 { animation-delay: 0.17s; }
.ponente-popup-enter .ponente-anim-3 { animation-delay: 0.23s; }
.ponente-popup-enter .ponente-anim-4 { animation-delay: 0.29s; }
.ponente-popup-enter .ponente-anim-5 { animation-delay: 0.35s; }


/* ═══════════════════════════════════════════════
   POPUP — COLUMNA IMAGEN
═══════════════════════════════════════════════ */

/* Desktop: columna izquierda, 50% */
.ponente-img-col {
  display: none;
  position: relative;
  width: 50%;
  flex-shrink: 0;
  overflow: hidden;
  align-self: stretch;
}

@media (min-width: 768px) {
  .ponente-img-col { display: flex; flex-direction: column; }
}

/* Vignette superior */
.ponente-img-col::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30%;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.45) 0%,
    transparent 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Mobile: franja superior */
.ponente-img-mobile {
  display: block;
  position: relative;
  width: 100%;
  height: clamp(210px, 42vw, 290px);
  flex-shrink: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .ponente-img-mobile { display: none; }
}

/* La imagen */
.ponente-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.03);
  transform-origin: center 25%;
  will-change: transform;
  filter: grayscale(8%) contrast(1.12) brightness(0.87) saturate(0.88);
  transition: filter 0.4s ease;
}

/* Ken Burns al abrir */
.ponente-popup-enter .ponente-img {
  animation: sp-img-ken-burns 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sp-img-ken-burns {
  from { transform: scale(1.08); }
  to   { transform: scale(1.03); }
}

/* Gradient inferior */
.ponente-img-fade-bottom {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.96) 0%,
    rgba(10, 10, 10, 0.60) 18%,
    rgba(10, 10, 10, 0.20) 36%,
    rgba(10, 10, 10, 0.04) 52%,
    transparent 100%
  );
}

/* Blend lateral derecho — solo desktop */
.ponente-img-fade-right {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to right,
    transparent 50%,
    rgba(18, 18, 18, 0.35) 75%,
    rgba(18, 18, 18, 0.65) 100%
  );
}

@media (min-width: 768px) {
  .ponente-img-fade-right { display: block; }
}


/* ═══════════════════════════════════════════════
   POPUP — COLUMNA CONTENIDO
   Clave: solo .ponente-bio hace scroll
═══════════════════════════════════════════════ */

.ponente-content-col {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #121212;
  padding: 1.1rem 1.1rem 1rem;
  gap: 0.6rem;
}

/* Línea gradient en el borde superior del panel */
.ponente-content-col::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #ffa726 30%,
    #ffc725 60%,
    transparent 100%
  );
  opacity: 0.6;
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 768px) {
  .ponente-content-col {
    width: 50%;
    flex: 0 0 50%;
    padding: 1.5rem 1.75rem 1.25rem;
    gap: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .ponente-content-col {
    padding: 2.25rem 2.5rem 2rem;
    gap: 1rem;
  }
}

/* Sección estática: header + meta + tags */
.ponente-static {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .ponente-static { gap: 0.85rem; }
}

/* Alineación: ninguna sección tiene sangría extra */
.ponente-header,
.ponente-meta-row,
.ponente-tags,
.ponente-bio,
.ponente-footer {
  margin-left: 0;
  padding-left: 0;
}


/* ── Header ─────────────────────────────────── */

.ponente-header { display: flex; flex-direction: column; }

.ponente-name {
  font-size: clamp(1.25rem, 4.5vw, 2.1rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(255, 167, 38, 0.06);
}

@media (min-width: 768px) {
  .ponente-name { font-size: clamp(1.55rem, 2.8vw, 2.3rem); }
}

/* Rol + empresa en UNA sola fila */
.ponente-role-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.35rem;
}

.ponente-role {
  font-size: 0.91rem;
  font-weight: 600;
  color: rgba(215, 220, 228, 0.92);
  line-height: 1.4;
  letter-spacing: 0.025em;
}

.ponente-role-sep {
  font-size: 0.91rem;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1;
  user-select: none;
}

.ponente-company {
  font-size: 0.91rem;
  font-weight: 700;
  color: #ffa726;
  letter-spacing: 0.025em;
}

/* Accent bar */
.ponente-accent-bar {
  margin-top: 0.75rem;
  height: 3px;
  width: 3.5rem;
  border-radius: 99px;
  background: linear-gradient(90deg, #ffa726 0%, #ffc725 100%);
  box-shadow: 0 0 10px rgba(255, 167, 38, 0.55);
}


/* ── Meta row: ubicación + LinkedIn ─────────── */

.ponente-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ponente-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.77rem;
  font-weight: 500;
  color: rgba(156, 163, 175, 0.85);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  padding: 0.32rem 0.85rem;
  letter-spacing: 0.01em;
}

.ponente-meta-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: rgba(156, 163, 175, 0.85);
  flex-shrink: 0;
}

.ponente-meta-icon svg { width: 100%; height: 100%; }

.ponente-meta-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.77rem;
  font-weight: 600;
  color: rgba(180, 186, 196, 0.88);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  padding: 0.32rem 0.85rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ponente-meta-linkedin svg { width: 14px; height: 14px; flex-shrink: 0; }

.ponente-meta-linkedin:hover {
  color: #ffa726;
  background: rgba(255, 167, 38, 0.08);
  border-color: rgba(255, 167, 38, 0.25);
}


/* ── Tags ────────────────────────────────────── */

.ponente-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.ponente-tag {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 0.3rem 0.88rem;
  color: rgba(255, 192, 60, 0.88);
  background: rgba(255, 167, 38, 0.08);
  border: 1px solid rgba(255, 167, 38, 0.32);
  transition: background 0.22s ease, color 0.22s ease,
              transform 0.22s ease, box-shadow 0.22s ease,
              border-color 0.22s ease;
}

.ponente-tag:hover {
  background: rgba(255, 167, 38, 0.14);
  color: #ffc725;
  border-color: rgba(255, 199, 37, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(255, 167, 38, 0.2);
}


/* ── Bio — ÚNICO elemento con scroll ─────────── */

.ponente-bio {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.78;
  color: rgba(168, 174, 186, 0.9);
  padding-right: 0.3rem;
  margin-top: 0.3rem;
}

@media (min-width: 768px) {
  .ponente-bio {
    font-size: 0.94rem;
    line-height: 1.82;
    padding-right: 0.4rem;
    margin-top: 0.45rem;
  }
}

.ponente-bio p + p { margin-top: 0.6rem; }


/* ── Footer estático ─────────────────────────── */

.ponente-footer {
  flex-shrink: 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ponente-social-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.ponente-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(107, 114, 128, 0.85);
  text-decoration: none;
  transition: color 0.22s ease, background 0.22s ease,
              border-color 0.22s ease, transform 0.22s ease;
}

.ponente-social-icon svg { width: 16px; height: 16px; }

.ponente-social-icon:hover {
  color: #ffa726;
  background: rgba(255, 167, 38, 0.1);
  border-color: rgba(255, 167, 38, 0.3);
  transform: scale(1.12) translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 167, 38, 0.18);
}

.ponente-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ffa726 0%, #ffc725 100%);
  background-size: 200% auto;
  color: #0a0a0a;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.68rem 1.7rem;
  border-radius: 99px;
  text-decoration: none;
  transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 2px 14px rgba(255, 167, 38, 0.28);
}

.ponente-cta svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ponente-cta:hover {
  box-shadow: 0 6px 26px rgba(255, 167, 38, 0.55);
  transform: translateY(-2px);
  background-image: linear-gradient(
    135deg,
    #ffa726 0%,
    #ffc725 40%,
    #fff8e1 50%,
    #ffc725 60%,
    #ffa726 100%
  );
  background-size: 200% auto;
  animation: cta-shimmer 0.8s linear;
}

.ponente-cta:hover svg { transform: translateX(4px); }


/* ── Botón cerrar ────────────────────────────── */

.ponente-close-btn {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(209, 213, 219, 0.75);
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease,
              border-color 0.22s ease, transform 0.22s ease;
}

.ponente-close-btn svg { width: 14px; height: 14px; }

.ponente-close-btn:hover {
  background: linear-gradient(135deg, #ffa726 0%, #ffc725 100%);
  color: #0a0a0a;
  border-color: transparent;
  transform: scale(1.08) rotate(90deg);
}


/* ═══════════════════════════════════════════════
   DETALLES PREMIUM
═══════════════════════════════════════════════ */

@keyframes cta-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes accent-bar-grow {
  from { width: 0; opacity: 0; }
  to   { width: 3.5rem; opacity: 0.9; }
}

.ponente-popup-enter .ponente-accent-bar {
  animation: accent-bar-grow 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* Gradient overlay refinado */
.ponente-img-fade-bottom {
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.45) 30%,
    rgba(10, 10, 10, 0.08) 55%,
    transparent 100%
  );
}

/* ─────────────────────────────────────────────
   ALTURA FIJA DEL CARD — consistencia en desktop
───────────────────────────────────────────── */

@media (min-width: 1024px) {
  #ponente-popup-content,
  #mentor-popup-content {
    height: clamp(520px, 72vh, 660px);
  }
}

/* ── Accesibilidad ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ponente-popup-enter,
  .ponente-anim,
  .ponente-popup-enter .ponente-accent-bar,
  .ponente-cta:hover { animation: none; opacity: 1; transform: none; }
}


/* ═══════════════════════════════════════════════
   BACKDROP PREMIUM
   Blur 18px + desaturación + vignette radial:
   el centro (donde vive el modal) queda más claro
   y los bordes se oscurecen → efecto spotlight
═══════════════════════════════════════════════ */

.ponente-popup-backdrop {
  /*
   * brightness(0.52): página se percibe detrás pero enfocada/apagada.
   * blur(12px): suaviza sin borrar. saturate(0.55): quita color sin grises.
   * Equilibrio Apple/Vercel: profundidad sin asfixiar.
   */
  -webkit-backdrop-filter: blur(12px) brightness(0.52) saturate(0.55);
  backdrop-filter: blur(12px) brightness(0.52) saturate(0.55);
  /* Vignette radial: spotlight suave sobre el modal */
  background: radial-gradient(
    ellipse 85% 70% at 50% 50%,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.68) 100%
  );
  cursor: default;
}


/* ═══════════════════════════════════════════════
   MOBILE — BOTTOM SHEET
═══════════════════════════════════════════════ */

@keyframes sheet-slide-up {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (max-width: 767px) {

  .ponente-popup-wrapper {
    align-items: flex-end !important;
    padding: 0 !important;
    overflow-y: hidden !important;
  }

  #ponente-popup-content,
  #mentor-popup-content {
    border-radius: 20px 20px 0 0;
    height: 88vh;
    max-height: 88vh;
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-left-width: 0;
    border-right-width: 0;
    border-bottom-width: 0;
  }

  #ponente-popup-content::before,
  #mentor-popup-content::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 99px;
    z-index: 40;
    pointer-events: none;
  }

  .ponente-popup-enter {
    animation: sheet-slide-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
}
