/* Tarjeta digital – Mary Lizcano | Veterinaria Integrativa
   Principal: blanco · Secundario: verde #48543c · Terciario: lavanda #95819d */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f6f2;
  --line: rgba(72, 84, 60, .14);
  --text: #2e3428;
  --muted: #6c7166;

  --green: #48543c;
  --green-dark: #3a4430;
  --green-darker: #2f3727;
  --green-soft: rgba(72, 84, 60, .09);

  --lav: #95819d;
  --lav-dark: #806c88;
  --lav-darker: #6f5c77;
  --lav-text: #75627d;          /* lavanda legible para texto pequeño */
  --lav-soft: rgba(149, 129, 157, .14);

  --radius: 18px;
  --shadow: 0 6px 22px rgba(72, 84, 60, .08);
  --font-title: "Marcellus", Georgia, "Times New Roman", serif;
  --bs-body-font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
}

body {
  font-family: var(--bs-body-font-family);
  min-height: 100vh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  /* Patrón muy leve de huellitas y huesitos en lavanda sobre blanco */
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cdefs%3E%3Cg id='p'%3E%3Cellipse cx='0' cy='5' rx='6.5' ry='5.5'/%3E%3Cellipse cx='-7.5' cy='-3.5' rx='2.7' ry='3.6'/%3E%3Cellipse cx='-2.7' cy='-8.8' rx='2.7' ry='3.6'/%3E%3Cellipse cx='2.7' cy='-8.8' rx='2.7' ry='3.6'/%3E%3Cellipse cx='7.5' cy='-3.5' rx='2.7' ry='3.6'/%3E%3C/g%3E%3Cg id='b'%3E%3Crect x='-9' y='-2.3' width='18' height='4.6' rx='1.5'/%3E%3Ccircle cx='-9.5' cy='-2.7' r='3.1'/%3E%3Ccircle cx='-9.5' cy='2.7' r='3.1'/%3E%3Ccircle cx='9.5' cy='-2.7' r='3.1'/%3E%3Ccircle cx='9.5' cy='2.7' r='3.1'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='%2395819d' fill-opacity='.12'%3E%3Cuse href='%23p' transform='translate(32 34) rotate(-22)'/%3E%3Cuse href='%23b' transform='translate(122 40) rotate(32)'/%3E%3Cuse href='%23p' transform='translate(132 128) rotate(18) scale(.9)'/%3E%3Cuse href='%23b' transform='translate(44 132) rotate(-38) scale(.9)'/%3E%3Cuse href='%23p' transform='translate(88 86) rotate(-6) scale(.7)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 180px;
}

a { color: inherit; text-decoration: none; }

.card-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Botón flotante compartir ---------- */
.fab-share {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: max(14px, calc(50% - 240px + 14px));
  z-index: 1030;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--green);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(72, 84, 60, .16);
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.fab-share:hover { background: var(--lav); color: #fff; }
.fab-share:active { transform: scale(.92); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding-top: 64px;
}
.hero-cover {
  position: absolute;
  inset: 0 -16px auto;
  height: 170px;
  background:
    radial-gradient(260px 160px at 12% 20%, rgba(149, 129, 157, .28), transparent 70%),
    radial-gradient(300px 180px at 92% 10%, rgba(72, 84, 60, .20), transparent 70%),
    linear-gradient(180deg, #f3f1ec 0%, #ffffff 100%);
  border-radius: 0 0 36px 36px;
  z-index: -1;
}

.avatar-wrap {
  position: relative;
  width: 196px;
  margin: 0 auto;
}
.avatar-ring {
  width: 196px;
  height: 196px;
  padding: 5px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--lav), var(--green), #a3ad95, var(--lav));
  box-shadow: 0 14px 36px rgba(72, 84, 60, .22);
}
.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: 50%;
  border: 4px solid #fff;
  display: block;
}
.avatar-badge {
  position: absolute;
  right: -10px;
  bottom: 0;
  width: 76px;
  height: 76px;
  padding: 8px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(72, 84, 60, .18);
}

.name {
  font-family: var(--font-title);
  font-size: 2.05rem;
  font-weight: 400;
  color: var(--green);
  margin: 18px 0 4px;
  letter-spacing: .02em;
}
.role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  color: var(--lav-text);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.role::before, .role::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--lav);
  opacity: .7;
}
.tagline {
  color: var(--muted);
  font-size: .95rem;
  margin: 10px auto 0;
  max-width: 320px;
}

/* ---------- Acciones rápidas ---------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px 0 8px;
}
.qa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 4px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .2s ease;
}
.qa:active { transform: scale(.95); }
.qa:hover { border-color: var(--green); color: var(--text); }
.qa-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: #fff;
  background: var(--green);
}
.qa-icon.qa-lav { background: var(--lav); }
.qa-label { font-size: .78rem; font-weight: 600; color: var(--muted); }

/* ---------- Bloques ---------- */
.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 14px;
}
.block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--green);
  font-weight: 700;
  margin: 0 0 12px;
}
.block-title .bi { font-size: 1rem; }
.block-lead { color: var(--muted); font-size: .88rem; margin: -4px 0 14px; }

/* Bienvenida */
.block-intro { padding: 0; overflow: hidden; }
.intro-photo { margin: 0; }
.intro-photo img {
  width: 100%;
  height: auto;
  display: block;
}
.block-intro p {
  padding: 16px 18px 0;
  margin: 0;
  font-size: .93rem;
  line-height: 1.6;
}
.block-intro strong { color: var(--green); }
.block-intro .intro-hello {
  padding-top: 18px;
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--green);
}
.block-intro .intro-hello + p { padding-top: 6px; }
.block-intro .intro-sign {
  padding: 10px 18px 18px;
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--lav-text);
}

/* Lista de contacto */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li + li { border-top: 1px solid var(--line); }
.info-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.info-icon {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.05rem;
}
.info-icon.info-lav { background: var(--lav-soft); color: var(--lav-text); }
.info-text {
  flex: 1;
  min-width: 0;
  font-size: .95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.info-text small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 400;
}
.info-go { color: var(--muted); font-size: .85rem; }
.ig-note {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--lav-soft);
  color: var(--text);
  font-size: .84rem;
  line-height: 1.5;
}

/* Servicios */
.services { display: grid; gap: 8px; }
.service {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  transition: border-color .2s ease, transform .15s ease;
}
.service:hover { border-color: var(--green); color: var(--text); }
.service:active { transform: scale(.98); }
.service-icon {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #fff;
  background: var(--green);
}
.service-body { flex: 1; min-width: 0; }
.service-body strong { display: block; font-size: .95rem; font-weight: 600; }
.service-go { color: var(--green); opacity: .7; }

/* Terapias */
.block-lav {
  background: linear-gradient(180deg, rgba(149, 129, 157, .10), #fff 70%);
  border-color: rgba(149, 129, 157, .28);
}
.block-lav .block-title { color: var(--lav-text); }
.therapies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.therapy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(149, 129, 157, .4);
  font-size: .88rem;
  font-weight: 600;
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.therapy .bi {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .85rem;
  color: #fff;
  background: var(--lav);
}
.therapy:hover { background: var(--lav); border-color: var(--lav); color: #fff; }
.therapy:hover .bi { background: #fff; color: var(--lav-dark); }
.therapy:active { transform: scale(.96); }

/* Enfoque */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 14px 6px;
  border-radius: 14px;
  background: var(--surface-2);
}
.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: var(--green);
  background: var(--green-soft);
}
.pillar-icon.pillar-lav { color: var(--lav-text); background: var(--lav-soft); }
.pillars-note {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--font-title);
  font-size: 1.02rem;
  color: var(--green);
}

/* QR */
.qr-box {
  display: inline-block;
  padding: 10px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(72, 84, 60, .12);
}
.qr { width: 200px; height: 200px; display: block; }
.qr-url { color: var(--muted); font-size: .88rem; font-weight: 600; margin: 12px 0 14px; }

/* Botones */
.btn-accent {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--green);
  --bs-btn-border-color: var(--green);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--green-dark);
  --bs-btn-hover-border-color: var(--green-dark);
  --bs-btn-active-bg: var(--green-darker);
  --bs-btn-active-border-color: var(--green-darker);
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 72, 84, 60;
  font-weight: 700;
  border-radius: 14px;
}
.btn-lav {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--lav);
  --bs-btn-border-color: var(--lav);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--lav-dark);
  --bs-btn-hover-border-color: var(--lav-dark);
  --bs-btn-active-bg: var(--lav-darker);
  --bs-btn-active-border-color: var(--lav-darker);
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 149, 129, 157;
  font-weight: 700;
  border-radius: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.btn-ghost {
  --bs-btn-color: var(--green);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: rgba(72, 84, 60, .3);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--lav);
  --bs-btn-hover-border-color: var(--lav);
  --bs-btn-active-bg: var(--lav-dark);
  --bs-btn-active-border-color: var(--lav-dark);
  --bs-btn-active-color: #fff;
  font-size: .88rem;
  font-weight: 600;
  border-radius: 12px;
}

/* Instalar */
.install-icon { border-radius: 12px; border: 1px solid var(--line); }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
  padding: 26px 0 8px;
}
.foot-logo {
  width: 150px;
  height: auto;
  display: block;
  margin: 0 auto 6px;
}
.foot-motto {
  font-family: var(--font-title);
  color: var(--green);
  font-size: .98rem;
  margin: 0 0 6px;
}

/* ---------- Barra inferior ---------- */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95) 35%);
}
.bottom-inner {
  max-width: 448px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}
.bottom-inner .btn {
  padding: 14px;
  font-size: 1rem;
  box-shadow: 0 10px 26px rgba(72, 84, 60, .28);
}
.bottom-inner .btn-accent { flex: 1; }
.bottom-inner .btn-lav {
  flex: 0 0 56px;
  font-size: 1.3rem;
  padding: 10px 0;
  box-shadow: 0 10px 26px rgba(149, 129, 157, .35);
}

/* ---------- Hoja compartir ---------- */
.share-sheet.offcanvas-bottom {
  height: auto;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  color: var(--text);
  border-top: 1px solid var(--line) !important;
  border-radius: 24px 24px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.share-sheet .offcanvas-title { font-family: var(--font-title); color: var(--green); }
.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: rgba(72, 84, 60, .2);
  margin: 10px auto 0;
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 8px;
  margin-bottom: 18px;
}
.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  color: var(--muted);
  cursor: pointer;
}
.share-item span {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #fff;
  background: var(--c);
  transition: transform .15s ease;
}
.share-item:active span { transform: scale(.9); }
.copy-row { display: flex; gap: 8px; }
.copy-row .form-control {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
  border-radius: 12px;
  font-size: .88rem;
}

/* Toast */
#toast {
  background: var(--green);
  color: #fff;
  border-radius: 14px;
  width: auto;
  box-shadow: 0 10px 26px rgba(72, 84, 60, .3);
}

/* Animación de entrada */
@media (prefers-reduced-motion: no-preference) {
  .hero, .quick-actions, .block { animation: rise .5s ease both; }
  .quick-actions { animation-delay: .05s; }
  .block:nth-of-type(1) { animation-delay: .1s; }
  .block:nth-of-type(2) { animation-delay: .15s; }
  .block:nth-of-type(3) { animation-delay: .2s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
}
