/* =========================================================================
   Tarjeta de presentación profesional · Soy Enfermera
   Diseño único, limpio y editorial, con el color del perfil como acento.
   ========================================================================= */

.perfil {
  --acento: #0a7ea4;
  --acento-2: color-mix(in srgb, var(--acento) 72%, #12b0c9);
  --acento-600: color-mix(in srgb, var(--acento) 78%, #04121a);
  --acento-100: color-mix(in srgb, var(--acento) 12%, #ffffff);

  --ink: #0f1b24;
  --muted: #5b6b77;
  --bg: #f4f7f9;
  --surface: #ffffff;
  --line: #e4ecf1;

  --r: 18px;
  --r-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16,40,60,.06), 0 1px 3px rgba(16,40,60,.05);
  --shadow-md: 0 18px 44px -26px rgba(7,48,68,.45);
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: var(--font-body);

  /* estilos.css usa --brand en los .btn: los heredamos del acento */
  --brand: var(--acento);
  --brand-2: var(--acento-2);

  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.perfil h1, .perfil h2, .perfil h3 { font-family: var(--font-head); letter-spacing: -.02em; margin: 0; }
body.ficha { background: var(--bg); }

/* ---------- header ---------- */
.pf-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(20px, calc((100% - 1080px) / 2));
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.pf-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.pf-brand .logo { font-size: 1.3rem; }
.pf-header nav { display: flex; align-items: center; gap: 8px; }
.pf-header nav a { position: relative; color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.pf-header nav a:hover { color: var(--acento); }
.pf-header nav a:not(.pf-cta)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; border-radius: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.pf-header nav a:not(.pf-cta):hover::after { transform: scaleX(1); }
.pf-header .pf-install {
  border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: .92rem;
  color: var(--acento); background: color-mix(in srgb, var(--acento) 12%, transparent);
  padding: 8px 14px; border-radius: 999px; transition: background .15s ease;
}
.pf-header .pf-install:hover { background: color-mix(in srgb, var(--acento) 22%, transparent); }
.pf-header .pf-cta { background: var(--acento); color: #fff; }
.pf-header .pf-cta:hover { color: #fff; filter: brightness(1.06); }

/* ---------- portada ---------- */
.pf-cover {
  height: 168px;
  background:
    radial-gradient(120% 160% at 15% 0%, color-mix(in srgb, var(--acento) 55%, transparent) 0%, transparent 60%),
    radial-gradient(120% 160% at 85% 20%, color-mix(in srgb, var(--acento-2) 60%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, var(--acento-600), var(--acento));
  position: relative;
}
.pf-cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 20px 20px; opacity: .5;
}

/* ---------- contenedor ---------- */
.pf-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- hero ---------- */
.pf-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
  margin-top: 0; padding-bottom: 6px;
}
.pf-avatar {
  position: relative; width: 132px; height: 132px; border-radius: 26px;
  margin-top: -94px;
  background: var(--acento-100); overflow: hidden;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; color: var(--acento-600);
}
.pf-id { padding-top: 6px; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-avatar .pf-check {
  position: absolute; right: -6px; bottom: -6px; width: 34px; height: 34px; border-radius: 50%;
  background: #16a34a; color: #fff; display: grid; place-items: center; font-size: 1rem; font-weight: 800;
  border: 3px solid var(--surface);
}
.pf-id { padding-bottom: 4px; }
.pf-id h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.pf-esp { color: var(--acento-600); font-weight: 700; margin: 4px 0 0; font-size: 1.05rem; }
.pf-loc { color: var(--muted); margin: 4px 0 0; font-size: .95rem; }
.pf-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pf-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.pf-badge.ok { background: #ecfdf3; border-color: #b7ebc9; color: #0f7a3d; }
.pf-badge.rate { background: #fff7e6; border-color: #ffe0a3; color: #a15c00; }

/* ---------- acciones ---------- */
.pf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pf-actions .btn { padding: 12px 18px; border-radius: 12px; font-size: .95rem; }
.pf-actions .btn svg { width: 18px; height: 18px; }

/* ---------- layout 2 columnas ---------- */
.pf-cols { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 22px; padding: 26px 0 8px; align-items: start; }
.pf-main, .pf-side { display: flex; flex-direction: column; gap: 18px; }
.pf-side { position: sticky; top: 84px; }

.pf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow-sm); }
.pf-card h2 { font-size: 1.05rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pf-card h2::before { content: ""; width: 4px; height: 18px; border-radius: 3px; background: var(--acento); }
.pf-card p { margin: 0; color: var(--ink); }
.pf-card .muted { color: var(--muted); }

.pf-servs { display: flex; flex-wrap: wrap; gap: 9px; }
.pf-serv { display: inline-flex; align-items: center; gap: 7px; background: var(--acento-100); border: 1px solid color-mix(in srgb, var(--acento) 22%, transparent); color: var(--acento-600); font-weight: 600; font-size: .88rem; padding: 8px 13px; border-radius: 999px; }
.pf-serv::before { content: "✓"; font-weight: 800; }

/* contacto + QR */
.pf-contact .pf-form { display: flex; flex-direction: column; gap: 10px; }
.pf-form input { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; font: inherit; width: 100%; }
.pf-form input:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-100); }
.pf-form .btn { width: 100%; }
.pf-qr { margin-top: 16px; text-align: center; }
.pf-qr img { width: 148px; height: 148px; background: #fff; padding: 8px; border-radius: 14px; border: 1px solid var(--line); }
.pf-qr p { font-size: .8rem; color: var(--muted); margin-top: 8px; }

/* reseñas */
.pf-resena { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 15px; margin-top: 10px; background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }
.pf-stars { color: #ffb020; letter-spacing: 1px; font-size: .95rem; }
.pf-stars .off { color: color-mix(in srgb, var(--muted) 45%, transparent); }
.pf-resena p { margin: 6px 0 0; font-size: .92rem; }

/* upsell / candado */
.pf-lock { position: relative; overflow: hidden; }
.pf-lock-blur { filter: blur(4px); opacity: .5; user-select: none; }
.pf-upsell { background: linear-gradient(135deg, var(--acento-600), var(--acento)); color: #fff; border: 0; }
.pf-upsell h2 { color: #fff; }
.pf-upsell h2::before { background: rgba(255,255,255,.85); }
.pf-upsell p { color: rgba(255,255,255,.9); }
.pf-upsell .btn { background: #fff; color: var(--acento-600); margin-top: 14px; width: 100%; }

/* ---------- pie ---------- */
.pf-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface); }
.pf-footer .pf-wrap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 22px 20px; color: var(--muted); font-size: .88rem; }
.pf-footer a { color: var(--muted); text-decoration: none; }
.pf-footer a:hover { color: var(--acento); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .pf-cols { grid-template-columns: 1fr; }
  .pf-side { position: static; }
}
@media (max-width: 560px) {
  .pf-cover { height: 130px; }
  .pf-hero { grid-template-columns: 1fr; gap: 12px; margin-top: 0; text-align: center; justify-items: center; }
  .pf-avatar { width: 116px; height: 116px; margin-top: -74px; }
  .pf-badges, .pf-actions { justify-content: center; }
  .pf-actions .btn { flex: 1 1 40%; }
}

/* ---------- accesibilidad ---------- */
.perfil a:focus-visible, .perfil button:focus-visible, .perfil input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--acento) 45%, transparent); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .perfil, .perfil *, .perfil::before { animation: none !important; transition: none !important; }
}

/* ===== pulido profesional ===== */
.pf-card h2::before { display: none; }
.pf-card h2 { gap: 8px; }
.pf-card h2 svg { width: 17px; height: 17px; color: var(--acento); flex: 0 0 auto; }
.pf-badge.pro { background: linear-gradient(135deg, var(--acento-600), var(--acento)); color: #fff; border-color: transparent; }
.pf-cover { height: 178px; }
.pf-card { box-shadow: 0 1px 2px rgba(16,40,60,.05), 0 16px 36px -30px rgba(7,48,68,.55); }
.pf-serv { font-weight: 600; }
.pf-header nav a { font-weight: 700; }

/* ===== movimiento sutil (elegante) ===== */
/* Fondo: capa fija (siempre visible) con glows temados por el color del perfil.
   Se anima con transform (GPU) en vez de background-position (repaint). */
.perfil::before {
  content: "";
  position: fixed;
  inset: -6%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--acento) 11%, transparent), transparent 72%) 78% 12% / 60vw 60vh no-repeat,
    radial-gradient(closest-side, color-mix(in srgb, var(--acento-2) 13%, transparent), transparent 72%) 20% 88% / 56vw 56vh no-repeat;
  animation: pf-fondo 30s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes pf-fondo {
  from { transform: translate3d(-2.5%, -1.5%, 0); }
  to   { transform: translate3d(2.5%, 2%, 0); }
}

/* entrada escalonada */
@keyframes pf-sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pf-cover, .pf-hero, .pf-main .pf-card, .pf-side .pf-card, .pf-footer .pf-wrap {
  animation: pf-sube .55s cubic-bezier(.2, .7, .2, 1) backwards;
}
.pf-cover { animation-delay: .02s; }
.pf-hero { animation-delay: .05s; }
.pf-main .pf-card:nth-child(1) { animation-delay: .11s; }
.pf-main .pf-card:nth-child(2) { animation-delay: .17s; }
.pf-main .pf-card:nth-child(3) { animation-delay: .23s; }
.pf-main .pf-card:nth-child(4) { animation-delay: .29s; }
.pf-main .pf-card:nth-child(5) { animation-delay: .35s; }
.pf-side .pf-card:nth-child(1) { animation-delay: .20s; }
.pf-side .pf-card:nth-child(2) { animation-delay: .28s; }

/* hover en tarjetas */
.pf-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.pf-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--acento) 22%, var(--line));
  box-shadow: 0 6px 18px -10px rgba(16, 40, 60, .18), 0 26px 50px -32px rgba(7, 48, 68, .65);
}

/* chips y badges */
.pf-serv, .pf-badge { transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.pf-serv:hover, .pf-badge:hover { transform: translateY(-1px); }

/* avatar: flotado muy tenue */
@keyframes pf-flota { from { transform: translateY(-2px); } to { transform: translateY(2px); } }
.pf-avatar { animation: pf-flota 9s ease-in-out infinite alternate; }

/* QR */
.pf-qr img { transition: transform .2s ease, box-shadow .2s ease; }
.pf-qr img:hover { transform: scale(1.03); box-shadow: 0 14px 30px -18px rgba(7, 48, 68, .55); }

/* (se retiró el brillo que cruzaba la portada: se sentía tipo plantilla) */
