/* ============================================================
   BLOG.CSS — Estilos del blog PZVerse
   Patricia Alonso · patriciaalonso.es
   ============================================================ */

/* ============================================================
   TÍTULO DEL BLOG
   ============================================================ */
.titulo-blog {
    font-family: 'Cinzel', serif;
    text-align: center;
    font-size: 2rem;
    color: #9b82ee;
    margin-top: 40px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #9b82ee, 0 0 20px #c98fc2;
}

/* ============================================================
   CARD CONTENEDOR
   ============================================================ */
.card {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================================
   TARJETAS ADMIN — crear / editar / gestionar publicaciones
   ============================================================ */
.card.admin-blog-card {
    max-width: 900px;
    margin: 80px auto 40px;
}

.admin-blog-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 20px;
}

.admin-blog-acciones {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.btn-crear-evento.espaciado { margin-top: 20px; }
.btn-admin-neon.espaciado { margin-left: 10px; }
.btn-admin-neon.bloque-espaciado { display: inline-block; margin-top: 20px; }

.imagen-preview-post {
    width: 150px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.miniatura-post-grande {
    width: 80px;
    border-radius: 6px;
}

/* ============================================================
   GRID DEL BLOG
   ============================================================ */
.grid-blog {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    padding: 10px;
}

/* ============================================================
   TARJETA DE POST
   ============================================================ */
.tarjeta-blog {
    background: rgba(20, 20, 40, 0.75);
    border: 1px solid rgba(123, 95, 224, 0.4);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 0 10px rgba(123, 95, 224, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.tarjeta-blog:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(123, 95, 224, 0.5);
}

.tarjeta-blog img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 0 8px #7b5fe0;
}

.contenido-tarjeta {
    text-align: center;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contenido-tarjeta h3 {
    font-size: 0.9rem;
    color: #7b5fe0;
    font-family: 'Cinzel', serif;
    text-shadow: 0 0 6px #7b5fe0;
}

.fecha {
    font-size: 0.8rem;
    color: #ccc;
}

.resumen {
    font-size: 0.78rem;
    color: #ddd;
    line-height: 1.4;
    flex: 1;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn-leer {
    display: inline-block;
    padding: 6px 14px;
    background: #7b5fe0;
    color: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 0 8px #7b5fe0;
    transition: background 0.3s ease;
    margin-top: auto;
}

.btn-leer:hover { background: #9b82ee; }

.btn-admin-neon {
    background: rgba(123, 95, 224, 0.2);
    color: #7B5FE0;
    border: 1px solid #7B5FE0;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.78rem;
    box-shadow: 0 0 6px #7B5FE0;
    font-family: 'Poppins', sans-serif;
    transition: background 0.2s;
}

.btn-admin-neon:hover { background: rgba(123, 95, 224, 0.4); }

/* ============================================================
   PAGINADOR
   ============================================================ */
.paginador {
    text-align: center;
    margin: 30px 0;
}

.pagina, .pagina-activa {
    display: inline-block;
    margin: 0 4px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    color: #fff;
    background: #7b5fe0;
    box-shadow: 0 0 8px #7b5fe0;
    transition: background 0.3s ease;
    font-size: 0.85rem;
}

.pagina:hover { background: #9b82ee; }

.pagina-activa {
    background: #fff;
    color: #7b5fe0;
    box-shadow: 0 0 12px #fff;
}

/* ============================================================
   MENSAJES
   ============================================================ */
.mensaje-exito {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: #9b82ee;
    margin: 16px auto 24px;
    padding: 12px 20px;
    border: 2px solid #9b82ee;
    border-radius: 10px;
    width: fit-content;
    box-shadow: 0 0 12px #9b82ee;
    background-color: rgba(123, 95, 224, 0.1);
}

.mensaje-vacio {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #9b82ee;
    margin-top: 40px;
    padding: 20px;
    border: 2px dashed #9b82ee;
    border-radius: 10px;
    background-color: rgba(123, 95, 224, 0.05);
}

/* ============================================================
   POST INDIVIDUAL
   ============================================================ */
.post-contenedor {
    max-width: 900px;
    margin: 40px auto;
    padding: 24px;
    background: rgba(20, 20, 40, 0.85);
    border: 2px solid #7B5FE0;
    border-radius: 12px;
    box-shadow: 0 0 15px #7B5FE0, 0 0 25px #9146FF;
    text-align: center;
}

.post-titulo {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #7B5FE0;
    text-shadow: 0 0 8px #7B5FE0;
    margin-bottom: 8px;
}

.post-fecha {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 20px;
}

.post-imagen {
    max-width: 200px;
    width: 100%;
    margin: 0 auto 24px;
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 10px #7B5FE0;
    object-fit: cover;
}

.post-cuerpo {
    font-size: 1rem;
    color: #ccc;
    line-height: 1.7;
    text-align: left;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn-volver {
    display: inline-block;
    background-color: #222;
    color: #7B5FE0;
    padding: 8px 16px;
    font-size: 0.85rem;
    border: 1px solid #7B5FE0;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 0 6px #7B5FE0;
}

/* ============================================================
   TABLA GESTIÓN BLOG
   ============================================================ */
.tabla-posts {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tabla-posts th, .tabla-posts td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(123, 95, 224, 0.3);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
}

.tabla-posts th {
    color: #7b5fe0;
    font-size: 0.9rem;
    text-shadow: 0 0 4px #7b5fe0;
}

.tabla-posts img { max-width: 60px; border-radius: 4px; }

.btn-editar {
    background: #00eaff;
    color: #000;
    box-shadow: 0 0 8px #00eaff;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.78rem;
    margin-right: 6px;
}

.btn-eliminar {
    background: #ff0044;
    color: #fff;
    box-shadow: 0 0 8px #ff0044;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.78rem;
    cursor: pointer;
    border: none;
}

/* ============================================================
   RESPONSIVE MÓVIL
   ============================================================ */
@media (max-width: 900px) {
    .grid-blog { grid-template-columns: repeat(2, 1fr); }
    .titulo-blog { font-size: 1.6rem; }
}

@media (max-width: 500px) {
    .grid-blog { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 4px; }
    .tarjeta-blog { padding: 10px; }
    .titulo-blog { font-size: 1.3rem; }
    .contenido-tarjeta h3 { font-size: 0.78rem; }
    .fecha { font-size: 0.68rem; }
    .resumen { font-size: 0.68rem; -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
    .btn-leer { font-size: 0.65rem; padding: 5px 10px; }
    .post-titulo { font-size: 1.3rem; }
    .post-cuerpo { font-size: 0.9rem; }
    .tabla-posts { font-size: 0.75rem; }
}