/*
 * Perfil de fundación y de rescatista (nueva web).
 * Diseño: docs/web-usuarios/lienzo4/Fundacion.dc.html (teléfono) y
 * FundacionEscritorio.dc.html (escritorio).
 *
 * Un solo HTML para los dos. Teléfono primero: cabecera, la tarjeta de
 * «Llegaron a casa» y «Los que más esperan», pestañas y avisos, en una
 * columna. Desde 768 px las pestañas van a la izquierda y esa tarjeta y los
 * avisos en la columna de la derecha.
 *
 * Esa tarjeta no está en el lienzo: reemplaza a su «Influencia» (tasa, barra
 * y cifras) por decisión de producto.
 *
 * Aquí `.nw-org` es la página del perfil. La ficha tiene en ficha.css un
 * bloque con el mismo nombre («Responsable del caso»): las dos hojas nunca
 * se cargan juntas.
 *
 * Solo variables: colores, radios y sombras viven en tokens.css. Los
 * blancos translúcidos de la cabecera son el token blanco con `opacity`.
 */

/* ── Página ─────────────────────────────────────────────────────────── */
.nw-org {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Tarjeta blanca del lienzo. */
.nw-org__card {
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r4);
  background: var(--v5-surface);
  box-shadow: var(--v5-shadow-card);
}

/* Sobrelínea en mayúsculas («LLEGARON A CASA», «MISIÓN», «AVÍSAME
   CUANDO…»). */
.nw-org__overline {
  color: var(--v5-primary-deep);
  font-size: var(--v5-text-overline);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.3;
  text-transform: uppercase;
}
.nw-org__overline--ok {
  color: var(--v5-tint-game-ink);
}

/* ── Cabecera ───────────────────────────────────────────────────────── */
.nw-org__hero {
  position: relative;
  overflow: hidden;
  background-color: var(--v5-ink);
  background-image: linear-gradient(
    135deg,
    var(--v5-primary) 0%,
    var(--v5-primary-deep) 50%,
    var(--v5-ink) 100%
  );
  color: var(--v5-surface);
}
/* El tono medio del lienzo es el morado al 80 % sobre la tinta. Va aparte:
   una declaración con var() no cae a la anterior si el navegador no conoce
   color-mix. */
@supports (color: color-mix(in srgb, currentColor 80%, transparent)) {
  .nw-org__hero {
    background-image: linear-gradient(
      135deg,
      var(--v5-primary) 0%,
      color-mix(in srgb, var(--v5-primary) 80%, var(--v5-ink)) 50%,
      var(--v5-ink) 100%
    );
  }
}
.nw-org__hero :focus-visible {
  outline-color: var(--v5-surface);
}
/* Círculos de adorno. */
.nw-org__glow {
  position: absolute;
  border-radius: var(--nw-r-round);
  background: var(--v5-surface);
  pointer-events: none;
}
.nw-org__glow--a {
  top: -90px;
  right: -60px;
  width: 220px;
  height: 220px;
  opacity: 0.07;
}
.nw-org__glow--b {
  display: none;
}
.nw-org__hero-in {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
}
.nw-org__id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.nw-org__avatar {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 5px;
  border-radius: var(--v5-r4);
  background: var(--v5-surface);
  object-fit: contain;
  box-shadow: var(--nw-shadow-toast);
}
/* Sin logo: las iniciales. */
.nw-org__avatar--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--v5-primary);
  font-size: var(--v5-text-title);
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1;
}
.nw-org__who {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.nw-org__kind {
  opacity: 0.9;
  font-size: var(--v5-text-overline);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.3;
  text-transform: uppercase;
}
.nw-org__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.nw-org__title {
  min-width: 0;
  font-size: var(--v5-text-title);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.nw-org__badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--nw-r-round);
  background: var(--v5-surface);
  color: var(--v5-primary-deep);
  font-size: 10px;
}
/* Si el texto ocupa dos líneas, el ícono acompaña a la primera. */
.nw-org__place {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  opacity: 0.9;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
}
.nw-org__place .nw-i {
  flex: none;
  margin-top: 2px;
  font-size: var(--v5-text-label);
}
/* La descripción completa está en «Sobre»: aquí, hasta cuatro líneas. */
.nw-org__lead {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  max-width: var(--nw-text-max);
  opacity: 0.94;
  font-size: var(--nw-text-running);
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.nw-org__hero-cta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nw-org__hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nw-org__hero-follow,
.nw-org__hero-follow:hover {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--v5-r2);
  background: var(--v5-surface);
  color: var(--v5-primary-deep);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
/* «Siguiendo»: lo marca el navegador cuando hay sesión. */
.nw-org__hero-follow[aria-pressed='true'] {
  border-color: var(--nw-on-dark-tint);
  background: var(--nw-glass-line);
  color: var(--v5-surface);
}
.nw-org__hero-icon,
.nw-org__hero-icon:hover {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--v5-r2);
  background: var(--nw-glass-line);
  color: var(--v5-surface);
  font-size: 16px;
}
.nw-org__hero-icon:hover {
  background: var(--nw-on-dark-tint);
}
/* Región viva de «Difundir»: sin el aviso no ocupa lugar. */
.nw-org__hero-status {
  display: flex;
}
.nw-org__copied {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 10px;
  border-radius: var(--v5-r-pill);
  background: var(--nw-glass-line);
  font-size: var(--v5-text-label);
  font-weight: 700;
  line-height: 1.3;
}
.nw-org__copied[hidden] {
  display: none;
}
.nw-org__copied .nw-i {
  font-size: var(--v5-text-overline);
}

/* ── Cuerpo ─────────────────────────────────────────────────────────── */
/* En teléfono el contenido es una columna del ancho del lienzo, centrada. */
.nw-org__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 16px 28px;
}
.nw-org__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ── Llegaron a casa y los que más esperan ──────────────────────────── */
/* Dos bloques, cada uno con su sobrelínea, y al final el enlace a Casos.
   Va el que tenga dato; el separador, solo entre los dos. */
.nw-org__impact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.nw-org__home,
.nw-org__waiting {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
/* La cifra grande y su texto, sobre la misma línea de base. */
.nw-org__home-figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
.nw-org__home-num {
  color: var(--v5-tint-game-ink);
  font-size: 40px;
  letter-spacing: -1.5px;
  line-height: 1;
  white-space: nowrap;
}
.nw-org__home-label {
  font-size: var(--v5-text-body);
  font-weight: 700;
}
.nw-org__sep {
  height: 1px;
  margin: 2px 0;
  border: 0;
  background: var(--v5-border);
}
.nw-org__waiting-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nw-org__waiting-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* La foto y los textos de una fila. */
.nw-org__waiting-who {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.nw-org__waiting-photo {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--v5-r2);
  background: var(--v5-surface-muted);
  object-fit: cover;
  object-position: 50% 26%;
}
/* Sin foto: la huella, como en la tarjeta del caso. */
.nw-org__waiting-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v5-border-strong);
  font-size: 20px;
}
.nw-org__waiting-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.nw-org__waiting-name {
  color: var(--v5-ink);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.nw-org__waiting-name:hover {
  color: var(--v5-primary-deep);
}
/* El enlace del nombre cubre también la foto y los días: toda esa zona
   lleva a la ficha, con el alto de la fila como área de toque. */
.nw-org__waiting-name::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--v5-r2);
}
/* El foco rodea la zona que responde, no solo el nombre. */
.nw-org__waiting-name:focus-visible {
  outline: none;
}
.nw-org__waiting-name:focus-visible::after {
  outline: 3px solid var(--v5-primary);
  outline-offset: 2px;
}
.nw-org__waiting-days {
  color: var(--v5-text-muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
}
/* «en PetFi» o «desde el rescate»: si no cabe junto a los días, baja
   entero a la línea siguiente. */
.nw-org__waiting-since {
  display: inline-block;
}
/* «Difundir»: 44 px de toque; la pastilla visible mide 38. */
.nw-org__waiting-share {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--nw-touch);
  border-radius: var(--v5-r-pill);
}
.nw-org__waiting-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--v5-r-pill);
  background: var(--v5-ink);
  color: var(--v5-surface);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
/* «Ver los N que esperan un hogar»: 44 px de toque sin mover el texto (los
   márgenes devuelven lo que el alto agrega). */
.nw-org__waiting-all {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: var(--nw-touch);
  margin: -12px 0;
  font-size: 13px;
  font-weight: 700;
}

/* ── Pestañas ───────────────────────────────────────────────────────── */
/* En teléfono la fila se desplaza de lado hasta los bordes de la pantalla. */
.nw-org__tabs {
  display: flex;
  gap: 0 8px;
  margin: 0 -16px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nw-org__tabs::-webkit-scrollbar {
  display: none;
}
/* 44 px de toque; la pastilla visible mide 34. */
.nw-org__tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--nw-touch);
}
.nw-org__tab-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r-pill);
  background: var(--v5-surface);
  color: var(--v5-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.nw-org__tab:hover .nw-org__tab-pill {
  background: var(--v5-surface-muted);
}
.nw-org__tab[aria-selected='true'] .nw-org__tab-pill {
  border-color: var(--v5-ink);
  background: var(--v5-ink);
  color: var(--v5-surface);
}

/* Al llegar por un ancla las pestañas quedan a la vista sobre el panel. */
.nw-org__tabpanel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  scroll-margin-top: 60px;
}
.nw-org__tabpanel[hidden] {
  display: none;
}
/* Sin JavaScript la pestaña es un enlace al ancla de su panel: `:target` lo
   muestra, oculta los demás y marca su pestaña. Con él (`html.nw-js`) manda
   el atributo `hidden`. */
html:not(.nw-js) .nw-org__tabpanel:target {
  display: flex;
}
html:not(.nw-js) .nw-org__main:has(.nw-org__tabpanel:target) .nw-org__tabpanel:not(:target) {
  display: none;
}
html:not(.nw-js) .nw-org__main:has(.nw-org__tabpanel:target) .nw-org__tab-pill {
  border-color: var(--v5-border);
  background: var(--v5-surface);
  color: var(--v5-ink);
}
html:not(.nw-js) .nw-org__main:has([id='casos']:target) [aria-controls='casos'] .nw-org__tab-pill,
html:not(.nw-js) .nw-org__main:has([id='historias']:target) [aria-controls='historias'] .nw-org__tab-pill,
html:not(.nw-js) .nw-org__main:has([id='apoyar']:target) [aria-controls='apoyar'] .nw-org__tab-pill,
html:not(.nw-js) .nw-org__main:has([id='mensajes']:target) [aria-controls='mensajes'] .nw-org__tab-pill,
html:not(.nw-js) .nw-org__main:has([id='sobre']:target) [aria-controls='sobre'] .nw-org__tab-pill {
  border-color: var(--v5-ink);
  background: var(--v5-ink);
  color: var(--v5-surface);
}

/* ── Casos ──────────────────────────────────────────────────────────── */
.nw-org__count {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-body);
  font-weight: 400;
}
.nw-org__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.nw-org__see-all,
.nw-org__see-all:hover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border: 1.5px solid var(--v5-border-strong);
  border-radius: var(--v5-r3);
  background: var(--v5-surface);
  color: var(--v5-ink);
  font-size: 15px;
  font-weight: 700;
}
.nw-org__see-all:hover {
  background: var(--v5-surface-muted);
}

/* ── Historias ──────────────────────────────────────────────────────── */
.nw-org__stories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nw-org__story {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r3);
  background: var(--v5-surface);
  box-shadow: var(--v5-shadow-card);
}
/* Recuadro con un ícono (historias y mensajes). */
.nw-org__square {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--v5-r2);
  font-size: 18px;
}
.nw-org__square--home {
  background: var(--v5-success-soft);
  color: var(--v5-tint-game-ink);
}
.nw-org__square--brand {
  background: var(--v5-primary-soft);
  color: var(--v5-primary-deep);
}
.nw-org__story-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.nw-org__story-title {
  font-size: var(--v5-text-body);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.nw-org__story-sub {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-label);
  font-weight: 400;
}

/* ── Apoyar ─────────────────────────────────────────────────────────── */
.nw-org__block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nw-org__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nw-org__text {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-body);
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.nw-org__bank,
.nw-org__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.nw-org__rows {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.nw-org__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--v5-border);
  font-size: 13px;
}
.nw-org__row dt {
  flex: none;
  color: var(--v5-text-muted);
  font-weight: 400;
}
.nw-org__row dd {
  min-width: 0;
  margin: 0;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}
/* Acción principal de una tarjeta («Donar · copiar datos», «Iniciar
   sesión»). */
.nw-org__cta,
.nw-org__cta:hover {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 4px 16px;
  border: 0;
  border-radius: var(--v5-r3);
  background: var(--v5-primary);
  color: var(--v5-surface);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
  text-align: center;
  box-shadow: var(--nw-glow-cta);
}
.nw-org__cta:hover {
  background: var(--v5-primary-deep);
}
.nw-org__cta .nw-i {
  font-size: 18px;
}
/* Copiados: el botón queda en verde con un visto (lo marca fundacion.js). */
.nw-org__copy.is-copied,
.nw-org__copy.is-copied:hover {
  background: var(--v5-tint-game-ink);
  box-shadow: none;
}
.nw-org__copy-icon--done,
.is-copied .nw-org__copy-icon {
  display: none;
}
.is-copied .nw-org__copy-icon--done {
  display: inline-block;
}
.nw-org__note {
  display: flex;
  gap: 8px;
  color: var(--v5-text-muted);
  font-size: var(--v5-text-label);
  font-weight: 400;
  line-height: 1.45;
}
.nw-org__note .nw-i {
  flex: none;
  padding-top: 2px;
}

/* Sitio, redes, WhatsApp y correo. */
.nw-org__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Campañas: cada una enlaza a su causa. */
.nw-org__campaigns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nw-org__campaign,
.nw-org__campaign:hover {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r3);
  overflow: hidden;
  background: var(--v5-surface);
  color: var(--v5-ink);
  box-shadow: var(--v5-shadow-card);
}
.nw-org__campaign:hover {
  box-shadow: var(--v5-shadow-raised);
}
.nw-org__campaign-photo {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--v5-surface-muted);
}
.nw-org__campaign-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nw-org__campaign-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}
.nw-org__campaign-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.nw-org__campaign-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: var(--v5-text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}
/* Barra de avance de una campaña con pago en línea: el ancho viene en
   `--nw-rate`. */
.nw-org__meter {
  display: block;
  border-radius: var(--v5-r-pill);
  overflow: hidden;
}
.nw-org__meter-fill {
  display: block;
  width: var(--nw-rate, 0%);
  height: 100%;
  border-radius: var(--v5-r-pill);
}
.nw-org__meter--campaign {
  height: 8px;
  background: var(--v5-surface-muted);
}
.nw-org__meter--campaign .nw-org__meter-fill {
  background: linear-gradient(90deg, var(--v5-primary), var(--v5-primary-deep));
}
.nw-org__campaign-raised {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--v5-text-muted);
  font-size: 12.5px;
  font-weight: 400;
}
.nw-org__campaign-raised .nw-num {
  flex: none;
  color: var(--v5-primary-deep);
  font-size: 13px;
}
.nw-org__campaign-days {
  color: var(--v5-primary-deep);
  font-size: 13px;
  font-weight: 700;
}
.nw-org__campaign-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--v5-primary-deep);
  font-size: 13px;
  font-weight: 700;
}
.nw-org__campaign-cta .nw-i {
  font-size: var(--v5-text-label);
}

/* Quiénes están ayudando. */
.nw-org__supporters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nw-org__supporter {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r3);
  background: var(--v5-surface);
}
.nw-org__supporter-initial {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--nw-r-round);
  background: var(--v5-primary-soft);
  color: var(--v5-primary-deep);
  font-size: var(--v5-text-body-large);
  font-weight: 700;
}
.nw-org__supporter-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.nw-org__supporter-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--v5-text-body);
}
.nw-org__supporter-name {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.nw-org__supporter-top .nw-num {
  flex: none;
  color: var(--v5-primary-deep);
}
.nw-org__supporter-note {
  color: var(--v5-text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.nw-org__supporter-note--empty {
  color: var(--v5-text-light);
  font-style: italic;
}
.nw-org__supporter-when {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-label);
  font-weight: 400;
}

/* ── Mensajes ───────────────────────────────────────────────────────── */
.nw-org__messages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
}
.nw-org__messages .nw-org__cta {
  align-self: stretch;
}
.nw-org__fine {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-label);
  font-weight: 400;
}

/* ── Sobre ──────────────────────────────────────────────────────────── */
.nw-org__mission {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}
.nw-org__mission-text {
  font-size: var(--v5-text-body);
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
/* Conserva los saltos de línea que escribió la organización. */
.nw-org__mission-text span {
  white-space: pre-line;
}
.nw-org__facts {
  margin: 0;
  padding: 4px 16px;
}
.nw-org__fact {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border-bottom: 1px solid var(--v5-border);
  font-size: 13px;
}
.nw-org__fact:last-child {
  border-bottom: 0;
}
.nw-org__fact dt {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--v5-text-muted);
  font-weight: 400;
}
.nw-org__fact dt .nw-i {
  flex: none;
  width: 18px;
  color: var(--v5-primary-deep);
  font-size: var(--v5-text-body);
  text-align: center;
}
.nw-org__fact dd {
  min-width: 0;
  margin: 0;
  font-weight: 700;
  text-align: right;
}
/* El contacto va en su propia fila: los enlaces, debajo de la etiqueta. */
.nw-org__fact--links {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 16px 0 12px;
}
.nw-org__fact--links dd {
  text-align: left;
}

/* ── Avísame cuando… ────────────────────────────────────────────────── */
.nw-org__notify {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 6px;
}
.nw-org__switches {
  display: flex;
  flex-direction: column;
}
.nw-org__switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  border-bottom: 1px solid var(--v5-border);
}
.nw-org__switch-row:last-child {
  border-bottom: 0;
}
.nw-org__switch-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.nw-org__switch-title {
  font-size: 13.5px;
  font-weight: 700;
}
.nw-org__switch-sub {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-label);
  font-weight: 400;
}
/* Interruptor: 44 px de toque, pista de 44 × 26. */
.nw-switch {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
.nw-switch__track {
  display: flex;
  align-items: center;
  width: 44px;
  height: 26px;
  padding: 3px;
  border-radius: var(--v5-r-pill);
  background: var(--v5-border-strong);
  transition: background-color 0.15s ease;
}
.nw-switch__knob {
  width: 20px;
  height: 20px;
  border-radius: var(--nw-r-round);
  background: var(--v5-surface);
  box-shadow: var(--v5-shadow-card);
  transition: transform 0.15s ease;
}
.nw-switch[aria-checked='true'] .nw-switch__track {
  background: var(--v5-primary);
}
.nw-switch[aria-checked='true'] .nw-switch__knob {
  transform: translateX(18px);
}
/* Sin sesión, tocar un interruptor muestra el enlace para iniciarla. */
.nw-org__notify-login,
.nw-org__notify-login:hover {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin: 4px 0 10px;
  border-radius: var(--v5-r2);
  background: var(--v5-primary-soft);
  color: var(--v5-primary-deep);
  font-size: 13px;
  font-weight: 700;
}
.nw-org__notify-login .nw-i {
  font-size: var(--v5-text-label);
}
.nw-org__notify-login[hidden] {
  display: none;
}

/* ── Barra de acciones fija (teléfono) ──────────────────────────────── */
/* Va pegada sobre la barra de navegación, que ya reserva el área segura. */
.nw-org__bar {
  position: sticky;
  bottom: calc(var(--nw-bottom-nav-h) + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--v5-border);
  background: var(--v5-surface);
  box-shadow: var(--nw-shadow-bar);
}
.nw-org__bar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 54px;
  padding: 4px 10px;
  border: 1.5px solid transparent;
  border-radius: var(--v5-r3);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
  text-align: center;
}
.nw-org__bar-btn .nw-i {
  flex: none;
  font-size: 17px;
}
.nw-org__bar-btn--follow,
.nw-org__bar-btn--follow:hover {
  flex: 1.4 1 0;
  border-color: var(--v5-primary);
  background: var(--v5-surface);
  color: var(--v5-primary-deep);
}
.nw-org__bar-btn--follow:hover {
  background: var(--v5-primary-softer);
}
/* «Siguiendo»: lo marca el navegador cuando hay sesión. */
.nw-org__bar-btn--follow[aria-pressed='true'] {
  border-color: var(--v5-dupla-soft);
  background: var(--v5-dupla-soft);
  color: var(--v5-dupla-ink);
}
.nw-org__bar-btn--donate,
.nw-org__bar-btn--donate:hover {
  flex: 1 1 0;
  background: var(--v5-primary);
  color: var(--v5-surface);
  box-shadow: var(--nw-glow-cta);
}
.nw-org__bar-btn--donate:hover {
  background: var(--v5-primary-deep);
}

/* El aviso sale sobre la barra de acciones y la de navegación. */
.nw-org .nw-toast {
  --nw-toast-bottom: calc(var(--nw-bottom-nav-h) + 92px);
}
/* Con las dos barras fijas abajo, lo que recibe el foco con el teclado no
   debe quedar tapado por ellas. */
html:has(.nw-org__bar) {
  scroll-padding-bottom: calc(var(--nw-bottom-nav-h) + 92px);
}

/* ── Escritorio ─────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .nw-org__bar {
    display: none;
  }
  .nw-org__card {
    border-radius: var(--nw-r-card);
  }

  /* Cabecera: logo, textos y acciones en una fila. La caja del logo con el
     nombre no existe aquí: sus hijos pasan a la grilla. */
  .nw-org__glow--a {
    right: 8%;
    width: 260px;
    height: 260px;
  }
  .nw-org__glow--b {
    display: block;
    right: 26%;
    bottom: -120px;
    width: 220px;
    height: 220px;
    opacity: 0.05;
  }
  .nw-org__hero-in {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 24px;
    max-width: var(--nw-page-max);
    padding: 32px 24px;
  }
  .nw-org__id {
    display: contents;
  }
  .nw-org__avatar {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 76px;
    height: 76px;
    padding: 6px;
    border-radius: var(--nw-r-card);
  }
  .nw-org__avatar--empty {
    padding: 0;
    font-size: 26px;
  }
  .nw-org__who {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
  }
  .nw-org__title-row {
    gap: 8px 10px;
  }
  .nw-org__title {
    font-size: var(--v5-text-display);
    letter-spacing: -0.8px;
    line-height: 1.1;
  }
  .nw-org__lead {
    grid-column: 2;
    grid-row: 2;
    max-width: 640px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .nw-org__hero-cta {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-items: flex-end;
  }
  .nw-org__hero-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .nw-org__hero-follow,
  .nw-org__hero-follow:hover {
    flex: none;
    display: inline-flex;
    padding: 0 18px;
    white-space: nowrap;
  }
  .nw-org__copied {
    margin-top: 8px;
  }

  /* Dos columnas: las pestañas a la izquierda; la tarjeta de «Llegaron a
     casa» y los avisos a la derecha, una bajo la otra. La tercera fila
     absorbe el alto que le sobra a la columna de las pestañas. */
  .nw-org__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: auto auto 1fr;
    align-items: start;
    gap: 16px 24px;
    max-width: var(--nw-page-max);
    padding: 24px 24px 56px;
  }
  .nw-org__main {
    grid-column: 1;
    grid-row: 1 / span 3;
  }
  .nw-org__impact,
  .nw-org__notify {
    grid-column: 2;
  }

  .nw-org__impact {
    padding: 18px;
  }
  .nw-org__home-num {
    font-size: 44px;
  }
  /* La columna mide 300 px: la fila va más ajustada para que «N días en
     PetFi» quepa en una línea junto a «Difundir», y «desde el rescate», en
     la segunda. */
  .nw-org__waiting-row,
  .nw-org__waiting-who {
    gap: 10px;
  }
  .nw-org__waiting-photo {
    width: 44px;
    height: 44px;
  }
  .nw-org__waiting-days {
    font-size: var(--v5-text-label);
  }
  .nw-org__waiting-pill {
    padding: 0 12px;
    font-size: 12.5px;
  }

  .nw-org__tabs {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  /* Casos: dos tarjetas por fila mientras la columna es angosta; tres desde
     1024 px (más abajo), como en el lienzo. */
  .nw-org__tabpanel--casos {
    gap: 14px;
  }
  .nw-org__grid {
    gap: 16px;
  }
  .nw-org__see-all,
  .nw-org__see-all:hover {
    align-self: center;
    margin-top: 2px;
    padding: 0 32px;
  }

  .nw-org__story {
    gap: 14px;
    padding: 14px 16px;
  }

  /* Apoyar, mensajes y sobre no ocupan todo el ancho de la columna. */
  .nw-org__bank,
  .nw-org__contact {
    gap: 14px;
    max-width: 560px;
    padding: 18px;
  }
  .nw-org__row {
    border-top: 0;
    border-bottom: 1px solid var(--v5-border);
  }
  .nw-org__row:last-child {
    border-bottom: 0;
  }
  .nw-org__campaigns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
  .nw-org__supporters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
  .nw-org__messages {
    gap: 12px;
    max-width: 560px;
    padding: 24px;
  }
  .nw-org__messages .nw-org__cta {
    align-self: flex-start;
    padding: 0 28px;
  }
  .nw-org__tabpanel--sobre {
    max-width: 640px;
  }
  .nw-org__mission {
    padding: 18px;
  }
  .nw-org__facts {
    padding: 4px 18px;
  }

  .nw-org__notify {
    padding: 18px 18px 8px;
  }

  .nw-org .nw-toast {
    --nw-toast-bottom: 24px;
  }
  html:has(.nw-org__bar) {
    scroll-padding-bottom: 0;
  }
}

/* ── Escritorio ancho ───────────────────────────────────────────────── */
/* Con la columna de pestañas ya holgada, tres casos por fila. */
@media (min-width: 1024px) {
  .nw-org__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
