/* ================================
   VARIABLES Y BASE
================================ */

:root {
  --electric-border-color: #dd8448;
  --electric-light-color: oklch(from var(--electric-border-color) l c h);
  --electric-gradient-color: oklch(
    from var(--electric-border-color) 0.3 calc(c / 2) h / 0.4
  );
  --color-neutral-900: oklch(0.185 0 0);

  --bg-body: #020617;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
}

/* ================================
   LAYOUT GENERAL
================================ */

.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 12px 5px 32px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 0% 0%, #f97316, #7c2d12);
}

.brand__text {
  display: flex;
  flex-direction: column;
}

.brand__title {
  font-weight: 700;
  font-size: 16px;
}

.brand__subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.top-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #022c22;
  color: #bbf7d0;
  font-size: 12px;
}

.top-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}

/* Layout con banner lateral (solo desktop) */
.layout-grid {
  display: block;
}

.layout-main {
  width: 100%;
}

.layout-aside {
  display: none;
}

@media (min-width: 1024px) {
  .layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 16px;
    align-items: flex-start;
  }

  .layout-aside {
    display: block;
  }

  /* En PC, cards más altas para que se vean mejor */
  .profile-card {
    height: 360px;
  }
}

.sidebar-banner img {
  width: 100%;
  display: block;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* ================================
   BARRA DE UBICACIÓN (HOME)
================================ */

.location-picker {
  margin: 8px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  background: #0b1120;
  color: #f9fafb;
  font-size: 14px;
  width: fit-content;
}

.location-pill .icon {
  font-size: 16px;
}

.location-helper {
  font-size: 11px;
  color: var(--text-muted);
}

/* ================================
   TITULO DE SECCIÓN
================================ */

.section-header {
  margin-bottom: 10px;
}

.section-header h1 {
  font-size: 20px;
  margin: 0 0 4px;
}

.section-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ================================
   GRID DE PERFILES
   — todas las cards mismas medidas
================================ */

/* Desktop / tablet: grid auto-fill con mínimo 218px */
.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 12px;
}

.profile-card {
  position: relative;
  width: 100%;
  height: 322px; /* base (mobile / tablet), en PC se sobreescribe a 360px */
}

.profile-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

/* ================================
   CARD BASE (foto full + badge glass)
================================ */

.profile-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: #020617;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.8);
}

.profile-card__content {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Foto ocupa todo */
.profile-card__media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.profile-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badge tipo Liquid Glass, de lado a lado y más transparente */
.profile-card__footer {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 8px;
  padding: 7px 11px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  background:
    radial-gradient(120% 200% at 0% 0%, rgba(255, 255, 255, 0.15), transparent 95%),
    rgba(15, 23, 42, 0.15); /* ~65% transparente */
  border: 1px solid rgba(148, 163, 184, 0.45);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.profile-card__name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 1px;
  color: #f9fafb;
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-card__cityline {
  font-size: 11px;
  line-height: 1.2;
  color: rgba(249, 250, 251, 0.9);
}

.profile-card__distance {
  margin-top: 1px;
  font-size: 10px;
  color: rgba(209, 213, 219, 0.95);
}

/* Icono de ubicación delante del texto de distancia */
.profile-card__distance::before {
  content: "📍";
  margin-right: 4px;
}

/* Badge verificado (check) a la derecha del nombre */
.verified-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.95);
  border: 1px solid #22c55e;
  font-size: 10px;
  color: #ecfdf5;
}

.verified-icon::before {
  content: "✓";
}

/* ================================
   VIP – borde animado con conic-gradient
================================ */

/* Registramos la custom property para animarla */
@property --vip-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0turn;
}

/* Borde animado solo en VIP */
.profile-card--vip .profile-card__inner {
  --vip-border-angle: 0turn;

  --vip-main-bg: conic-gradient(
    from var(--vip-border-angle),
    #020617,
    #020617 35%,
    #020617 65%,
    #030712 100%
  );

  --vip-border-gradient: conic-gradient(
    from var(--vip-border-angle),
    transparent 5%,
    #f97316,
    #facc15,
    #fb7185,
    #f97316,
    transparent 95%
  );

  border: 2px solid transparent;
  border-radius: 22px;
  background:
    var(--vip-main-bg) padding-box,
    var(--vip-border-gradient) border-box;
  animation: vip-border-spin 4s linear infinite;
}

/* Animación del ángulo del borde */
@keyframes vip-border-spin {
  to {
    --vip-border-angle: 1turn;
  }
}

/* Cinta VIP en la esquina */
.profile-card--vip .vip-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 70px;
  height: 70px;
  overflow: hidden;
  pointer-events: none;
}

.profile-card--vip .vip-ribbon span {
  position: absolute;
  top: 10px;
  right: -22px;
  transform: rotate(45deg);
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 0;
  text-align: center;
  width: 70px;
  letter-spacing: 0.08em;
}

/* ================================
   RESPONSIVE – 2 cards por fila en mobile
================================ */

@media (max-width: 768px) {
  .profiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card {
    height: 322px; /* en mobile mantenemos 322 */
  }
}
