/*
 * From Uiverse.io by vk-uiux - https://uiverse.io/vk-uiux/nasty-chicken-72
 * MIT License, Copyright (c) vk-uiux (Vishal Kumar)
 */

/* Tarjeta 00 unificada dentro del acordeón 100vh: Logo UTSJR + Foto Grande + SEAES -> Datos + Logout */
.tarjeta-perfil-acordeon {
  flex: 1.75 1 0;
  background: rgba(34, 38, 40, 0.80) !important;
  border-color: rgba(255, 255, 255, 0.30) !important;
  color: #ffffff;
  justify-content: space-between;
  align-items: center;
  padding: 24px 14px;
}

.tarjeta-perfil-acordeon::before {
  background: var(--espectro-seaes) !important;
}

.tarjeta-perfil-acordeon.expandida {
  flex-grow: 5.4;
  padding: 32px 38px;
  background: rgba(28, 32, 35, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.48) !important;
  box-shadow: 0 24px 54px rgba(10, 14, 18, 0.36);
}

.perfil-acordeon-top {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.capsula-logo-perfil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  max-width: 100%;
}

.logo-utsjr-perfil {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(32px, 4.2vh, 44px);
  transition: max-height 0.35s ease;
}

.tarjeta-perfil-acordeon.expandida .logo-utsjr-perfil {
  max-height: clamp(44px, 5.8vh, 56px);
}

.perfil-acordeon-centro {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

/* Círculo de foto grande con el gradiente deslizante de nasty-chicken-72 */
.perfil-chicken-icono {
  position: relative;
  margin: 0 auto;
  width: min(100%, 156px);
  aspect-ratio: 1 / 1;
  height: auto;
  padding: 6px;
  background: linear-gradient(
    90deg,
    #f59f00 0%,
    #db2777 20%,
    #1d6ce0 40%,
    #0d9488 55%,
    rgba(255, 255, 255, 0.18) 72%
  );
  background-size: 420px;
  background-position: 0px;
  border-radius: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background-position 0.7s ease;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.36);
}

.tarjeta-perfil-acordeon.expandida .perfil-chicken-icono {
  width: clamp(176px, 20vh, 214px);
  background-position: -210px;
}

.perfil-chicken-icono .avatar-grande {
  width: 100%;
  height: 100%;
  border: 4px solid #1e2326;
  background: #ecece8;
}

.perfil-acordeon-pie {
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.perfil-seaes-preview {
  display: block;
  font-family: var(--fuente-display);
  font-size: clamp(1.9rem, 2.4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-align: center;
}

.tarjeta-perfil-acordeon.expandida .perfil-acordeon-pie {
  display: none;
}

/* Datos ocultos en reposo -> visibles al expandir la tarjeta 00 */
.perfil-chicken-datos {
  display: none;
  width: 100%;
  max-width: 520px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

.tarjeta-perfil-acordeon.expandida .perfil-chicken-datos {
  display: flex;
  animation: revelar-datos-perfil 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}

@keyframes revelar-datos-perfil {
  0% { opacity: 0; transform: translate3d(0, 14px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

.perfil-chicken-titulo {
  margin: 0;
  color: #ffffff;
  font-family: var(--fuente-display);
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.12;
}

.perfil-chicken-correo {
  margin: 0;
  font-size: clamp(1.18rem, 1.45vw, 1.42rem);
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #dfe6ea;
  word-break: break-word;
}

.perfil-divisor-espectro {
  display: block;
  width: 96px;
  height: 4px;
  border-radius: 2px;
  background: var(--espectro-seaes);
  margin: 4px 0;
}

.perfil-significado-seaes {
  margin: 0;
  font-size: clamp(1.08rem, 1.3vw, 1.28rem);
  font-weight: 500;
  color: #cfd8dc;
  line-height: 1.42;
  max-width: 38ch;
}

.perfil-significado-seaes strong {
  font-family: var(--fuente-display);
  letter-spacing: 0.08em;
  color: #ffffff;
}

.perfil-acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.btn-accesos-card {
  background: linear-gradient(135deg, #0d9488, #1d6ce0);
  color: #ffffff;
  padding: 13px 24px;
  font-size: 1.04rem;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-salir-card {
  background: #ef4444;
  color: #ffffff;
  padding: 13px 26px;
  font-size: 1.04rem;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.btn-salir-card:hover { background: #dc2626; }

@media (max-width: 1100px) {
  .tarjeta-perfil-acordeon {
    flex: none;
    height: auto;
    min-height: 104px;
    flex-direction: row;
    justify-content: space-between;
    padding: 14px 18px;
    gap: 14px;
  }
  .tarjeta-perfil-acordeon.expandida {
    flex-direction: column;
    padding: 26px 20px;
    gap: 18px;
  }
  .tarjeta-perfil-acordeon:not(.expandida) .perfil-acordeon-top { width: auto; }
  .tarjeta-perfil-acordeon:not(.expandida) .perfil-acordeon-centro { flex: none; width: auto; }
  .tarjeta-perfil-acordeon:not(.expandida) .perfil-chicken-icono { width: 76px; height: 76px; padding: 4px; }
  .tarjeta-perfil-acordeon:not(.expandida) .logo-utsjr-perfil { height: 32px; }
  .tarjeta-perfil-acordeon:not(.expandida) .perfil-seaes-preview { font-size: 1.6rem; }
}
