:root {
  --primary: #871e44;
  --primary-dark: #621130;
  --primary-light: #fdf0f4;

  --gold: #bc955c;
  --gold-light: #e4bc7a;

  --bg: #faf8f4;
  --surface: #ffffff;

  --text: #2d2d2d;
  --text-main: #1f0a10;
  --text-muted: #64748b;

  --border: #f0ebe3;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  margin: 0;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #bc955c44;
  border-radius: 99px;
}

.hero-gradient {
  background:
    radial-gradient(circle at 85% 10%, rgba(228,188,122,.18), transparent 28%),
    linear-gradient(135deg, #1a0208 0%, #621130 32%, #871e44 68%, #a82a5a 100%);
  background-size: 140% 140%;
  animation: panGrad 10s ease-in-out infinite alternate;
}

@keyframes panGrad {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Categorías */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,.03);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: radial-gradient(
    circle at 50% 0%,
    var(--cat-glow, rgba(135,30,68,.12)) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity .3s ease;
  z-index: -1;
}

.profile-header-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.profile-icon {
  background: var(--cat-bg, #f3f4f6);
  color: var(--cat-color, var(--primary));
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform .3s ease, background .3s ease, color .3s ease;
  border: 1px solid #e5e7eb;
}

.profile-card h4 {
  margin: 0;
  font-size: .95rem;
  color: var(--text);
  font-weight: 700;
  transition: color .3s ease;
}

.profile-card p {
  margin: 0;
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease, margin .3s ease;
  position: relative;
  z-index: 2;
}

.profile-card:hover,
.profile-card.active {
  transform: translateY(-3px);
  border-color: var(--cat-color, var(--primary));
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
}

.profile-card:hover::before,
.profile-card.active::before {
  opacity: 1;
}

.profile-card:hover .profile-icon,
.profile-card.active .profile-icon {
  transform: scale(1.06);
  background: var(--cat-color);
  color: #fff;
}

.profile-card:hover h4,
.profile-card.active h4 {
  color: var(--cat-color);
}

.profile-card:hover p,
.profile-card.active p {
  max-height: 70px;
  opacity: 1;
  margin-top: 4px;
}

/* Skeleton */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-anim {
  background: linear-gradient(
    90deg,
    #f0ebe3 25%,
    #e8e1d6 50%,
    #f0ebe3 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

/* Filtros */
.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(135,30,68,.2);
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
}

.filter-badge button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: bold;
  font-size: .85rem;
  padding: 0;
  line-height: 1;
}

/* Animaciones Generales */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp .4s ease forwards;
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Móvil */
@media (max-width: 640px) {
  .profiles-grid {
    grid-template-columns: 1fr;
  }
  .profile-card p {
    max-height: none;
    opacity: 1;
  }
  .btn-action {
    width: 100%;
  }
}

.btn-action {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  text-decoration: none;
  font-family: inherit;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  white-space: nowrap; 
  font-size: 0.8rem; 
}

.btn-link {
  background: var(--primary); 
  color: white;
  padding: 0 44px 0 12px;
  font-weight: 700;
  border: none;
  box-shadow: inset 0 0 1.6em -0.6em var(--primary-dark);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.btn-link:hover {
  background: var(--primary-dark); 
}

.btn-link .icon {
  background: white;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(135,30,68,.3);
  right: 4px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-link:hover .icon {
  width: calc(100% - 8px);
}

.btn-link .icon svg {
  width: 18px;
  transition: transform 0.3s;
  color: var(--primary);
}

.btn-link:hover .icon svg {
  transform: translateX(2px);
}

.btn-link:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
  padding: 0 16px; 
}

.btn-link:disabled .icon {
  display: none;
}

.btn-info {
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  padding: 0 12px;
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.btn-info:hover {
  color: #ffffff;
  outline: 2px solid var(--primary-dark);
  box-shadow: 4px 5px 17px -4px rgba(135,30,68,0.5);
  transform: scale(1.02); 
}

.btn-info:active {
  transform: scale(0.97);
}

.btn-info::before {
  content: "";
  position: absolute;
  left: -50px;
  top: 0;
  width: 0;
  height: 100%;
  background-color: var(--primary);
  transform: skewX(45deg);
  z-index: -1;
  transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1); 
}

.btn-info:hover::before,
.btn-info:active::before {
  width: 250%; 
}