/* ====== ANCHO SOLO PARA CABEZAS ====== */
.page-cabezas #mainwrap {
  width: 100%;
}

.page-cabezas #contentwrap {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  float: none;
}

/* ====== GRID ====== */
#cabezas-lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ====== TARJETA ====== */
.cabeza-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  background: #f5f5f5;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: 0 6px 25px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}

.cabeza-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(0,0,0,.18);
}

/* ====== IMAGEN ====== */
.cabeza-link {
  display: flex;
  align-items: center;
}

.cabeza-img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.cabeza-img img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* ====== TEXTO ====== */
.cabeza-info {
  display: flex;
  flex-direction: column;
}

.cabeza-nombre {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: #638900;
}

.cabeza-nombre a {
  color: inherit;
  text-decoration: none;
}

.cabeza-estado {
  font-size: 13px;
  font-weight: bold;
}

.cabeza-card.conseguida {
  background: linear-gradient(135deg,#8fd35a,#4f8a2b);
  border: 1px solid #4f8a2b;
}

.cabeza-card.conseguida * {
  color: #fff;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.modal.activo {
  opacity: 1;
  pointer-events: auto;
}

.modal.oculto {
  display: none;
}

.modal-contenido {
  background: #111;
  color: #fff;
  max-width: 520px;
  width: 92%;
  padding: 24px;
  border-radius: 12px;
  position: relative;
  text-align: center;
  transform: scale(.95);
  transition: transform .25s ease;
}

.modal.activo .modal-contenido {
  transform: scale(1);
}

.modal-imagen {
  width: 96px;
  margin: 12px auto;
}

.modal-cerrar {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 22px;
  cursor: pointer;
}

/* ===== FLECHAS ===== */
.modal-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  font-size: 40px;
  width: 50px;
  height: 70px;
  cursor: pointer;
  z-index: 10000;
}

.modal-prev {
  left: 10px;
}

.modal-next {
  right: 10px;
}

.modal-flecha:hover {
  background: rgba(0,0,0,.85);
}

/* ===== MÓVIL: FIX DEFINITIVO ===== */
@media (max-width: 600px) {

  .modal {
    align-items: center;
    justify-content: center;
    padding: 10px;
  }

  .modal-contenido {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
    transform: none !important;
  }

  .modal-flecha {
    font-size: 34px;
    width: 44px;
    height: 60px;
  }

  .modal-prev {
    left: 5px;
  }

  .modal-next {
    right: 5px;
  }
}

/* ===== SEO ===== */
.seo-mobs {
  position: absolute;
  left: -9999px;
}
.pagetitle-sub {
  margin-top: 8px;
  text-align: center;
  font-size: 15px;
  color: #555;
}
/* ===== CABECERA CABEZAS ===== */
.page-cabezas .post.singlep {
  background: linear-gradient(
    135deg,
    #8fd35a,
    #4f8a2b
  );
  padding: 12px 12px;
  border-radius: 10px;
  margin-bottom: 30px;
}
