/* ============================================================
   PCX Card — reveal de texto + cambio de fondo
   Escritorio: hover · Táctil: toggle "+"
============================================================ */
.pcx_cards .e-atomic-element{
  padding: 0px!important;
}

.pcx_cards.type-pcx_cards .e-atomic-element {
  aspect-ratio: revert;
}

.pcx-card{
  position:relative;
  overflow:hidden;
  width:100%;
  aspect-ratio:16/9;
  border-radius:40px;
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  isolation:isolate;
}

/* ---------- fondos ---------- */
.pcx-card__bg{
  position:absolute; inset:0;
  background-size:cover;
  background-position:center;
  transition:transform .6s ease, filter .6s ease;
  z-index:0;
}
.pcx-card__scrim{
  position:absolute; inset:0; z-index:1;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.30) 100%), 50% / cover no-repeat;
  pointer-events:none;
}

/* ---------- etiquetas ---------- */
.pcx-card__tags{
  position:relative; z-index:2;
  display:flex; gap:10px;
  flex-wrap:wrap;
  padding:22px;
}
.pcx-card__tags:empty{ display:none; }
.pcx-tag{
  position:relative;
  display:inline-block;
  padding:10px 20px!important;
  border-radius:100px;
  background:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  font-family:"Glacial",system-ui,sans-serif;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  text-decoration:none;
  color:#fff;
}

.pcx-tag::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px; /* grosor del borde */
  background: linear-gradient(
    145deg,
    rgba(255,255,255,0.6) 0%,
    rgba(255,255,255,0.08) 30%,
    rgba(255,255,255,0.02) 55%,
    rgba(255,255,255,0.35) 100%
  );
  /* la máscara recorta el relleno y deja solo el "anillo" */
  -webkit-mask: linear-gradient(#000 0 0) content-box,
                linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .pcx-tag{ background:rgba(20,20,20,.55); }
}

/* ---------- lista independiente de tags (shortcode [pcx_categorias_disciplinas]) ---------- */
.pcx-tags-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  list-style:none;
  margin:0;
  padding:0;
}
.pcx-tags-list li{
  display:flex;
}

/* ---------- pie ---------- */
.pcx-card__footer{
  position:relative; z-index:2;
  padding:22px;
}
/* sin etiquetas: el footer se ancla abajo de la card */
.pcx-card__tags:empty ~ .pcx-card__footer{
  position:absolute;
  left:0; right:0; bottom:0;
}
.pcx-card__titlerow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.pcx-card__titlegroup{
  min-width:0;
}
.pcx-card__title{
  margin:0;
  font:800 clamp(28px,5vw,40px)/1 "Archivo Black",system-ui,sans-serif;
  text-transform:uppercase;
  letter-spacing:.02em;
}
.pcx-card__subtitle{
  margin:6px 0 0;
  font:500 14px/1.3 "Inter",system-ui,sans-serif;
  color:rgba(255,255,255,.75);
}

/* ---------- card completa clicable (disciplinas) ---------- */
.pcx-card[data-pcx-card-href]{ cursor:pointer; }
.pcx-card[data-pcx-card-href]:focus-visible{
  outline:2px solid #fff;
  outline-offset:3px;
}

/* toggle "+" -> "×" */
.pcx-card__toggle{
  flex:0 0 auto;
  /* width:44px; 
  height:44px; */
  display:grid; 
  place-items:center;
  background-color: transparent !important;
  border: none !important; 
  padding: 0 !important;
  cursor:pointer;
}

.pcx-card__toggle-icon{
  position:relative;
  width:24px; height:24px;
  transition:transform .35s ease;
}

.pcx-card__toggle-icon::before,
.pcx-card__toggle-icon::after{
  content:"";
  position:absolute; inset:0; margin:auto;
  background:#fff;
}
.pcx-card__toggle-icon::before{ width:24px; height:2px; }
.pcx-card__toggle-icon::after{ width:2px; height:24px; }

/* ---------- panel expandible ---------- */
.pcx-card__panel{
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows .45s ease;
}
.pcx-card__panel-inner{
  overflow:hidden;
  opacity:0;
  transform:translateY(6px);
  transition:opacity .35s ease .1s, transform .35s ease .1s;
}
.pcx-card__panel-inner p{
  margin:14px 0 0;
  font:400 15px/1.5 "Inter",system-ui,sans-serif;
  color:rgba(255,255,255,.9);
  max-width:38ch;
}

/* ---------- CTA ---------- */
.pcx-card__cta-wrap{
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows .45s ease;
}
.pcx-card__cta-inner{
  overflow:hidden;
  opacity:0;
  transform:translateY(6px);
  transition:opacity .35s ease .15s, transform .35s ease .15s;
}
.pcx-card__cta{
  display:inline-block;
  margin-top:16px;
  padding:12px 26px;
  border-radius:100px;
  border: 1px solid #FFF;
  background: none!important;
  color:#fff;
  font:700 12px/1 "Glacial Indifference",system-ui,sans-serif;
  text-transform:uppercase;
  text-decoration:none;
  transition:background .25s ease, transform .25s ease;
}

.pcx-card__cta:hover{
  color: #fff !important;;
}

.pcx-card__cta.pcx-card-discipline__cta{
background-color: var(--Corporate-Green)!important;
border: 0px!important;
}
/* .pcx-card__cta:hover{ background:#e8e8e8; transform:translateY(-2px); } */

/* ============================================================
   ESTADO ABIERTO — .is-open (JS, táctil) y :hover (escritorio)
============================================================ */
.pcx-card.is-open .pcx-card__bg{ transform:scale(1.04); filter:blur(10px); }
.pcx-card.is-open .pcx-card__panel{ grid-template-rows:1fr; }
.pcx-card.is-open .pcx-card__panel-inner{ opacity:1; transform:none; }
.pcx-card.is-open .pcx-card__toggle-icon{ transform:rotate(45deg); }
.pcx-card.is-open .pcx-card__cta-wrap{ grid-template-rows:1fr; }
.pcx-card.is-open .pcx-card__cta-inner{ opacity:1; transform:none; }

@media (hover:hover) and (pointer:fine){
  .pcx-card:hover .pcx-card__bg{ transform:scale(1.04); filter:blur(10px); }
  .pcx-card:hover .pcx-card__panel{ grid-template-rows:1fr; }
  .pcx-card:hover .pcx-card__panel-inner{ opacity:1; transform:none; }
  .pcx-card:hover .pcx-card__toggle-icon{ transform:rotate(45deg); }
  .pcx-card__toggle{ pointer-events:none; }

  /* CTA siempre visible en escritorio */
  .pcx-card__cta-wrap{ grid-template-rows:1fr; }
  .pcx-card__cta-inner{ opacity:1; transform:none; transition:none; }
}

/* toggle "+" solo tiene sentido táctil: el hover ya revela el contenido */
@media (min-width:1025px){
  .pcx-card__toggle{ display:none; }
}

@media (prefers-reduced-motion:reduce){
  .pcx-card, .pcx-card *{ transition:none !important; }
}

@media (max-width: 1024px) {
  .pcx-card{
      aspect-ratio:4/5;
  }
}

/* Disciplinas: siempre 4/5, sin importar el ancho */
.pcx-card--disciplines{
  aspect-ratio:4/5;
}

/* .pcx_disciplines.type-pcx_disciplines .e-atomic-element{
  padding: 0px!important;
} */