/* =========================================================
   BUA v2 — Comunidad
   Componentes de grupos, BIA, Defensoría y FAQ.
   ========================================================= */

.v2-comunidad {
  padding-bottom: 40px;
}

/* ===== DOS COLUMNAS ===== */
.v2-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 22px;
  align-items: start;
}

.v2-split--even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ===== TARJETA CON ICONO ===== */
.v2-callout {
  display: flex;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid var(--v2-border);
  border-left: 3px solid var(--cat-color, var(--v2-primary));
  border-radius: 16px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
}

.v2-callout-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat-color, var(--v2-primary)) 14%, var(--v2-surface-2));
  color: var(--cat-color, var(--v2-primary));
  font-size: 20px;
}

.v2-callout h3 {
  margin: 0 0 4px;
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--v2-ink);
}

.v2-callout p {
  color: var(--v2-muted);
  font-size: .82rem;
  line-height: 1.5;
}

.v2-callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

/* Capas de cartografía: bloque desplegable */
.v2-layer-dropdown {
  margin-bottom: 26px;
  border: 1px solid var(--v2-border);
  border-radius: 16px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
}

.v2-layer-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
}

.v2-layer-summary::-webkit-details-marker { display: none; }
.v2-layer-summary:focus-visible { outline: 2px solid var(--v2-gold); outline-offset: 3px; }

.v2-layer-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.v2-layer-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--v2-ink);
}

.v2-layer-count {
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--v2-surface-2);
  color: var(--v2-muted);
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}

.v2-layer-caret {
  color: var(--v2-muted);
  font-size: .7rem;
  transition: transform .18s var(--v2-ease);
}

.v2-layer-dropdown[open] .v2-layer-caret { transform: rotate(180deg); }

.v2-layer-grid { padding: 0 16px 16px; }

/* ===== CITA ===== */
.v2-quote {
  padding: 20px 22px;
  border-left: 3px solid var(--v2-gold);
  border-radius: 0 16px 16px 0;
  background: var(--v2-surface-2);
  color: var(--v2-ink);
  font-size: .95rem;
  font-style: italic;
  line-height: 1.6;
}

/* ===== PASOS (TIMELINE) ===== */
.v2-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0 0 0 22px;
  border-left: 2px solid var(--v2-border);
  list-style: none;
}

.v2-timeline li {
  position: relative;
  padding: 0 0 20px 4px;
}

.v2-timeline li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -28px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--v2-surface);
  border-radius: 50%;
  background: var(--v2-gold);
}

.v2-timeline strong {
  display: block;
  font-size: .92rem;
  font-weight: 800;
  color: var(--v2-ink);
}

.v2-timeline span {
  display: block;
  margin-top: 2px;
  color: var(--v2-muted);
  font-size: .82rem;
  line-height: 1.5;
}

/* ===== GRUPOS ===== */
.v2-grupos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.v2-grupocard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 18px 30px;
  border: 1px solid var(--v2-border);
  border-radius: 18px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
  text-align: center;
  transition: transform .18s var(--v2-ease), box-shadow .18s var(--v2-ease);
}

.v2-grupocard:hover {
  transform: translateY(-3px);
  box-shadow: var(--v2-shadow-lg);
}

.v2-grupocard-logo {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 6px;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--v2-surface-2);
  color: var(--v2-muted);
  font-size: 26px;
}

.v2-grupocard-logo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.v2-grupocard h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--v2-ink);
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
}

.v2-grupocard p {
  max-width: 26ch;
  color: var(--v2-muted);
  font-size: .8rem;
  line-height: 1.5;
  text-align: center;
}

/* ===== BIA: orbes como tarjetas v2 ===== */
.v2-orbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.v2-orb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px 16px;
  border: 1px solid var(--v2-border);
  border-radius: 18px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
  text-decoration: none;
  transition: transform .18s var(--v2-ease), box-shadow .18s var(--v2-ease), border-color .18s var(--v2-ease);
}

.v2-orb:hover {
  transform: translateY(-3px);
  border-color: var(--v2-gold);
  box-shadow: var(--v2-shadow-lg);
}

.v2-orb-circle {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--v2-surface-2);
}

.v2-orb-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v2-orb-label {
  font-size: .9rem;
  font-weight: 800;
  color: var(--v2-ink);
  text-align: center;
}

.v2-orb-sub {
  color: var(--v2-muted);
  font-size: .74rem;
  text-align: center;
}

/* ===== FAQ: acordeon v2 ===== */
/* Dropdown compacto para saltar entre secciones del FAQ */
.v2-jump {
  position: relative;
  display: inline-block;
  margin: 4px 0 22px;
}

.v2-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--v2-border);
  border-radius: 10px;
  background: var(--v2-surface);
  color: var(--v2-ink);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition: border-color .18s var(--v2-ease);
}

.v2-jump-btn::-webkit-details-marker { display: none; }
.v2-jump-btn:hover { border-color: var(--v2-ink); }
.v2-jump-btn .v2-i { color: var(--v2-muted); }
.v2-jump-caret {
  color: var(--v2-muted);
  font-size: .7rem;
  transition: transform .18s var(--v2-ease);
}
.v2-jump[open] .v2-jump-caret { transform: rotate(180deg); }

.v2-jump-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 2px;
  min-width: 240px;
  max-height: 60vh;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--v2-border);
  border-radius: 12px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow-lg);
}

.v2-jump-menu a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--v2-muted);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
}

.v2-jump-menu a:hover,
.v2-jump-menu a:focus-visible {
  background: var(--v2-surface-2);
  color: var(--v2-ink);
}

.v2-faq-section {
  margin-top: 30px;
  scroll-margin-top: 96px;
}

.v2-faq-section h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--v2-ink);
}

.v2-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== FORMULARIO DE PARTICIPACION ===== */
.v2-participa {
  padding: 22px;
  border: 1px solid var(--v2-border);
  border-radius: 20px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
}

.v2-participa h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--v2-ink);
}

.v2-participa > p {
  margin-bottom: 16px;
  color: var(--v2-muted);
  font-size: .84rem;
}

.v2-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v2-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.v2-form-field--full {
  grid-column: 1 / -1;
}

.v2-form-field label {
  color: var(--v2-ink);
  font-size: .76rem;
  font-weight: 700;
}

.v2-form-field .fi,
.v2-form-field select,
.v2-form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--v2-border);
  border-radius: 10px;
  background: var(--v2-surface-2);
  color: var(--v2-ink);
  font: inherit;
  font-size: .86rem;
}

.v2-form-field .fi:focus,
.v2-form-field select:focus,
.v2-form-field textarea:focus {
  outline: 2px solid var(--v2-gold);
  outline-offset: 1px;
}

.v2-chips-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.v2-chip-pick {
  position: relative;
}

.v2-chip-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.v2-chip-pick span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--v2-border);
  border-radius: 999px;
  background: var(--v2-surface);
  color: var(--v2-muted);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s var(--v2-ease), background .18s var(--v2-ease), color .18s var(--v2-ease);
}

.v2-chip-pick input:checked + span {
  border-color: var(--v2-primary);
  background: var(--v2-primary);
  color: var(--v2-on-primary);
}

.v2-form-msg {
  margin-top: 12px;
  font-size: .84rem;
  font-weight: 600;
}

.v2-form-msg--ok {
  color: var(--v2-ok);
}

.v2-form-msg--error {
  color: var(--v2-live);
}

.v2-form-codigo {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--v2-surface-2);
  color: var(--v2-ink);
  font-family: ui-monospace, monospace;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.v2-ayuda-inmediata {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.v2-ayuda-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--v2-border);
  border-radius: 14px;
  background: var(--v2-surface-2);
  text-decoration: none;
}

.v2-ayuda-item strong {
  display: block;
  font-size: .84rem;
  color: var(--v2-ink);
}

.v2-ayuda-item span {
  display: block;
  font-size: .74rem;
  color: var(--v2-muted);
}

.v2-ayuda-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--v2-surface);
  color: var(--v2-primary);
}

/* ===== RESPONSIVO ===== */
@media (max-width: 860px) {
  .v2-split,
  .v2-split--even {
    grid-template-columns: 1fr;
  }
  .v2-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .v2-grupos { grid-template-columns: 1fr 1fr; }
  .v2-orbs { grid-template-columns: 1fr 1fr; }
}

/* ===== FAQ: el acordeón conserva el aspecto de V1 (style.css) ===== */
/* El contenedor usa la misma regla `.v2-faq` definida arriba; aquí no se
   sobrescribe `.ca-*` para que el look de V1 se mantenga intacto. */

/* ===== PROYECTOS ===== */
.v2-proygrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.v2-proycard {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--v2-border);
  border-radius: 18px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
  text-decoration: none;
  transition: transform .18s var(--v2-ease), box-shadow .18s var(--v2-ease), border-color .18s var(--v2-ease);
}

a.v2-proycard:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--v2-gold) 55%, var(--v2-border));
  box-shadow: var(--v2-shadow-lg);
}

.v2-proycard-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat-color, var(--v2-primary)) 14%, var(--v2-surface-2));
  color: var(--cat-color, var(--v2-primary));
}

.v2-proycard-body {
  min-width: 0;
}

.v2-proycard-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.v2-proycard-head h3 {
  margin: 0;
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--v2-ink);
  line-height: 1.25;
}

.v2-proycard-estado {
  order: -1;
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--v2-surface-2);
  color: var(--v2-muted);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.v2-proycard-body p {
  margin-top: 5px;
  color: var(--v2-muted);
  font-size: .8rem;
  line-height: 1.5;
}

.v2-proycard-go {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--v2-surface-2);
  color: var(--v2-ink);
  opacity: 0;
  transition: opacity .18s var(--v2-ease);
}

a.v2-proycard:hover .v2-proycard-go {
  opacity: 1;
}

@media (max-width: 520px) {
  .v2-proygrid { grid-template-columns: 1fr; }
}

/* ===== DETALLE DE GRUPO ===== */
.v2-migas {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--v2-muted);
  font-size: .76rem;
  font-weight: 600;
}

.v2-migas a {
  color: var(--v2-primary);
  text-decoration: none;
}

.v2-migas a:hover {
  text-decoration: underline;
}

.v2-grupo-detalle {
  padding: 22px;
  border: 1px solid var(--v2-border);
  border-left: 3px solid var(--cat-color, var(--v2-primary));
  border-radius: 20px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
}

.v2-grupo-portada {
  display: flex;
  align-items: center;
  gap: 16px;
}

.v2-grupo-logo {
  display: grid;
  place-items: center;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--cat-color, var(--v2-primary)) 12%, var(--v2-surface-2));
  color: var(--cat-color, var(--v2-primary));
}

.v2-grupo-logo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.v2-grupo-logo--vacio {
  font-size: 30px;
}

.v2-lista {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--v2-muted);
  font-size: .82rem;
  line-height: 1.6;
}

.v2-lista li {
  margin-bottom: 4px;
}

a.v2-grupocard--enlace {
  position: relative;
  text-decoration: none;
}

a.v2-grupocard--enlace:hover {
  border-color: color-mix(in srgb, var(--v2-gold) 55%, var(--v2-border));
}

.v2-grupocard .v2-grupocard-go {
  position: absolute;
  left: 50%;
  bottom: 9px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--v2-surface-2);
  color: var(--v2-ink);
  opacity: .45;
  transform: translateX(-50%);
  transition: opacity .18s var(--v2-ease), background .18s var(--v2-ease);
}

a.v2-grupocard--enlace:hover .v2-grupocard-go {
  opacity: 1;
  background: var(--v2-gold);
  color: #fff;
}
