/* ==========================================================================
   app-emc — "Mensajes destacados" (videos de líderes del curso), Home
   BEM naming: block "app-emc", elements "app-emc__x", modifiers "app-emc__x--y"
   ========================================================================== */

.app-emc {
  --app-emc-navy-1: #0b1830;
  --app-emc-navy-2: #1b2f52;
  --app-emc-accent: #43dca0;
  --app-emc-blue: var(--main-color, #015fea);
  --app-emc-tag-bg: #eaf2ff;
  --app-emc-tag-color: #0d4fb0;
  padding: 3rem 0;
}

/* ---------- Header ---------- */

.app-emc__header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.app-emc__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--app-emc-blue);
  margin-bottom: 0.75rem;
}

.app-emc__eyebrow-icon {
  font-size: 0.85rem;
}

.app-emc__title {
  font-weight: 800;
  margin: 0 0 1rem;
  color: #10203c;
}

.app-emc__title-bar {
  width: 64px;
  height: 4px;
  margin: 0 auto;
  border-radius: 4px;
  background: var(--app-emc-blue);
}

/* ---------- Grid ---------- */

.app-emc__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 767px) {
  .app-emc__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Card ---------- */

.app-emc__card {
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease;
}

.app-emc__card:hover {
  transform: translateY(-6px);
}

/* ---------- Media (video trigger) ---------- */

.app-emc__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--app-emc-navy-2), var(--app-emc-navy-1));
  box-shadow: 0 10px 30px rgba(11, 24, 48, 0.25);
  cursor: pointer;
  transition: box-shadow 0.35s ease;
}

.app-emc__card:hover .app-emc__media {
  box-shadow: 0 16px 38px rgba(11, 24, 48, 0.38);
}

.app-emc__thumb-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid var(--app-emc-accent);
  aspect-ratio: 16 / 10;
  background: #05101f;
}

.app-emc__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.6s ease;
}

.app-emc__card:hover .app-emc__thumb {
  transform: scale(1.08);
}

.app-emc__badge {
  position: absolute;
  top: 26px;
  left: 26px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  border-radius: 999px;
  background: rgba(8, 16, 32, 0.72);
  backdrop-filter: blur(2px);
}

.app-emc__badge--invite {
  background: rgba(1, 95, 234, 0.88);
}

.app-emc__overline {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.app-emc__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--app-emc-blue);
  color: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 rgba(1, 95, 234, 0.55);
  animation: app-emc-pulse 2.4s ease-out infinite;
  transition: transform 0.3s ease, background 0.3s ease;
}

.app-emc__play svg {
  width: 20px;
  height: 20px;
  margin-left: 3px;
  fill: currentColor;
}

.app-emc__card:hover .app-emc__play {
  transform: translate(-50%, -50%) scale(1.1);
  background: #0148b8;
}

@keyframes app-emc-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(1, 95, 234, 0.5);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(1, 95, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(1, 95, 234, 0);
  }
}

.app-emc__watermark {
  position: absolute;
  left: 28px;
  bottom: -18px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  background: #fff;
}

.app-emc__watermark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-emc__caption {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.7rem 1rem 0.6rem;
}

.app-emc__flag {
  font-size: 1.15rem;
  line-height: 1;
}

/* ---------- Body (white info card) ---------- */

.app-emc__body {
  margin-top: 1.25rem;
  padding: 1.5rem 1.5rem 1.75rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(16, 32, 60, 0.08);
}

.app-emc__name {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #10203c;
}

.app-emc__role {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--app-emc-blue);
}

.app-emc__desc {
  margin: 0 0 1.1rem;
  color: #4a5568;
  line-height: 1.6;
}

.app-emc__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-emc__tag {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--app-emc-tag-color);
  background: var(--app-emc-tag-bg);
  border-radius: 999px;
}

/* ---------- Modal (video player) ---------- */

.app-emc__modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.app-emc__modal--open {
  visibility: visible;
  opacity: 1;
}

.app-emc__modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 24, 0.82);
}

.app-emc__modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  transform: scale(0.94);
  transition: transform 0.3s ease;
}

.app-emc__modal--open .app-emc__modal-dialog {
  transform: scale(1);
}

.app-emc__modal-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.app-emc__modal-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.app-emc__modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease;
}

.app-emc__modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
