/* ══════════════════════════════════════════════════════════════
 * PATRIMONIO CULTURAL — página que agrupa a los pueblos
 * Misma paleta que Puruhá y Salasaka.
 * ══════════════════════════════════════════════════════════════ */
.pc-container {
  --pc-ink: #003B49;
  --pc-teal: #006068;
  --pc-accent: #f1b82d;
  --pc-muted: #4a5568;
  --pc-cream: #f8f9fa;
  --pc-white: #ffffff;
  --pc-fondo: #f8f9fa;   /* fondo de la pagina */
  --pc-radius: 16px;
  --pc-trans: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  box-sizing: border-box;
  color: var(--pc-ink);
  background: var(--pc-fondo);
  line-height: 1.6;
}
.pc-container *,
.pc-container *::before,
.pc-container *::after { box-sizing: border-box; }

.pc-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ── Portada — mismas medidas que el .pg-hero de /cantones/ ────── */
/* Medido allí: 272 px de alto (min-height 220 + 44/40 de relleno),
   texto a la izquierda en el contenedor de 1120, título 2.2rem y
   fondo al 10 % bajo un degradado diagonal. */
.pc-hero {
  position: relative;
  min-height: 220px;
  padding: 44px 0 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--pc-ink);
  color: #fff;
}
.pc-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .1;
}
.pc-hero-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(0, 59, 73, .9) 0%,
    rgba(0, 96, 104, .55) 60%,
    transparent 100%);
}
.pc-hero-inner {
  width: 100%;
  padding: 0 20px;
  text-align: left;
}

.pc-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(241, 184, 45, .15);
  border: 1px solid rgba(241, 184, 45, .3);
  color: var(--pc-accent);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 12px;
}
.pc-hero-title {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 8px;
}
.pc-hero-title span { color: var(--pc-accent); }
.pc-hero-desc {
  font-size: .78rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .65);
  max-width: 520px;
  margin: 0 0 16px;
}

.pc-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.pc-stat { display: flex; flex-direction: column; }
.pc-stat-n {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pc-accent);
  line-height: 1;
}
.pc-stat-l {
  font-size: .48rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .42);
  margin-top: 2px;
}

/* ── Sección de fichas ─────────────────────────────────────────── */
.pc-sec { padding: 64px 0 80px; background: var(--pc-fondo); }

.pc-sec-head { text-align: center; margin-bottom: 40px; }
.pc-sec-head h2 {
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--pc-ink);
  margin: 0 0 8px;
}
.pc-sec-head p {
  font-size: .86rem;
  color: var(--pc-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Chakana decorativa, como la de las otras secciones del sitio */
.pc-chakana { display: flex; justify-content: center; gap: 4px; margin-bottom: 12px; }
.pc-chakana i {
  width: 8px; height: 8px;
  background: var(--pc-teal);
  transform: rotate(45deg);
  opacity: .45;
}
.pc-chakana i:nth-child(odd) { background: var(--pc-accent); opacity: .85; }

@media (max-width: 767px) {
  .pc-hero-desc { font-size: .8rem; }
  .pc-sec { padding: 48px 0 60px; }
}


/* ══════════════════════════════════════════════════════════════
 * FICHAS GIRATORIAS — mismo comportamiento que las de /cantones/
 *
 * Al pasar el ratón la ficha gira y enseña el dorso con el texto y
 * el enlace. Se añaden dos cosas que la original no tenía:
 *   · girar también al recibir el foco del teclado, porque si no el
 *     enlace del dorso quedaba inalcanzable tabulando;
 *   · girar al tocar, ya que en móvil no hay "pasar el ratón".
 * ══════════════════════════════════════════════════════════════ */

/* Flex centrado en vez de rejilla de 5 columnas: con dos fichas no
   queda un hueco a la derecha, y al añadir más se siguen colocando
   solas, siempre centradas. */
.pc-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.pc-flip-wrap { width: 200px; height: 380px; perspective: 1000px; }
@media (max-width: 560px) {
  .pc-grid { gap: 14px; }
  .pc-flip-wrap { width: calc(50% - 7px); height: 300px; }
}

.pc-flip {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
}
.pc-flip-wrap:hover .pc-flip,
.pc-flip-wrap:focus-within .pc-flip,
.pc-flip-wrap.esta-girada .pc-flip { transform: rotateY(180deg); }

.pc-cara {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ── Cara frontal ──────────────────────────────────────────────── */
.pc-frente { background: var(--pc-ink); z-index: 2; }
.pc-frente img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pc-frente::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0, 59, 73, .92) 0%,
    rgba(0, 59, 73, .18) 52%,
    transparent 100%);
}
.pc-flip-wrap:hover .pc-frente,
.pc-flip-wrap:focus-within .pc-frente,
.pc-flip-wrap.esta-girada .pc-frente { pointer-events: none; z-index: 0; }

.pc-pista {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .7);
  font-size: .72rem;
  animation: pc-latido 2s ease-in-out infinite;
}
@keyframes pc-latido {
  0%, 100% { box-shadow: 0 0 0 0 rgba(241, 184, 45, .35); }
  50%      { box-shadow: 0 0 0 6px rgba(241, 184, 45, 0); }
}

.pc-frente-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 18px 14px;
}
.pc-emoji { display: block; font-size: 1.6rem; margin-bottom: 4px; line-height: 1; }
.pc-nombre {
  font-size: clamp(.92rem, 1.4vw, 1.1rem);
  font-weight: 700;
  line-height: 1.12;
  color: #fff;
  margin: 0 0 2px;
}
.pc-etq {
  font-size: .54rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .55);
  margin: 0;
}

/* ── Dorso ─────────────────────────────────────────────────────── */
.pc-dorso {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, var(--pc-ink) 0%, var(--pc-teal) 100%);
  border: 2px solid rgba(241, 184, 45, .22);
  z-index: 1;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 18px;
}
.pc-flip-wrap:hover .pc-dorso,
.pc-flip-wrap:focus-within .pc-dorso,
.pc-flip-wrap.esta-girada .pc-dorso { pointer-events: auto; z-index: 3; }

.pc-dorso-emoji { font-size: 2rem; margin-bottom: 10px; line-height: 1; }
.pc-dorso-nombre {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pc-accent);
  margin: 0 0 4px;
}
.pc-dorso-etq {
  font-size: .52rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .45);
  margin: 0 0 12px;
}
.pc-dorso-desc {
  font-size: .68rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .75);
  margin: 0 0 16px;
  max-width: 220px;
}
.pc-dorso-btn {
  display: inline-block;
  white-space: nowrap;   /* la flecha se iba a una segunda línea */
  padding: 9px 16px;
  border-radius: 9px;
  background: var(--pc-accent);
  color: var(--pc-ink);
  font-size: .7rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .3s ease, transform .3s ease;
}
.pc-dorso-btn:hover { background: #fff; color: var(--pc-ink); transform: translateY(-2px); }
.pc-dorso-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Sin animación para quien la ha desactivado: se muestra el dorso
   al pasar por encima, pero sin el giro. */
@media (prefers-reduced-motion: reduce) {
  .pc-flip { transition: none !important; }
  .pc-pista { animation: none; }
  .pc-dorso-btn { transition: none !important; }
}
