/* ======================================
   RESET Y ESTILOS GLOBALES
====================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.5;
  color: #000;
  background: #fff;
}
a {
  text-decoration: none;
  color: inherit;
}

/* ======================================
   CONTENEDORES PARA PÁGINAS INDIVIDUALES
====================================== */
.page-content {
  max-width: 700px;
  margin: 40px auto;
  padding: 40px 20px;
  background-color: #fff;
  color: #000;
  text-align: left;
}

/* ======================================
   CONTENEDORES PARA BLOG, ARCHIVOS Y HOME
====================================== */
.blog-page,
.archive-page,
.home-page {
  max-width: 700px;
  margin: 40px auto;
  padding: 40px 20px;
  background-color: #fff;
  color: #000;
  text-align: left;
}

/* ======================================
   CONTENEDOR PRINCIPAL PARA EL LISTADO DE ARTÍCULOS
   (Se aplica en archive.php, page-blog.php, etc.)
====================================== */
.posts-container {
  max-width: 1200px !important;
  margin: 40px auto !important;
  padding: 20px !important;
}

/* ======================================
   ORGANIZACIÓN DE LOS ARTÍCULOS EN UNA CUADRÍCULA
====================================== */
.posts-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 20px !important;
}

/* ======================================
   ESTILOS PARA CADA TARJETA (ARTÍCULO)
====================================== */
.posts-list .card {
  background: #fff !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  padding: 20px !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
  transition: transform 0.2s !important;
  margin: 10px !important;
}
.posts-list .card:hover {
  transform: translateY(-3px) !important;
}

/* ======================================
   MINIATURAS DENTRO DE LAS TARJETAS
====================================== */
.posts-list .card .featured-image-wrapper img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

/* ======================================
   ESTILOS DE IMÁGENES Y TÍTULOS
====================================== */
.featured-image-wrapper {
  margin-bottom: 40px;
  text-align: center;
}
.featured-image {
  max-width: 100%;
  height: auto;
}

/* Titulares en la vista de blog: fuente reducida y evita desbordes */
.blog-page .entry-title {
  font-family: 'Courier New', Courier, monospace;
  font-size: 24px !important;
  margin: 10px 0 20px 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Titulares en páginas individuales */
.entry-title {
  font-family: 'Courier New', Courier, monospace;
  font-size: 36px;
  margin: 20px 0 40px 0;
}

/* Regla adicional para titulares en tarjetas (incluye categorías) */
.posts-list .card .entry-title {
  font-size: 24px !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  white-space: normal !important;
}

/* ======================================
   CONTENIDO Y PÁRRAFOS
   Evita que el texto se salga de la caja
====================================== */
.entry-content p,
.entry-summary {
  margin-bottom: 1em;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ======================================
   AJUSTES PARA LISTAS CON BULLETS
====================================== */
.entry-content ul {
  list-style-position: inside;
  padding-left: 20px;
  margin-bottom: 1em;
}
.entry-content ul li {
  margin-bottom: 0.5em;
}

/* ======================================
   ESTILOS DEL HEADER Y NAVEGACIÓN
====================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #ccc;
  padding: 20px 0;
  position: relative;
  z-index: 1000;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-link img {
  max-height: 60px;
}
.desktop-logo {
  display: block;
}
.mobile-logo {
  display: none;
}

/* Menú de navegación */
.main-navigation {
  position: relative;
}
.main-navigation .nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
}
.main-navigation .nav-menu li a {
  font-family: 'Courier New', Courier, monospace;
  position: relative;
  display: inline-block;
  color: #000;
  padding: 10px 15px 5px;
  transition: background 0.2s;
  line-height: 1.2;
  z-index: 1;
}
.main-navigation .nav-menu li a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.3em;
  background-color: #ffff00;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease-in-out;
  z-index: -1;
}
.main-navigation .nav-menu li a:hover::after {
  transform: scaleX(1);
}

/* ======================================
   NAVEGACIÓN EN SINGLE (Previo y Siguiente)
====================================== */
.post-navigation a {
  font-weight: bold !important;
  text-decoration: none !important;
  position: relative;
}
.post-navigation a:hover::after {
  transform: scaleX(1) !important;
}

/* ======================================
   BOTONES (Gutenberg)
====================================== */
.wp-block-button.aligncenter {
  text-align: center;
}
.wp-block-button.aligncenter .wp-block-button__link {
  margin-left: auto;
  margin-right: auto;
}

/* ======================================
   MENÚ MÓVIL
====================================== */
.menu-toggle,
.menu-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #000;
  display: none;
}
.menu-overlay {
  display: none;
}

/* Dispositivos hasta 767px */
@media (max-width: 767px) {
  .desktop-logo {
    display: none;
  }
  .mobile-logo {
    display: block;
  }
  .main-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #fff;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
    border-left: 1px solid #ccc;
  }
  .main-navigation.active {
    transform: translateX(0);
  }
  .main-navigation .nav-menu {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .menu-toggle {
    display: block;
  }
  .menu-close {
    display: block;
    margin-bottom: 20px;
  }
  .menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* ======================================
   HERO SECTION (Front-Page)
====================================== */
.hero {
  position: relative;
  padding: 150px 20px;
  text-align: center;
}
.hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.hero .hero-content h1 {
  color: #000;
  font-family: 'Courier New', Courier, monospace;
  font-size: 3em;
  margin-bottom: 20px;
}
.cta-button,
.btn {
  display: inline-block;
  background: #fff;
  color: #000;
  padding: 15px 30px;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid #000;
  transition: background 0.2s, color 0.2s;
}
.cta-button:hover,
.btn:hover {
  background: #ffff00;
  color: #000;
}

/* ======================================
   CARDS SECTION (Front-Page)
====================================== */
.cards-section {
  padding: 60px 20px;
  background: #fff;
}
.cards-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.feature-card.card {
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 20px;
  max-width: 350px;
  text-align: center;
  transition: transform 0.2s;
  margin: 10px;
}
.feature-card.card:hover {
  transform: translateY(-3px);
}
.feature-icon {
  max-width: 80px;
  margin-bottom: 15px;
}
.feature-card.card h2 {
  font-size: 24px;
  margin-bottom: 15px;
  font-family: 'Courier New', Courier, monospace;
}
.feature-card.card p {
  margin-bottom: 15px;
  color: #333;
}
.feature-card.card .btn {
  display: inline-block;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s, color 0.2s;
}
.feature-card.card .btn:hover {
  background: #ffff00;
  color: #000;
}

/* ======================================
   SEPARADORES DE NAVEGACIÓN EN SINGLE
====================================== */
.post-navigation-separator {
  border: 0;
  border-top: 1px dashed #ccc;
  margin: 20px 0;
}

/* ======================================
   EFECTO PERMANENTE DE RESALTADO EN ENLACES DE TEXTO
   (Aplica a enlaces dentro de párrafos de .page-content, .blog-page, .archive-page y .home-page,
    excluyendo botones con clases .btn y .cta-button)
====================================== */
html body .page-content p a:not(.btn):not(.cta-button),
html body .blog-page p a:not(.btn):not(.cta-button),
html body .archive-page p a:not(.btn):not(.cta-button),
html body .home-page p a:not(.btn):not(.cta-button) {
  background-color: #ffff00 !important;
  color: #000 !important;
  padding: 0 2px !important;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
