/* ============================================================
   SECCIÓN DEL FORO
   ============================================================ */
.foro-section {
  margin: 60px auto;
  padding: 10px 40px;
  color: white;
}

/* Header: Título + Botón */
.foro-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 25px;
  padding: 18px 24px;
  max-width: 1150px;
  margin: 0 auto;
  border: 2px solid #7B5FE0;
  border-radius: 12px;
  box-shadow: 0 0 15px #7B5FE0, 0 0 25px #9146FF;
  background: rgba(20, 20, 40, 0.6);
  backdrop-filter: blur(4px);
  animation: glowPulse 2s infinite ease-in-out;
  box-sizing: border-box; /* asegura que el padding no rompa el ancho */
}

.foro-header h2 {
  font-size: 1.6rem;
  color: #7B5FE0;
  margin: 0;
  text-shadow: 0 0 8px #7B5FE0;
}

/* Botón Nueva Entrada */
.btn-nueva-entrada {
  background: #7B5FE0;
  color: white;
  font-weight: bold;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 5px;
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 0 0 8px #7B5FE0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-nueva-entrada:hover {
  transform: scale(1.05);
  background: #9b82ee;
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 15px #7B5FE0, 0 0 25px #9146FF;
  }
  50% {
    box-shadow: 0 0 25px #7B5FE0, 0 0 35px #9146FF;
  }
  100% {
    box-shadow: 0 0 15px #7B5FE0, 0 0 25px #9146FF;
  }
}


/* ============================================================
   GRID DE TEMAS DEL FORO
   ============================================================ */
.foro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* Fuerza 3 columnas como el blog */
  gap: 30px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;  /* Centra el grid */
}

@media (max-width: 900px) {
  .foro-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

@media (max-width: 600px) {
  .foro-grid { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
  .foro-section { padding: 10px 16px; }
}

/* Tarjetas de cada tema (listado del foro) — nombre propio para no
   chocar con .tarjeta-tema usado en responder.html */
.tarjeta-tema-grid {
  background: rgba(20, 20, 40, 0.85);
  border-radius: 12px;
  padding: 34px 26px;
  box-shadow: 0 0 12px #7B5FE0;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease;
  box-sizing: border-box;  /* Igual que en el blog */
}

.tarjeta-tema-grid:hover {
  transform: scale(1.03);
}

/* Imagen del tema */
.tarjeta-tema-grid img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 0 8px #7B5FE0;
}

/* Título del tema */
.tarjeta-tema-grid h3 {
  font-size: 0.8rem;
  color: #7B5FE0;
  margin: 0;
}

/* Fragmento del contenido */
.tarjeta-tema-grid p {
  font-size: 0.72rem;
  color: #ccc;
  margin: 0;
}

/* Vista previa del contenido en cada tarjeta del foro — texto pequeño,
   recuadro grande: que se vea casi todo el contenido */
.preview-tema {
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  color: #ccc;
  line-height: 1.45;
  text-align: justify;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mensaje-vacio {
  text-align: center;
  color: #ccc;
  font-family: 'Poppins', sans-serif;
  padding: 20px;
}

/* ============================================================
   VER MÁS (solo móvil, revela las tarjetas 4-6 de la página)
   ============================================================ */
.btn-ver-mas-foro {
  display: none;
  margin: 4px auto 20px;
  padding: 8px 20px;
  border-radius: 20px;
  background: rgba(123, 95, 224, 0.15);
  border: 1px solid #7B5FE0;
  color: #C9B8E8;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-ver-mas-foro:hover { background: rgba(123, 95, 224, 0.3); color: #fff; }

@media (max-width: 600px) {
  .foro-grid:not(.expandido) > *:nth-child(n+4) { display: none; }
}

/* ============================================================
   PAGINADOR — mismo estilo que el blog
   ============================================================ */
.paginador {
  text-align: center;
  margin: 10px 0 30px;
}

.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;
}

/* Botón Ver Tema */
.btn-ver-tema {
  align-self: flex-start;
  background: #9146FF;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.6rem;
  box-shadow: 0 0 6px #9146FF;
  transition: background 0.2s ease;
}

.btn-ver-tema:hover {
  background: #a56bff;
}


/* ============================================================
   CONTENIDO DEL TEMA
   ============================================================ */
.tema-contenido {
  max-width: 1000px;
  margin: 60px auto;
  padding: 20px;
  text-align: center;
}

.tema-cuerpo {
  font-size: 0.95rem;
  color: #ccc;
  line-height: 1.6;
  max-width: 800px;
  margin: 20px auto;
  text-align: justify;
}

@media (max-width: 600px) {
  .tema-cuerpo { font-size: 0.88rem; line-height: 1.55; }
}

/* Tarjeta del tema */
.tarjeta-tema {
  background: rgba(20, 20, 40, 0.85);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 0 15px #7B5FE0;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.tarjeta-tema h2 {
  font-size: 2rem;
  color: #7B5FE0;
  text-shadow: 0 0 8px #7B5FE0;
  margin: 0;
  text-align: center;
}

.tarjeta-tema img {
   width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 12px #7B5FE0;
  margin: 20px auto;
  display: block;
}


.tarjeta-tema p {
  font-size: 1.1rem;
  color: #ccc;
  line-height: 1.6;
}


.post-imagen {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 12px #7B5FE0;
  margin: 20px auto;
  display: block;
}


/* ============================================================
   CONTENEDOR GENERAL DE LA SECCIÓN COMENTARIOS
   ============================================================ */
.comentarios-section {
  max-width: 950px;        /* 🔥 Limita el ancho máximo */
  margin: 40px auto 60px;  /* 🔥 Centrado con espacio arriba y abajo */
  padding: 20px;
  border: 2px solid #7B5FE0;
  border-radius: 10px;
  box-shadow: 0 0 12px #7B5FE0;
  background-color: #0a0a0a;
}

/* 🔥 Cada comentario individual */
.comentario {
  margin-bottom: 20px;
  padding: 12px;
  border-left: 3px solid #7B5FE0;
  background-color: #111;
  border-radius: 6px;
}

/* 🔥 Texto del autor */
.comentario-autor {
  font-weight: bold;
  color: #D6C6F2;
  margin-bottom: 6px;
}

/* 🔥 Texto del comentario */
.comentario-texto {
  color: #EEE;
  margin-bottom: 6px;
}

/* 🔥 Fecha del comentario */
.comentario-fecha {
  font-size: 12px;
  color: #999;
}

/* 🔥 Botón eliminar dentro de cada comentario */
.comentario form {
  margin-top: 6px;
}


/* ============================================================
   BOTONES RESPONDER / VOLVER / ELIMINAR
   ============================================================ */
/* 🔥 Contenedor de botones del tema */
.botones-tema {
  display: flex;
  justify-content: flex-end; /* 🔥 Alinea todos a la derecha */
  align-items: center;       /* 🔥 Alinea verticalmente */
  gap: 10px;                 /* 🔥 Espacio entre botones */
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-responder {
  background-color: #7B5FE0;
  color: white;
  border: none;
  padding: 4px 12px;
  font-size: 10px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 6px #7B5FE0;
}


.btn-volver {
  padding: 4px 12px;
  font-size: 10px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 6px #7B5FE0;
  background-color: #222;
  color: #7B5FE0;
  border: 1px solid #7B5FE0;
  text-decoration: none;
}

.btn-eliminar {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 6px #7B5FE0;
  background-color: #440022;
  color: #D6C6F2;
  border: 1px solid #D6C6F2;
}


/* ============================================================
   COMENTARIOS DEL TEMA
   ============================================================ */
.comentarios-section {
  margin-top: 40px;
  padding: 25px;
  background: rgba(20, 20, 40, 0.75);
  border-radius: 12px;
  box-shadow: 0 0 15px #7B5FE0;
}

.comentarios-section h3 {
  font-size: 1.6rem;
  color: #7B5FE0;
  text-shadow: 0 0 8px #7B5FE0;
  margin-bottom: 20px;
}

.comentario {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 0 10px #9146FF;
  text-align: left;
}

.comentario-autor {
  color: #7B5FE0;
  font-weight: bold;
  margin-bottom: 5px;
}

.comentario-texto {
  color: #ddd;
  margin-bottom: 8px;
}

.comentario-fecha {
  font-size: 0.8rem;
  color: #aaa;
  text-align: right;
}

.sin-comentarios {
  color: #ccc;
  font-style: italic;
  text-align: center;
  padding: 10px;
}

/* ============================================================
   EDITOR FORO
   ============================================================ */
/* CONTENEDOR DEL EDITOR */
.editor-contenedor {
    max-width: 900px;
    margin: 80px auto;
    padding: 30px;
    background: rgba(20, 20, 40, 0.85);
    border-radius: 12px;
    box-shadow: 0 0 25px #7B5FE0;
    text-align: center;
}

/* TÍTULO */
.editor-titulo {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #7B5FE0;
    text-shadow: 0 0 12px #7B5FE0, 0 0 24px #9146FF;
    margin-bottom: 25px;
}

/* MARCO NEÓN */
.editor-marco {
    border: 2px solid #7B5FE0;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 0 15px #7B5FE0, 0 0 25px #9146FF;
    margin-bottom: 25px;
}

/* TEXTAREA */
.editor-marco textarea {
    width: 100%;
    height: 250px;
    padding: 15px;
    border-radius: 10px;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 1rem;
    resize: vertical;
    outline: none;
}

/* BOTÓN */
.editor-boton {
    background: #0f0c29;
    color: #7B5FE0;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 0 12px #7B5FE0, 0 0 24px #9146FF;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
}

.editor-boton:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #7B5FE0, 0 0 30px #9146FF;
}

/* VOLVER */
.editor-volver {
    display: inline-block;
    margin-top: 20px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
}

.editor-volver:hover {
    color: #7B5FE0;
}

/* ============================================================
   RESPONDER — AJUSTES DEL FORMULARIO
   ============================================================ */

/* Contenedor del formulario de respuesta */
.form-respuesta {
  width: 100%;
  margin: 0 auto;
  padding: 20px;
}


/* Textarea grande y centrado */
.textarea-respuesta {
  width: 100%;
  max-width: 800px;           /* 🔥 Limita el ancho para que no se desborde */
  height: 180px;              /* 🔥 Más alto para escribir con comodidad */
  margin: 0 auto 20px auto;   /* 🔥 Centrado con espacio abajo */
  display: block;
  padding: 18px;              /* 🔥 Más espacio interior */
  font-size: 16px;
  border: 2px solid #7B5FE0;
  border-radius: 10px;
  background-color: #0a0a0a;
  color: #fff;
  box-shadow: 0 0 12px #7B5FE0;
  resize: vertical;
}


/* Botones iguales y alineados */
.botones-tema .btn-responder {
  padding: 8px 16px;
  font-size: 14px;
}

.botones-tema .btn-volver {
  padding: 6px 14px;
  font-size: 12px;
}