/*
Theme Name: Revista Académica
Theme URI: https://tusitio.com
Author: Equipo Editorial
Author URI: https://tusitio.com
Description: Tema académico tipo revista, limpio, sobrio y mobile-first.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: revista-academica
*/

/* ===============================
   RESET Y BASE
================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Arial", serif;
  font-size: 16px;
  line-height: 1.75;
  color: #111;
  background: #fff;
}

.entry-title,
.academic-title {
  font-family: "Montserrat", sans-serif;
}


a {
  color: #000;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

/* ===============================
   LAYOUT — MOBILE FIRST
================================ */

.container {
  width: 100%;
  padding: 0 16px;
}

.content-area {
  width: 100%;
}

.sidebar {
  width: 100%;
  margin-top: 48px;
}

/* ===============================
   LAYOUT — DESKTOP
================================ */

@media (min-width: 992px) {
  .container {
    max-width: 1000px; /* ancho editorial estable */
    margin: 0 auto;
    display: flex;
    gap: 40px;
  }

  .content-area {
    width: 70%;
    flex: none;
  }

  .sidebar {
    width: 30%;
    flex: none;
    margin-top: 0;
  }
}

/* ===============================
   TIPOGRAFÍA EDITORIAL
================================ */

h1 {
  font-size: 2rem;
  line-height: 1.25;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 992px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
}

/* ===============================
   HOME — BLOQUES
================================ */

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-thumb img {
  width: 100%;
}

.grid-title {
  font-size: 1.25rem;
  margin-bottom: 1px;
}

.grid-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===============================
   ARTÍCULO ACADÉMICO
================================ */

.academic-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

@media (min-width: 992px) {
  .academic-title {
    font-size: 2.3rem;
  }
}

.academic-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 24px;
}

.academic-featured img {
  width: 100%;
  margin-bottom: 15px;
}

.academic-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ===============================
   SANGRÍA -Si se quiero se pone 1.5em
================================ */

.academic-content p {
  margin-bottom: 22px;
  text-indent: 0;
}

/* ===============================
   CITAS
================================ */

.academic-quote {
  border-left: 4px solid #000;
  padding-left: 18px;
  margin: 30px 0;
  font-style: italic;
}

/* ===============================
   SIDEBAR
================================ */

.sidebar img,
.widget img {
  width: 100%;
  height: auto;
}

/* ===============================
   BOTONES DE COMPARTIR
================================ */

.share-buttons {
  margin-top: 40px;
}

.share-buttons a {
  display: inline-block;
  margin: 8px 8px 0 0;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.share-facebook { background: #1877f2; }
.share-whatsapp { background: #25d366; }

@media (max-width: 768px) {
  .share-buttons a {
    display: block;
    text-align: center;
  }
}

.academic-title,
.entry-title {
  text-align: center;
}

.academic-share,
.share-buttons {
  text-align: center;
}

.share-buttons a {
  display: inline-block;
  margin: 10px;
}

/* Sidebar con tipografía estable */
.sidebar,
.sidebar p,
.sidebar li {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Autor editorial por entrada */
.academic-author-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 30px;
}

.author-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: bold;
}

.post-date {
  font-size: 0.85rem;
  color: #777;
}

/* ===============================
   ARCHIVO DE CATEGORÍAS
================================ */

.archive-article {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}

/* Línea divisoria entre entradas */
.archive-article {
  padding-bottom: 30px;
  border-bottom: 1px solid #ddd;
}

/* Quitar línea del último elemento */
.archive-article:last-child {
  border-bottom: none;
}

.archive-thumb {
  flex: 0 0 220px;
}

.archive-thumb img {
  width: 100%;
  height: auto;
}

.archive-content {
  flex: 1;
}

.archive-post-title {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 10px;
}

.archive-post-title a {
  color: #000;
  text-decoration: none;
}

.archive-post-title a:hover {
  text-decoration: underline;
}

.archive-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.archive-meta {
  font-size: 0.9rem;
  color: #555;
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
  .archive-article {
    flex-direction: column;
  }

  .archive-thumb {
    width: 100%;
  }
}

/* ===============================
   PAGINACIÓN EDITORIAL
================================ */

.archive-pagination {
  margin: 60px 0;
  text-align: center;
}

.archive-pagination .page-numbers {
  display: inline-block;
  margin: 0 6px;
  padding: 8px 14px;
  font-size: 0.95rem;
  color: #000;
  border: 1px solid #ccc;
  text-decoration: none;
}

.archive-pagination .page-numbers:hover {
  background: #f5f5f5;
}

.archive-pagination .current {
  background: #000;
  color: #fff;
  border-color: #000;
  font-weight: bold;
}

.archive-pagination .prev,
.archive-pagination .next {
  font-weight: normal;
}

/* Centrar título de categoría */
.category-title {
  text-align: center;
  margin: 40px 0 30px;
  font-size: 2.4rem;
}


@media (max-width: 768px) {
  .category-title {
    font-size: 2rem;
    margin: 30px 0 20px;
  }
}

.category-image {
  margin: 25px auto 35px;
  text-align: center;
}

.category-image img {
  max-width: 900px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

.category-description::after {
  content: "";
  display: block;
  width: 240px;
  height: 6px;
  border-top: 2px solid #bbb;
  border-bottom: 2px solid #bbb;
  margin: 40px auto 55px;
 
}

/* ===============================
   CABECERA DE LA REVISTA
================================ */

.site-header {
  padding: 40px 20px 30px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: 0.5px;
}

.site-title a {
  color: #FF0000; /* rojo editorial */
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .site-title {
    font-size: 1.8rem;
  }
}

/* ===============================
   HEADER CON FONDO NEGRO
================================ */

.site-header {
  background: #91E6FF;
  padding: 20px 20px 20px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: 0.8px;
}

.site-title a {
  color: #FF0000; /* rojo editorial */
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: underline;
}

📱 Ajuste para móvil (muy importante)
@media (max-width: 768px) {
  .site-header {
    padding: 40px 16px;
  }

  .site-title {
    font-size: 1.8rem;
  }
}

/* ===============================
   CATEGORÍAS AL FINAL DE LA ENTRADA
================================ */

.academic-categories {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  margin-bottom: 20px;
  padding-bottom: 18px;
  font-size: 0.9rem;
  text-align: center;
}

.categories-label {
  font-weight: bold;
  margin-right: 6px;
}

.academic-categories a {
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.academic-categories a:hover {
  border-bottom: 1px solid #000;
}


/* ===============================
   BOTONES DE COMPARTIR (REDONDOS)
================================ */

.share-buttons {
  margin-top: 40px;
  text-align: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 8px;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.share-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.share-btn:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

/* Colores */
.share-btn.facebook { background: #1877f2; }
.share-btn.x        { background: #000; }
.share-btn.whatsapp { background: #25d366; }

/* ===============================
   SUBTÍTULO DEL HEADER
================================ */

.site-subtitle {
  margin-top: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
}

@media (max-width: 768px) {
  .site-subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
  }
}

/* ===============================
   ENTRADAS RELACIONADAS
================================ */

.related-posts {
  margin-top: 35px;
  padding-top: 10px;
  border-top: 2px solid #ddd;
}

.related-title {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 35px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.related-item a {
  text-decoration: none;
  color: #000;
}

.related-thumb img {
  width: 100%;
  height: auto;
  margin-bottom: 6px;
}

.related-post-title {
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
    margin-top: 5px;
  margin-bottom: 10;

}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-title {
    font-size: 1.2rem;
  }
}

/* ===============================
   PÁGINAS
================================ */

.page-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 30px;
}

.page-featured img {
  width: 100%;
  margin-bottom: 30px;
}

.page-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ===============================
   PÁGINA SIN SIDEBAR
================================ */

.content-area.fullwidth {
  width: 100%;
}

@media (min-width: 992px) {
  .content-area.fullwidth {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* ===============================
   SLIDER HOME
================================ */

.home-slider {
  margin-bottom: 60px;
}

.slider {
  position: relative;
  overflow: hidden;
}

.slide {
  display: none;
  position: relative;
}

.slide.active {
  display: block;
  animation: fade 1s ease;
}

.slide-image img {
  width: 100%;
  height: auto;
}

.slide-content {
  position: absolute;
  bottom: 40px;
  left: 40px;
  background: rgba(0,0,0,.6);
  color: #fff;
  padding: 20px;
  max-width: 60%;
}

.slider-dots {
  text-align: center;
  margin-top: 15px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #ccc;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
}

.dot.active {
  background: #000;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===============================
   HOME FULL WIDTH
================================ */

.home-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ===============================
   SLIDER PRINCIPAL
================================ */

.home-slider {
  width: 80%;
  margin: 0 auto;
  margin-bottom: 60px;
}

.slider {
  margin: 0 auto;
  position: relative;
}

.slide {
  display: none;
}

.slide.active {
  display: block;
}

.slide-image img {
  width: 100%;
  height: auto;
}

/* TEXTO SOBRE IMAGEN */
.slide-content {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 20px;
  max-width: 60%;
}

.slide-content h2 {
  margin: 0;
  font-size: 2rem;
}

.slide-content a {
  color: #fff;
  text-decoration: none;
}

/* DOTS */
.slider-dots {
  text-align: center;
  margin-top: 5px;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  background: #ccc;
  display: inline-block;
  border-radius: 50%;
  margin: 0 5px;
}

.slider-dots .dot.active {
  background: #000;
}

.slider-dots::after {
  content: "";
  display: block;
  width: 80%;
  height: 6px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  margin: 16px auto 0;
  opacity: 0.6;
}


/* ===============================
   GRID ÚLTIMAS PUBLICACIONES
================================ */

.home-section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  font-family:"Montserrat", sans-serif;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.home-post img {
  width: 100%;
  margin-bottom: 1px;
}

.home-post h3 {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-top: 1px;
  text-align: center;
  font-family:"Montserrat", sans-serif;
}

@media (max-width: 900px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .slide-content {
    max-width: 90%;
    font-size: 1rem;
  }
}

/* ===============================
   SLIDER — MÓVIL
================================ */

@media (max-width: 768px) {
  .home-slider {
    width: 100%;
  }
}

/* ===============================
   SLIDER — TEXTO DEBAJO DE IMAGEN
================================ */

.slide {
  display: none;
}

.slide.active {
  display: block;
}

/* Imagen */
.slide-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Contenido debajo */
.slide-content {
  position: static;        /* quita overlay */
  background: #FFF;        /* fondo limpio */
  color: #000;
  margin: 0 auto;
  padding: 10px 10px;
  text-align: center;
}

.slide-content h2 {
  font-size: 1.6rem;
  margin: 0;
  line-height: 1.3;
  font-family:"Montserrat", sans-serif;
}

.slide-content a {
  color: #000;
  text-decoration: none;
}

.slide-content a:hover {
  text-decoration: underline;
}

/* ===============================
   SLIDER movil — TEXTO DEBAJO DE IMAGEN
================================ */

@media (max-width: 768px) {
  .slide-content h2 {
    font-size: 1.3rem;
  }

  .slide-content {
    padding: 15px 5px;
  }
}

/* ===============================
   SLIDER movil — TEXTO DEBAJO DE IMAGEN
================================ */

.site-footer {
  background: #E3E3E3;
  color: #000;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  padding: 30px 15px;
  font-size: 14px;
}

/* ===============================
   CENTRADO DE IMÁGENES (EDITOR)
================================ */

.entry-content img,
.academic-content img,
.page-content img {
  max-width: 100%;
  height: auto;
}

/* Alineaciones WordPress */
.aligncenter {
  display: block;
  margin: 24px auto;
}

.alignleft {
  float: left;
  margin: 8px 24px 16px 0;
}

.alignright {
  float: right;
  margin: 8px 0 16px 24px;
}

.wp-block-image {
  margin: 30px auto;
  text-align: center;
}

.wp-block-image img {
  margin: 0 auto;
}

.sidebar img,
.widget img {
  display: block;
  margin: 0 auto;
}

.academic-content img {
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .alignleft,
  .alignright {
    float: none;
    display: block;
    margin: 20px auto;
  }
}

/* ===============================
   BLOQUE AUTOR FINAL — EDITORIAL
================================ */

.academic-author-box {
  background: #E3E3E3;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 40px;
  margin: 60px 0 30px;
}

.academic-author-box img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.academic-author-box .author-content {
  display: flex;
  flex-direction: column;
}

.academic-author-box h3 {
  margin: 0 0 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.15rem;
}

.academic-author-box p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #222;
  max-width: 720px;
}

@media (max-width: 768px) {

  .academic-author-box {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
  }

  .academic-author-box img {
    margin-bottom: 12px;
  }
}

/* ===============================
   CITAS EDITORIALES
================================ */

.academic-content blockquote {
  background: #f2f2f2;
  padding: 36px 32px 32px 56px;
  margin: 32px auto;
  border-left: 4px solid #999;
  font-style: italic;
  color: #333;
  position: relative;
}

/* Quitar márgenes raros internos */
.academic-content blockquote p {
  margin: 0;
}

/* Comillas decorativas */
.academic-content blockquote::before {
  content: "“";
  font-size: 4rem;
  position: absolute;
  top: -10px;
  left: 16px;
  color: #aaa;
  font-family: Georgia, "Times New Roman", serif;
}

.academic-content blockquote::after {
  content: "”";
  font-size: 4rem;
  position: absolute;
  bottom: -20px;
  right: 16px;
  color: #aaa;
  font-family: Georgia, "Times New Roman", serif;
}

/* ===============================
   YOUTUBE RESPONSIVE — SEGURO
================================ */

.page-content iframe[src*="youtube.com"],
.page-content iframe[src*="youtu.be"] {
  display: block;
  width: 100% !important;
  aspect-ratio: 16 / 9;
  height: auto !important;
  margin: 30px 0;
  border: 0;
}

/* ===============================
   FIX DEFINITIVO: NO ESTIRAR IMÁGENES
================================ */

img {
  height: auto !important;
}

/* ===============================
   DESCRIPCIÓN DE CATEGORÍA CENTRADA
================================ */

.category-description {
  text-align: center;
  max-width: 800px;
  margin: 20px auto 30px;
}

.category-description p {
  margin: 0;
}

/* ===============================
   CABECERA DE ENTREVISTA
================================ */

.interview-header{
  display:flex;
  justify-content:center;
  gap:60px;
  margin:40px 0;
  flex-wrap:wrap;
}

.interviewer,
.interviewee{
  display:flex;
  align-items:center;
  gap:12px;
}

/* fotos circulares */

.interview-header img{
  width:60px;
  height:60px;
  border-radius:50%;
  object-fit:cover;
}

/* texto */

.interview-meta{
  display:flex;
  flex-direction:column;
  font-family:"Montserrat", sans-serif;
  font-size:0.9rem;
}

.label{
  font-weight:bold;
  text-transform:uppercase;
}

/* palabra entrevistado en rojo */

.label.entrevistado{
  color:#c40000;
}

/* nombre entrevistado azul */

.entrevistado-nombre{
  color:#0056b3;
  font-weight:bold;
}

/* ===============================
   quizz
================================ */

.quiz-container {
  max-width: 700px;
  margin: 40px auto;
  padding: 25px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  font-family: Arial;
}

.quiz-question {
  margin-bottom: 25px;
}

.quiz-question p {
  font-weight: bold;
  margin-bottom: 10px;
}

.option {
  display: block;
  width: 100%;
  margin: 5px 0;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #ddd;
  cursor: pointer;
  background: #f9f9f9;
  transition: 0.3s;
}

.option:hover {
  background: #eef6ff;
}

.option.selected {
  border: 2px solid #0073e6;
  background: #dbe9ff;
  color: #003366;
  font-weight: bold;
  transform: scale(1.02);
  box-shadow: 0 0 10px rgba(0,115,230,0.3);
}

#submitQuiz, #restartQuiz {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 16px;
}

#submitQuiz {
  background: #0073e6;
  color: white;
}

#restartQuiz {
  background: #444;
  color: white;
}

#quizResult {
  margin-top: 20px;
  font-size: 20px;
  font-weight: bold;
}

/* RESPUESTA CORRECTA FINAL */
.correct-answer {
  background: #4CAF50 !important;
  color: white;
  border-color: #4CAF50;
}

/* RESPUESTA INCORRECTA SELECCIONADA */
.wrong-answer {
  background: #f44336 !important;
  color: white;
  border-color: #f44336;
}

/* BOTÓN EXTRA */
#showAnswers {
  background: #28a745;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  margin-left: 10px;
  cursor: pointer;
}

