/* ============================================================
   Pachawabi Apoya — Composición del hexagrama y tarjetas de
   colaboración. Hoja de estilo independiente, cargada solo en
   la página "pachawabi-apoya" (ver functions.php).
   ============================================================ */

/* ── Estructura y espaciados propios de la sección (no dependen del
   bundle de Tailwind compilado, para evitar clases sin efecto) ──── */
.pw-apoya-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.pw-apoya-hero {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto;
}

/* Separador ornamental reutilizado entre bloques (título/intro → hexagrama
   → formas de colaborar), con aire generoso a cada lado. */
.pw-apoya-divider {
  margin: 4.5rem auto;
  max-width: 26rem;
}

.pw-apoya-collab-wrap {
  padding-top: 1rem;
}

.pw-apoya-collab-header {
  text-align: center;
  margin-bottom: 3rem;
}

.pw-apoya-closing {
  text-align: center;
  margin-top: 5rem;
}

.pw-collab-grid {
  display: grid;
  gap: 1.25rem;
  max-width: 56rem;
  margin: 0 auto;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .pw-collab-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .pw-collab-grid { grid-template-columns: repeat(3, 1fr); }
}

.pw-apoya-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.pw-apoya-eyebrow::before,
.pw-apoya-eyebrow::after {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: linear-gradient(to right, transparent, #c9952b80);
}
.pw-apoya-eyebrow::after {
  background: linear-gradient(to left, transparent, #c9952b80);
}

/* ── Composición del hexagrama ─────────────────────────────── */
.pw-hexagram-wrap {
  position: relative;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
}

.pw-hexagram {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

/* Radios sutiles de fondo, como una huella circular detrás de las fotos */
.pw-hexagram::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px dashed #c9952b26;
  border-radius: 50%;
  pointer-events: none;
}

.pw-hex-photo {
  position: absolute;
  width: 26%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(13, 10, 7, 0.55);
  border: 1px solid #c9952b40;
  background: #1a1410;
  transform-origin: center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease, border-color 0.5s ease;
  z-index: 2;
}

.pw-hex-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.02);
}

.pw-hex-photo:hover {
  box-shadow: 0 16px 34px rgba(201, 149, 43, 0.35);
  border-color: #c9952b99;
  z-index: 6;
}
.pw-hex-photo:hover img { transform: scale(1.06); }
.pw-hex-photo img { transition: transform 0.6s ease; }

/* Placeholder wabi-sabi para fotos aún no cargadas desde WordPress */
.pw-hex-photo.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b5a40;
  font-size: 1.4rem;
}
.pw-hex-photo.is-empty::before { content: "✧"; opacity: 0.6; }

/* Posiciones del hexagrama (vértices a 60° entre sí, con radio amplio
   para dejar aire alrededor del recuadro central), con ligera rotación
   e imperfección artesanal en cada foto. */
.pw-hex-1 { top: 7%;  left: 50%; transform: translate(-50%, -50%) rotate(-4deg); }
.pw-hex-2 { top: 19%; left: 89%; transform: translate(-50%, -50%) rotate(3deg) scale(0.97); }
.pw-hex-3 { top: 70%; left: 89%; transform: translate(-50%, -50%) rotate(-3deg) scale(1.02); }
.pw-hex-4 { top: 93%; left: 50%; transform: translate(-50%, -50%) rotate(4deg); }
.pw-hex-5 { top: 70%; left: 11%; transform: translate(-50%, -50%) rotate(-2deg) scale(1.02); }
.pw-hex-6 { top: 19%; left: 11%; transform: translate(-50%, -50%) rotate(3deg) scale(0.97); }

.pw-hex-1:hover { transform: translate(-50%, -50%) rotate(0deg) scale(1.05); }
.pw-hex-2:hover { transform: translate(-50%, -50%) rotate(0deg) scale(1.05); }
.pw-hex-3:hover { transform: translate(-50%, -50%) rotate(0deg) scale(1.05); }
.pw-hex-4:hover { transform: translate(-50%, -50%) rotate(0deg) scale(1.05); }
.pw-hex-5:hover { transform: translate(-50%, -50%) rotate(0deg) scale(1.05); }
.pw-hex-6:hover { transform: translate(-50%, -50%) rotate(0deg) scale(1.05); }

/* Recuadro central: siempre recto, ordenado, sin rotación.
   max-height + overflow controlan cualquier texto largo (incluso de
   prueba) para que el recuadro JAMÁS empuje su borde superior más allá
   de la zona segura y se superponga a la fotografía de arriba. */
.pw-hex-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44%;
  max-width: 14rem;
  max-height: 58%;
  overflow-y: auto;
  overflow-wrap: break-word;
  word-break: break-word;
  background: #100d08ee;
  border: 1px solid #c9952b4d;
  box-shadow: 0 0 0 1px #0d0a07, 0 14px 30px rgba(0, 0, 0, 0.55);
  padding: 1rem 0.9rem;
  text-align: center;
  z-index: 10;
}
/* Scrollbar discreta si un campo editable llega a tener texto muy largo */
.pw-hex-center::-webkit-scrollbar { width: 4px; }
.pw-hex-center::-webkit-scrollbar-thumb { background: #c9952b4d; }

.pw-hex-center .pw-hex-center-mark {
  color: #c9952b;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  display: block;
}

.pw-hex-center h3 {
  font-family: 'Cinzel', serif;
  color: #f2ead3;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
  margin-bottom: 0.55rem;
  overflow-wrap: break-word;
}

.pw-hex-center .pw-hex-tags {
  color: #9a8060;
  font-size: 0.6rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
  overflow-wrap: break-word;
}

.pw-hex-center .pw-hex-highlight {
  color: #c9c0a8;
  font-size: 0.66rem;
  line-height: 1.5;
  font-style: italic;
  font-weight: 300;
  overflow-wrap: break-word;
}

/* Pantallas medianas: recuadro central un poco más amplio y legible */
@media (min-width: 640px) {
  .pw-hexagram-wrap { max-width: 42rem; }
  .pw-hex-center { padding: 1.4rem 1.3rem; }
  .pw-hex-center h3 { font-size: 0.76rem; }
  .pw-hex-center .pw-hex-tags { font-size: 0.7rem; }
  .pw-hex-center .pw-hex-highlight { font-size: 0.76rem; }
}

@media (min-width: 900px) {
  .pw-hexagram-wrap { max-width: 48rem; }
}

/* Pantallas muy angostas: recuadro central gana un poco de aire */
@media (max-width: 400px) {
  .pw-hex-center { width: 52%; padding: 0.7rem 0.55rem; max-height: 54%; }
  .pw-hex-center h3 { font-size: 0.54rem; }
  .pw-hex-center .pw-hex-tags,
  .pw-hex-center .pw-hex-highlight { font-size: 0.56rem; }
}

/* ── Formas de colaborar ───────────────────────────────────── */
.pw-collab-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border: 1px solid #c9952b33;
  background: linear-gradient(160deg, #1a141066 0%, #0d0a0700 60%);
  padding: 1.75rem 1.5rem;
  transition: border-color 0.4s ease, transform 0.4s ease, background 0.4s ease;
}
.pw-collab-card:hover {
  border-color: #c9952b80;
  transform: translateY(-3px);
}

.pw-collab-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9952b4d;
  border-radius: 50%;
  color: #c9952b;
  font-size: 1rem;
}

.pw-collab-text {
  margin-top: 0.5rem;
}

/* Copiar dirección / Ver QR: misma altura, mismo lenguaje visual,
   uno junto al otro como par de acciones equivalentes. */
.pw-collab-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
}

.pw-collab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  border: 1px solid #c9952b66;
  color: #c9952b;
  background: transparent;
  padding: 0.65rem 0.5rem;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.pw-collab-btn:hover {
  background-color: #c9952b;
  color: #0d0a07;
  border-color: #c9952b;
}

/* Visor del QR: panel centrado y con identidad propia, reutilizando
   el mismo toggle/JS existente (.pw-qr-btn + clase "hidden"). */
.pw-collab-qr-box:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding: 1.1rem;
  border: 1px solid #c9952b40;
  background: #0d0a07;
  text-align: center;
}
.pw-collab-qr-caption {
  color: #6b5a40;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Cinzel', serif;
}
.pw-collab-qr-img {
  width: 9rem;
  height: 9rem;
  border: 1px solid #c9952b33;
  background: #fff;
  padding: 0.4rem;
}

.pw-collab-cta-wrap { margin-top: auto; }

.pw-collab-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px solid #c9952b;
  color: #c9952b;
  padding: 0.65rem 0.75rem;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.pw-collab-cta-btn:hover {
  background-color: #c9952b;
  color: #0d0a07;
}
.pw-collab-cta-btn.is-disabled {
  border-color: #c9952b4d;
  color: #6b5a40;
  cursor: not-allowed;
}
.pw-collab-cta-btn.is-disabled:hover {
  background-color: transparent;
  color: #6b5a40;
}

.pw-collab-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.7rem;
  color: #9a8060;
  word-break: break-all;
  line-height: 1.6;
  border-top: 1px dashed #c9952b26;
  padding-top: 0.75rem;
  margin-top: 0.1rem;
}
