﻿/* ================================================================
   EP de México – Programas de Calidad (componente interactivo)
   css/ep-programas.css
   ================================================================ */

/* ─── SECCIÓN WRAPPER ────────────────────────────────────────── */
.prog-cards-section { padding: 0 !important; background: transparent !important; }

.epc-wrap {
  position: relative;
  background: #EEF2FF;
  overflow: hidden;
  padding: 64px 28px 72px;
}
.epc-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.epc-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── HEADER ─────────────────────────────────────────────────── */
.epc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  color: #1A56DB;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.epc-eyebrow-dot {
  width: 8px; height: 8px;
  background: #1A56DB;
  border-radius: 50%;
}
.epc-sec-title {
  font-size: clamp(30px, 4.5vw, 56px);
  font-weight: 900;
  color: #0A1628;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  line-height: 1.1;
  text-transform: uppercase;
}
.epc-sec-title em { color: #1558A0; font-style: normal; }
.epc-sec-sub {
  font-size: 15px;
  color: #64748B;
  margin-bottom: 40px;
}

/* ─── GRID ───────────────────────────────────────────────────── */
.epc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 960px) { .epc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .epc-grid { grid-template-columns: 1fr; } }

/* ─── TARJETAS ───────────────────────────────────────────────── */
.epc-card {
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .35s cubic-bezier(.34,1.4,.64,1), box-shadow .3s;
  background: #fff;
  border: none;
  opacity: 0;
  transform: translateY(28px);
}
@keyframes epc-card-in {
  to { opacity: 1; transform: translateY(0); }
}
.epc-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,.16);
}

.epc-card-top {
  padding: 28px 20px 22px;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.epc-card-top::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.epc-card-top::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}

.epc-card.c-ec  .epc-card-top { background: linear-gradient(150deg, #1B8A5A, #16a34a); }
.epc-card.c-esp .epc-card-top { background: linear-gradient(150deg, #9B1D6A, #c026d3); }
.epc-card.c-mae .epc-card-top { background: linear-gradient(150deg, #1A56DB, #2563eb); }
.epc-card.c-doc .epc-card-top { background: linear-gradient(150deg, #5B21B6, #7c3aed); }

.epc-icon-box {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.18);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  position: relative; z-index: 1;
  transition: transform .3s cubic-bezier(.34,1.6,.64,1);
  flex-shrink: 0;
}
.epc-card:hover .epc-icon-box { transform: rotate(-8deg) scale(1.15); }
.epc-icon-box svg { width: 22px; height: 22px; fill: #fff; }

.epc-prog-count {
  display: inline-block;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
  margin-bottom: 10px;
  position: relative; z-index: 1;
  letter-spacing: .4px;
}
.epc-card-cat {
  font-size: 13px; font-weight: 800;
  color: #fff; letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  position: relative; z-index: 1;
}
.epc-card-desc {
  font-size: 11px;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
  position: relative; z-index: 1;
}

.epc-card-bottom {
  background: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.epc-cta-txt {
  font-size: 10px; font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.epc-card.c-ec  .epc-cta-txt { color: #16a34a; }
.epc-card.c-esp .epc-cta-txt { color: #c026d3; }
.epc-card.c-mae .epc-cta-txt { color: #2563eb; }
.epc-card.c-doc .epc-cta-txt { color: #7c3aed; }

.epc-arrow {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s;
  flex-shrink: 0;
}
.epc-card:hover .epc-arrow { transform: translateX(4px); }
.epc-card.c-ec  .epc-arrow { background: #16a34a; }
.epc-card.c-esp .epc-arrow { background: #c026d3; }
.epc-card.c-mae .epc-arrow { background: #2563eb; }
.epc-card.c-doc .epc-arrow { background: #7c3aed; }
.epc-arrow svg { width: 14px; height: 14px; fill: #fff; }

/* ─── MODAL OVERLAY ──────────────────────────────────────────── */
.epc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,.72);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.epc-overlay.open { opacity: 1; pointer-events: all; }

.epc-box {
  background: #0F172A;
  border-radius: 20px;
  width: min(720px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: scale(.92) translateY(24px);
  transition: transform .35s cubic-bezier(.34,1.3,.64,1);
  border: 1px solid rgba(255,255,255,.08);
  position: relative;
}
.epc-overlay.open .epc-box { transform: scale(1) translateY(0); }

/* Cabecera modal */
.epc-mhdr {
  padding: 20px 24px 18px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.epc-mhdr-left { display: flex; align-items: center; gap: 14px; }
.epc-hicon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.epc-hicon svg { width: 22px; height: 22px; fill: #fff; }
.epc-htitle { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: .2px; }
.epc-hsub   { font-size: 13px; color: #64748B; margin-top: 2px; }
.epc-mclose {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.06);
  border: none; border-radius: 50%;
  cursor: pointer; color: #94A3B8;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
  line-height: 1;
}
.epc-mclose:hover { background: rgba(255,255,255,.12); }

/* Búsqueda */
.epc-msearch {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.epc-msearch input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12px; color: #fff;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  transition: border-color .2s;
}
.epc-msearch input::placeholder { color: #475569; }
.epc-msearch input:focus { border-color: rgba(255,255,255,.25); }

/* Cuerpo modal */
.epc-mbody {
  overflow-y: auto;
  padding: 20px 24px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.epc-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) { .epc-list { grid-template-columns: 1fr; } }

.epc-item {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
  position: relative; overflow: hidden;
}
.epc-item:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
  transform: translateX(3px);
}
.epc-item-top {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.epc-item-name { font-size: 14px; font-weight: 700; color: #E2E8F0; line-height: 1.4; }
.epc-item-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
  white-space: nowrap; flex-shrink: 0;
}
.epc-b-presencial { background: rgba(16,185,129,.15); color: #34D399; }
.epc-b-linea      { background: rgba(59,130,246,.15);  color: #60A5FA; }
.epc-b-hibrida    { background: rgba(245,158,11,.15);  color: #FCD34D; }

.epc-item-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.epc-meta-chip {
  font-size: 11px; color: #64748B;
  display: flex; align-items: center; gap: 4px;
}
.epc-meta-chip svg { width: 12px; height: 12px; fill: #475569; }

.epc-item-arrow {
  position: absolute; right: 14px; bottom: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.epc-item:hover .epc-item-arrow { opacity: 1; }

/* ─── PANEL DETALLE ──────────────────────────────────────────── */
.epc-detail {
  position: absolute; inset: 0;
  background: #0F172A;
  border-radius: 20px;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  z-index: 2;
}
.epc-detail.show { transform: translateX(0); }

.epc-dhdr {
  padding: 18px 22px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.epc-dback {
  background: rgba(255,255,255,.06);
  border: none; border-radius: 8px;
  padding: 7px 12px;
  font-size: 11px; font-weight: 600; color: #94A3B8;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  display: flex; align-items: center; gap: 6px;
  transition: background .2s;
}
.epc-dback:hover { background: rgba(255,255,255,.12); }
.epc-dback svg { width: 13px; height: 13px; fill: #94A3B8; }
.epc-dbread { font-size: 11px; color: #475569; }

.epc-dbody {
  overflow-y: auto; flex: 1; padding: 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.epc-dhero {
  border-radius: 14px; padding: 24px; margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.epc-dhero::before {
  content: '';
  position: absolute; top: -20px; right: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.epc-dhero-name { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 6px; line-height: 1.3; }
.epc-dhero-sub  { font-size: 12px; color: rgba(255,255,255,.7); line-height: 1.6; }

.epc-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.epc-chip {
  font-size: 10px; font-weight: 600;
  padding: 4px 10px; border-radius: 12px;
  background: rgba(255,255,255,.15); color: #fff;
}
.epc-dsec { margin-bottom: 18px; }
.epc-dsec h4 {
  font-size: 11px; font-weight: 700; color: #475569;
  letter-spacing: .8px; text-transform: uppercase;
  margin-bottom: 10px;
}
.epc-dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.epc-infobox {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; padding: 12px;
}
.epc-infobox-lbl {
  font-size: 9px; color: #475569; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 4px;
}
.epc-infobox-val { font-size: 13px; font-weight: 700; color: #E2E8F0; }

.epc-reqlist { display: flex; flex-direction: column; gap: 7px; }
.epc-reqitem { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; color: #94A3B8; line-height: 1.5; }
.epc-reqdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }

.epc-dfooter {
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex; gap: 10px; flex-shrink: 0;
}
.epc-btn-insc {
  flex: 1; padding: 13px; border-radius: 24px; border: none;
  font-weight: 700; font-size: 13px; cursor: pointer; color: #fff;
  font-family: 'Montserrat', sans-serif;
  transition: transform .15s, opacity .2s;
}
.epc-btn-insc:hover { transform: translateY(-1px); opacity: .9; }
.epc-btn-wa2 {
  flex: 1; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 24px; border: none;
  font-weight: 700; font-size: 12px; cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: background .2s;
}
.epc-btn-wa2:hover { background: #1db954; }
.epc-btn-wa2 svg { width: 16px; height: 16px; fill: #fff; }
