/* Estilos para el Directorio de Miembros (Nuevo Diseño REDELAE) */

.phead {
  position: relative;
  background: var(--grad, linear-gradient(60deg,#E2005D 0%,#E2005D 24%,#D70461 40%,#CC0864 52%,#A61571 70%,#622C87 88%,#333C96 100%));
  color: #fff;
  overflow: hidden;
  padding: calc(66px + clamp(1.8rem, 4vh, 3.2rem)) 0 clamp(2.4rem, 6vh, 3.6rem);
}
body.admin-bar .phead {
  padding-top: calc(66px + 32px + clamp(1.8rem, 4vh, 3.2rem));
}
@media screen and (max-width: 782px) {
  body.admin-bar .phead {
    padding-top: calc(66px + 46px + clamp(1.8rem, 4vh, 3.2rem));
  }
}
.phead .wrap { position: relative; z-index: 3; }
.crumb { font-size: .82rem; color: #ffd9ee; margin-bottom: 1.2rem; }
.crumb a { color: #ffd9ee; text-decoration: none; }
.crumb a:hover { color: #fff; text-decoration: underline; }
.kick { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--amarillo, #FFD21E); font-weight: 600; margin-bottom: .8rem; }
.phead h1 { font-family: var(--serif, "Instrument Serif", Georgia, serif); font-weight: 400; line-height: .95; font-size: clamp(2.6rem, 7vw, 5.2rem); margin: 0; }
.phead .lede { max-width: 60ch; margin-top: 1rem; color: #ffe4f2; font-size: clamp(1rem, 1.1vw + .6rem, 1.2rem); line-height: 1.5; }
.phead .stat { margin-top: 1.8rem; display: flex; gap: 2.2rem; flex-wrap: wrap; font-size: .84rem; color: #ffd9ee; }
.phead .stat b { font-family: var(--serif, "Instrument Serif", Georgia, serif); font-size: 1.9rem; color: #fff; display: block; font-weight: 400; line-height: 1; }

/* FORMAS DE MARCA EN HEADER */
.ph-shapes { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.ph-shapes .hs { position: absolute; display: block; }
.hs-almena { right: 5%; top: -6%; width: clamp(60px, 7vw, 100px); opacity: .9; }
.hs-campana { right: 12%; bottom: -18%; width: clamp(70px, 8vw, 120px); opacity: .85; }
.hs-circ { right: 3%; top: 46%; width: clamp(30px, 3.4vw, 52px); opacity: .9; }
@media(max-width:760px) { .hs-campana, .hs-circ { display: none; } .hs-almena { right: 5%; opacity: .7; } }

/* CONTROLES / FILTROS STICKY */
.controls {
  position: sticky;
  top: 66px;
  z-index: 40;
  background: rgba(255, 248, 251, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea, rgba(28,14,46,.14));
  padding: .85rem 0;
}
.controls-in { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.fgroup { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.fgroup .lab { font-size: .74rem; color: #8a85a0; font-weight: 700; margin-right: .3rem; text-transform: uppercase; letter-spacing: .05em; }
.chip { font-size: .82rem; border: 1px solid var(--linea, rgba(28,14,46,.14)); background: #fff; color: #453a52; padding: .38rem .85rem; border-radius: 999px; cursor: pointer; transition: .15s; font-family: inherit; font-weight: 500; }
.chip:hover { border-color: var(--magenta, #E2005D); color: var(--magenta, #E2005D); }
.chip.on { background: var(--tinta, #1C0E2E); color: #fff; border-color: var(--tinta, #1C0E2E); }
.search { margin-left: auto; position: relative; }
.search input { border: 1px solid var(--linea, rgba(28,14,46,.14)); background: #fff; border-radius: 999px; padding: .5rem 1.1rem; font-family: inherit; font-size: .85rem; min-width: 250px; transition: border-color .2s; }
.search input:focus { outline: none; border-color: var(--magenta, #E2005D); box-shadow: 0 0 0 3px rgba(226, 0, 93, .12); }
@media(max-width:760px) { .search { width: 100%; margin-left: 0; margin-top: .4rem; } .search input { width: 100%; } }

/* SECCIÓN PRINCIPAL DEL DIRECTORIO */
.dir { padding: clamp(2.4rem, 6vh, 4rem) 0 5rem; }
.intro { max-width: 65ch; color: var(--texto, #453a52); font-size: 1.05rem; margin-bottom: 2.2rem; line-height: 1.6; }

/* AGRUPACIÓN POR PAÍS */
.country { margin-bottom: 3.2rem; }
.country > h2 {
  font-family: var(--serif, "Instrument Serif", Georgia, serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 400;
  border-bottom: 2px solid var(--tinta, #1C0E2E);
  padding-bottom: .5rem;
  margin-bottom: .3rem;
  display: flex;
  align-items: baseline;
  gap: .8rem;
  color: var(--tinta, #1C0E2E);
}
.country > h2 .c {
  font-size: .82rem;
  color: #8a85a0;
  font-weight: 400;
  font-family: var(--sans, "Archivo", system-ui, sans-serif);
}

/* GRID DE TARJETAS */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
  margin-top: 1.4rem;
}
@media(max-width: 1060px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media(max-width: 760px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 480px)  { .grid { grid-template-columns: 1fr; } }

/* TARJETA DE MIEMBRO (NUEVO DISEÑO) */
.card {
  border: 1px solid var(--linea, rgba(28,14,46,.14));
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(28,14,46,.02);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(28, 14, 46, .12);
  border-color: rgba(226, 0, 93, .3);
}

/* CAJA DE LOGOTIPO / IMAGEN */
.tile {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--linea, rgba(28,14,46,.14));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .25s ease;
}
.card:hover .tile img {
  transform: scale(1.04);
}
.tile .tile-placeholder {
  font-family: var(--serif, "Instrument Serif", Georgia, serif);
  font-size: 2.2rem;
  color: #b8adc4;
  font-weight: 400;
  text-align: center;
}

/* CUERPO DE LA TARJETA */
.card .body {
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
}
.card .body h3 {
  font-family: var(--serif, "Instrument Serif", Georgia, serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--tinta, #1C0E2E);
}
.card .body .loc {
  font-size: .82rem;
  color: #8a85a0;
  font-weight: 500;
}

/* REDES SOCIALES EN TARJETAS */
.card-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: .6rem;
  padding-top: .5rem;
  border-top: 1px dashed rgba(28, 14, 46, 0.08);
}
.cs-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid rgba(28, 14, 46, 0.08);
  color: #64748b;
  text-decoration: none;
  transition: all .2s ease;
}
.cs-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}
.cs-icon.cs-ig:hover {
  background: #E1306C;
  color: #fff;
  border-color: #E1306C;
}
.cs-icon.cs-fb:hover {
  background: #1877F2;
  color: #fff;
  border-color: #1877F2;
}
.cs-icon.cs-tw:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}
.cs-icon.cs-yt:hover {
  background: #FF0000;
  color: #fff;
  border-color: #FF0000;
}

.card .body .go {
  font-size: .8rem;
  font-weight: 700;
  color: var(--magenta, #E2005D);
  margin-top: auto;
  padding-top: .6rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card:hover .body .go {
  text-decoration: underline;
}

/* MENSAJE VACÍO */
.empty {
  color: #8a85a0;
  padding: 3rem 0;
  font-size: 1.05rem;
  text-align: center;
}
