/*
Theme Name: JFDonghua
Theme URI: http://jfdonghua.com/mi-tema
Author: JFDonghua
Author URI: http://jfdonghua.com
Description: Un tema personalizado por JFDonghua.
Version: 2.1
License: MI PROPIA LICENCIA
License URI: http://jfdonghua.com/licencia
*/

/* 🔵 === Navbar Search === */
.contenedor-banner-titulo {
  margin-top: 0;
  padding-top: 0;
}

.navbar,
.navbar-top {
  margin: 0 !important;
  padding: 0 !important;
  top: 0;
  position: relative;
  z-index: 1000;
}

header,
header.site-branding {
  margin: 0 !important;
  padding: 0 !important;
  display: none;
}

/* 🔧 Elimina márgenes por defecto del navegador */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

/* 🔍 Estilos para el buscador AJAX (Live Search) */
#search-form {
  position: relative;
  width: 100%;
  max-width: 300px;
}

#search-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid #ccc;
  outline: none;
}

#search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #282248;
  border: 1px solid #3b3065;
  border-top: none;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: none;
}

#search-results ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#search-results li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #3b3065;
  background-color: #282248;
  transition: background 0.2s ease-in-out;
}

#search-results li:hover {
  background-color: #3b3065;
}

/* 🔒 Imagen fija sin importar el dispositivo */
#search-results li > img.search-thumb,
#search-results li img.search-thumb.img-fluid,
#search-results li img.search-thumb.w-100 {
  width: 50px !important;
  height: 70px !important;
  max-width: 50px !important;
  max-height: 70px !important;
  min-width: 50px !important;
  min-height: 70px !important;
  object-fit: cover !important;
  border-radius: 4px;
  flex-shrink: 0;
  display: block;
}

#search-results li div {
  max-width: calc(100% - 60px);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#search-results li div a {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

/* Tipo de contenido */
.post-type-label {
  color: #fff;
  font-size: 0.85em;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 4px;
}

/* 🌙 Modo oscuro */
body.dark-mode #search-results {
  background: #282248;
  border-color: #3b3065;
}

body.dark-mode #search-results li {
  border-bottom: 1px solid #3b3065;
  background-color: #282248;
}

body.dark-mode #search-results li:hover {
  background-color: #3b3065;
}

body.dark-mode #search-results li a,
body.dark-mode #search-results .post-type-label {
  color: #fff;
}

/* 📱 Responsive - tablet */
@media (max-width: 768px) {
  #search-results {
    max-height: 200px;
    font-size: 14px;
  }

  #search-results li {
    padding: 6px 10px;
    gap: 8px;
  }

  #search-results li img.search-thumb {
    width: 40px !important;
    height: 56px !important;
    max-width: 40px !important;
    max-height: 56px !important;
    min-width: 40px !important;
    min-height: 56px !important;
  }

  #search-results li div {
    max-width: calc(100% - 50px);
  }

  #search-results li div a {
    font-size: 13px;
  }

  #search-results .post-type-label {
    font-size: 12px;
  }

  #search-form,
  #search-form-mobile {
    max-width: 100%;
  }
}

/* 📱 Responsive - móviles pequeños */
@media (max-width: 480px) {
  #search-results {
    width: 95vw;
    left: 2.5vw;
  }

  #search-results li img.search-thumb {
    width: 36px !important;
    height: 48px !important;
    max-width: 36px !important;
    max-height: 48px !important;
    min-width: 36px !important;
    min-height: 48px !important;
  }

  #search-results li div {
    max-width: calc(100% - 42px);
  }

  #search-results li div a {
    font-size: 12px;
  }
}

/* === APLICAR ESTILOS TAMBIÉN A LA BÚSQUEDA MÓVIL === */

#search-results-mobile {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #282248;
  border: 1px solid #3b3065;
  border-top: none;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: none;
}

#search-results-mobile ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#search-results-mobile li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #3b3065;
  background-color: #282248;
  transition: background 0.2s ease-in-out;
}

#search-results-mobile li:hover {
  background-color: #3b3065;
}

#search-results-mobile li > img.search-thumb {
  width: 50px !important;
  height: 70px !important;
  object-fit: cover !important;
  border-radius: 4px;
  flex-shrink: 0;
  display: block;
}

#search-results-mobile li div {
  max-width: calc(100% - 60px);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#search-results-mobile li div a {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

#search-results-mobile .post-type-label {
  color: #fff;
  font-size: 0.85em;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 4px;
}

/* Modo oscuro para móvil */
body.dark-mode #search-results-mobile {
  background: #282248;
  border-color: #3b3065;
}

body.dark-mode #search-results-mobile li {
  background-color: #282248;
}

body.dark-mode #search-results-mobile li:hover {
  background-color: #3b3065;
}

body.dark-mode #search-results-mobile li a,
body.dark-mode #search-results-mobile .post-type-label {
  color: #fff;
}

/* Responsive móvil específico */
@media (max-width: 768px) {
  #search-results-mobile {
    max-height: 200px;
    font-size: 14px;
  }

  #search-results-mobile li {
    padding: 6px 10px;
    gap: 8px;
  }

  #search-results-mobile li img.search-thumb {
    width: 40px !important;
    height: 56px !important;
  }

  #search-results-mobile li div {
    max-width: calc(100% - 50px);
  }

  #search-results-mobile li div a {
    font-size: 13px;
  }

  #search-results-mobile .post-type-label {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  #search-results-mobile {
    width: 95vw;
    left: 2.5vw;
  }

  #search-results-mobile li img.search-thumb {
    width: 36px !important;
    height: 48px !important;
  }

  #search-results-mobile li div {
    max-width: calc(100% - 42px);
  }

  #search-results-mobile li div a {
    font-size: 12px;
  }
}

/*=============================*/
/* 🔵 === Banner Principal === */
/* === Banner Principal FIXED === */
.banner-principal {
    width: 95vw;
    min-height: 500px;
    margin: 0 auto 30px;
    border-radius: 16px;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.banner-overlay-principal {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    text-align: center;
    z-index: 2;
}

.titulo-banner {
    margin: 0;
    font-size: 2.4em;
    color: #fff;
    font-weight: bold;
}

/* === Fin Banner Principal === */

/* 🔵 === Fondo de Página Personalizado === */
body {
    background-color: #111; /* fallback si no hay imagen */
    color: #fff;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 0.5s ease-in-out;
}
/* === Fin Fondo === */

/* Opcional: Estilos adicionales para legibilidad */
main, .container, .content {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 12px;
}
/*==============================*/
/* 🔵 NAVBAR */
.site-header {
  background-color: #1e1e1e;
  color: white;
  padding: 15px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-logo img {
  max-height: 50px;
}

.site-name a {
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  margin-left: 10px;
}

.main-nav .nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  padding-left: 0;
}

.main-nav .nav-menu li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.main-nav .nav-menu li a:hover {
  color: #00bfff;
}

.search-form {
  margin-top: 10px;
}

.search-form input[type="search"] {
  padding: 5px 10px;
}

/* 🔹 Subpáginas dentro del navbar */
/* 🔵 AJUSTES RESPONSIVOS PARA NAVBAR */
.navbar-nav .nav-link {
  color: white;
  font-weight: 500;
}

.navbar-nav .nav-link:hover {
  color: #00bfff;
}

/* Mostrar navbar colapsado solo en pantallas menores a 768px (celular) */
@media (max-width: 767.98px) {
  .navbar-collapse {
    background-color: #1e1e1e;
    padding: 1rem;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: start;
  }

  .navbar-nav .nav-link {
    padding: 8px 0;
    width: 100%;
  }

  .form-control {
    margin-top: 10px;
  }

  .navbar-toggler {
    border-color: white;
  }
}

/* 🔵 FIN NAVBAR */

/*===================*/

/* 🔵===== Sidebar =====*/
.anuncios-sidebar {
  padding: 10px;
  background-color: #222;
  border-radius: 10px;
  margin-bottom: 20px;
}

.anuncio-item {
  margin-bottom: 15px;
  text-align: center;
}

/* 🔵======Footer=====*/
.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
    border-top: 4px solid #ff6600; /* franja naranja superior */
}

.site-footer p {
    margin: 0;
    font-size: 14px;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* 🔵===== Adblock ===== */
/* 🔹 Estilo general del contenedor del popup */
#popup-bloqueador {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.popup-contenido {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
  padding: 0.5rem;
}

.popup-contenido img {
  max-width: clamp(250px, 90vw, 400px);
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 20px #000;
  animation: fadeIn 0.4s ease-in-out;
}

.cerrar-popup {
  position: absolute;
  top: -12px;
  right: -12px;
  background: #ff0000;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 10px #000;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 🔵 Comentarios fuera del contenido principal en single.php */
.comentarios-single {
  max-width: 1200px;
  margin: 50px auto 60px auto;
  padding: 30px;
  background-color: rgba(30, 30, 30, 0.85);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  color: #f1f1f1;
  line-height: 1.6;
  position: relative;
  z-index: 10;
}

.comentarios-single h3,
.comentarios-single .titulo-comentarios {
  font-size: 1.7em;
  margin-bottom: 25px;
  color: #ffffff;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.comentarios-single .comment {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.comentarios-single .comment:last-child {
  border-bottom: none;
}

.comentarios-single .comment-author {
  font-weight: bold;
  color: #cceeff;
}

.comentarios-single .comment-meta {
  font-size: 0.9em;
  color: #aaa;
}

.comentarios-single input[type="text"],
.comentarios-single textarea {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
}

.comentarios-single input[type="submit"] {
  background-color: #3498db;
  color: #fff;
  padding: 10px 25px;
  border: none;
  border-radius: 8px;
  margin-top: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.comentarios-single input[type="submit"]:hover {
  background-color: #2980b9;
}

.comentarios-single .no-comments {
  text-align: center;
  color: #bbb;
  font-style: italic;
  margin-top: 20px;
}

.titulo-comentarios {
  font-size: 1.7em;
  margin-bottom: 25px;
  color: #ffffff;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Comentarios alineados con el contenido principal */
#disqus_thread,
.comentarios-single {
  max-width: 1000px; /* MISMO QUE .contenido-principal */
  width: 100%;
  margin: 60px auto;
  padding: 30px;
  background-color: rgba(30,30,30,0.75);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  color: #f1f1f1;
}

/* 🔸 Comentarios fuera del contenido principal en single Fin */