/* ======================= */
/*  CSS BASE: INTACTO      */
/* ======================= */

/* =========================================
   PLANTILLA: ENFERMEDADES - FULL WIDTH
   Versión final con scroll independiente
   y altura sincronizada entre paneles
   ========================================= */


/* ===== CONTENEDOR PRINCIPAL ===== */
body.single-projects .contenido-wrapper .tj-post-details__container {
  background: #fff;
  color: #000;
  /*border: 1px solid #26173a;*/
  border-radius: 16px 16px 0 0;
  padding: 1rem 3rem 2rem;
  /*box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 0, 0, 0.25);*/
  font-family: "Inter", "Segoe UI", sans-serif;
  overflow: hidden;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

@media (max-width: 992px) {

body.single-projects .contenido-wrapper .tj-post-details__container {
     padding: 2rem 1rem 2rem;
}

}



/* ===== ENCABEZADO GENERAL ===== */
.enfermedad-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-bottom: 1px solid #ccc;
  /*margin-bottom: 2rem;*/
  padding-bottom: 2rem;
}

.enfermedad-header h2 {
  font-size: 1.9rem;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}

.enfermedad-header .titulo-enfermedad {
  font-size: 1.9rem;
  color: #000;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.8rem;
}

/* Busqueda enfermedad */

.header-titulo-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Ajustar título */
.header-titulo-flex .titulo-enfermedad {
  margin: 0;
  padding: 0;
  text-align: left;
}

/* Ajustar el buscador */
.header-titulo-flex .busqueda-enfermedades {
  margin: 0;
}
@media (max-width: 768px) {
  .header-titulo-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 20px;
  }

  .header-titulo-flex .busqueda-enfermedades form {
    width: 100%;
  }
  
  .enfermedad-header h2 {
    display: none;
  }
  
}



/* Botón principal de búsqueda */
.btn-busqueda-enfermedad {
  background: #ffffff;
  border: 1px solid #b3b3b3;
  color: #000000;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 130px !important;
  margin-bottom: 10px;
}

.btn-busqueda-enfermedad:hover {
  background: #f6f6f6;
  color: #000000;
}

/* Lightbox de búsqueda */
.lightbox-busqueda {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.lightbox-busqueda.activo {
  display: flex;
}

.lightbox-contenido {
  background: #ffffff;
  padding: 2rem;
  width: 90%;
  max-width: 450px;
  border-radius: 12px;
  border: 1px solid #ccc;
  position: relative;
}

.lightbox-contenido h3 {
  color: #fff;
  margin-top: 0;
  margin-bottom: 1rem;
}

.lightbox-contenido span {
  color: #000000;
  font-size: 24px;
  margin-bottom: 20px;
}
/* Input dentro del modal */
.lightbox-contenido input[type="text"] {
  width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #b3b3b3;
    background: #ffffff;
    color: #000000;
    margin-bottom: 1rem;
}

/* Botón dentro del modal */
.btn-buscar-submit {
    background: #ffffff;
    color: #000000;
    border: 1px solid #b3b3b3;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}

.btn-buscar-submit:hover {
  background: #5c3a7a;
  border: 1px solid #5c3a7a;
  color: #fff;
}

/* Botón cerrar */
.cerrar-lightbox {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
}

/* MODO OSCURO */
.lightbox-contenido input[type="text"]::placeholder {
  color: #ccc;
}

@media (max-width: 768px) {
  .lightbox-busqueda {
    justify-content: flex-start !important; /* Pega el contenido arriba */
    align-items: flex-start !important;
  }

  .lightbox-contenido {
    width: 100%;
    max-width: none;
    border-radius: 0;
    margin-top: 0;
    height: auto;
  }
}


/* END Busqueda enfermedad */


/* Desktop: el select NO se muestra */
.secciones-select-movil {
  display: none;
}

/* Móvil: ocultar lista y mostrar select */
@media (max-width: 768px) {
  #secciones-menu {
    display: none;
  }
  .secciones-select-movil {
    display: block;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #ccc;
    color: #000000;
    margin-bottom: 15px;
  }
  /* Scroll vertical para el dropdown de Nice Select */
     .secciones-select-movil.nice-select .list {
        max-height: 250px;      /* Ajusta el alto visible */
        overflow-y: auto;       /* Activa scroll vertical */
        overflow-x: hidden;     /* Evita scroll horizontal */
    }

  .secciones-select-movil li {
    color: #fff;
  }
 .secciones-select-movil.nice-select .list {
    background-color: #26173a;
  }
  .secciones-select-movil.nice-select .option:hover, .secciones-select-movil.nice-select .option.focus, .secciones-select-movil.nice-select .option.selected.focus {
    background-color: #161021;
  }
}

.directorio-titulo{
 font-size: 22px;
}

.enfermedad-fechas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap; 
}

/* disclaimer pequeño y discreto */
.disclaimer-inline {
  font-size: 14px;
  text-align: left;
  color: #000000; 
  line-height: 1.4;
  font-family: 'avenir';
  margin-top: 20px;
}

.disclaimer-inline span {
 color: red;
}

/* opcional: reducir tamaño en pantallas pequeñas */
@media (max-width: 768px) {
  .disclaimer-inline {
    max-width: 100%;
    width: 100%; 
    text-align: left;
  }
}


.enfermedad-fechas span {
  display: block;
  line-height: 1.3;
}

.enfermedad-fechas .fechas-texto {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* ===== LAYOUT PRINCIPAL ===== */
.enfermedad-layout {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  gap: 1.8rem;
  align-items: stretch;
  min-height: 70vh;
  max-height: 85vh;
  overflow: hidden;
}

@media (min-width: 992px) and (max-width: 1400px) {
 .enfermedad-layout {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  gap: 1.8rem;
  align-items: stretch;
  min-height: 70vh;
  max-height: 85vh;
  overflow: hidden;
}
body.single-projects .contenido-wrapper .tj-post-details__container {
     padding: 0rem 1rem 2rem;
}
}

@media (max-width: 992px) {
  .enfermedad-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
.sidebar-secciones,
.contenido-enfermedad,
.sidebar-recursos {
  scrollbar-width: thin;
  scrollbar-color: #392551 #ffffff;
}

.sidebar-secciones::-webkit-scrollbar,
.contenido-enfermedad::-webkit-scrollbar,
.sidebar-recursos::-webkit-scrollbar {
  width: 8px;
}

.sidebar-secciones::-webkit-scrollbar-thumb,
.contenido-enfermedad::-webkit-scrollbar-thumb,
.sidebar-recursos::-webkit-scrollbar-thumb {
  background-color: #392551;
  border-radius: 10px;
}

.sidebar-secciones::-webkit-scrollbar-thumb:hover,
.contenido-enfermedad::-webkit-scrollbar-thumb:hover,
.sidebar-recursos::-webkit-scrollbar-thumb:hover {
  background-color: #5c3a7a;
}

.sidebar-secciones::-webkit-scrollbar-track,
.contenido-enfermedad::-webkit-scrollbar-track,
.sidebar-recursos::-webkit-scrollbar-track {
  background: #120a1f;
}

/* ===== PANEL IZQUIERDO (SECCIONES) ===== */
.sidebar-secciones {
    background: #fff;
    /*border-top: 1px solid #ccc;*/
    /*border-radius: 14px;*/
    /*box-shadow: inset 0 0 12px rgba(57, 37, 81, 0.3);*/
    padding: 1rem;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin; 
    scrollbar-color: #392551 #ffffff;
}

.sidebar-secciones h2 {
  font-size: 1.3rem !important;
  text-transform: uppercase;
  color: #000;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 0.5rem;
}

.sidebar-secciones ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-secciones a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  color: #000;
  /*border-radius: 8px;*/
  font-size: 16px;
  text-decoration: none;
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  font-family: "avenir";
}



/* Estilo para íconos dentro del menú lateral */
.sidebar-secciones a i {
  width: 20px;
  min-width: 20px;
  font-size: 1rem;
  opacity: 0.85;
  color: #000000;
  transition: color 0.2s ease;
}

/* Hover y activo */
.sidebar-secciones a:hover i,
.sidebar-secciones a.activo i {
  /*background: #f6f6f6;*/
  color: #000000;
}

.sidebar-secciones a:hover {
  /*background: #f6f6f6;*/
  border-bottom: 1px solid #000000;
  color: #000;
  transform: translateX(2px);
}

.sidebar-secciones a.activo {
  /*background: #f6f6f6;*/
  border-bottom: 1px solid #000000;
  font-weight: 700;
  color: #000;
}

/* ===== CONTENIDO CENTRAL ===== */
.contenido-enfermedad {
  background: #fff;
  border-width: 0px 1px 0px 1px;
  border-style: solid;
  border-color: #ccc;
  /*border-top: 1px solid #2b1c3f;
  border-lef: 1px solid #2b1c3f;*/
  /*border-radius: 14px;*/
  padding: 1rem 2rem;
  /*box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);*/
  position: relative;
  overflow-y: auto;
  height: auto;
  max-height: 85vh; /* ✅ límite de altura */
}

#titulo-seccion {
  color: #000;
  font-size: 1.3rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 0.6rem;
}

.bloque-enfermedad {
  display: none;
  opacity: 0;
  padding: 1rem 0;
  height: auto;
}

.bloque-enfermedad.activo {
  display: block;
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

.bloque-enfermedad h2 {
  color: #ffffff;
  font-size: 1.3rem !important;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid #392551;
  padding-bottom: 0.4rem;
}

.bloque-enfermedad p {
  color: #000000;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-family: "avenir";
}

.fechas-texto h1.titulo-enfermedad,
.fechas-texto .titulo-enfermedad {
  color: #000 !important;
  display: block !important;
  font-size: 2rem !important;
  margin-bottom: 0.5rem;
}

/* ===== PANEL DERECHO (RECURSOS) ===== */
.sidebar-recursos {
  /*background: #fff;*/
  /*border-top: 1px solid #ccc;*/
  /*border-radius: 14px;*/
  /*box-shadow: inset 0 0 12px rgba(57, 37, 81, 0.3);*/
  padding: 1.3rem 1rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* ✅ scroll independiente */
}

.sidebar-recursos h2 {
  font-size: 1.3rem !important;
  text-transform: uppercase;
  color: #000;
  margin-bottom: 1rem;
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 0.5rem;
  letter-spacing: 1px;
}

.sidebar-recursos a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #000;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar-recursos a:hover {
  color: #8177c0;
  transform: translateX(2px);
}

/* Iconos recursos (sidebar derecho) */
.sidebar-recursos a i {
  padding-top: 5px;
  font-size: 14px;
  opacity: 1;
  color: #000; /* Modo oscuro */
  transition: color 0.2s ease;
}

.sidebar-recursos a:hover i {
  color: #8177c0;
}

.sidebar-recursos ul li {
  list-style: none;
}


/* Base común */
.sidebar-recursos ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-recursos ul li {
    padding: 12px 0;
    border-bottom: 1px solid #503b6b; /* morado oscuro */
}



.sidebar-recursos ul li a {
    transition: color 0.2s ease;
}

.sidebar-recursos ul li a {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
}




/* ===== ENFERMEDADES RELACIONADAS (INTEGRADA) ===== */
.enfermedades-relacionadas {
  margin: 0;
  padding: 2rem 3rem 2.5rem;
  background: #ffffff;
  /* border: 1px solid #26173a; */
  border-top: none;
  border-radius: 0 0 16px 16px;
  /*box-shadow: 0 8px 30px rgb(0 0 0 / 7%);*/
  position: relative;
  z-index: 1;
}

.enfermedades-relacionadas h2 {
  color: #000000;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #d3d3d3;
  padding-bottom: 0.6rem;
}

.relacionadas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.2rem;
}

.relacionada-item {
  background: #f6f6f6;
  border: 1px solid #d3d3d3;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition-duration: .5s;
}

.relacionada-item:hover {
  background: #f1f1f1;
  transform: translateY(-3px);
  /*box-shadow: 0 0 12px rgba(89, 60, 131, 0.4);*/
}

.relacionada-item h3 {
  color: #000000;
  font-size: 18px !important;
  margin-bottom: 0px;
  text-align: center;
  width: 100%;
}

.relacionada-item .thumb {
  margin-bottom: 0.8rem;
  overflow: hidden;
  border-radius: 8px;
}

.relacionada-item .thumb img {
  width: 100%;
}

.relacionada-item:hover .thumb img {
  transform: scale(1.05);
}

.relacionada-item .excerpt {
  color: #cfc7eb;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Ocultar en escritorio */
.sidebar-secciones li a#link-relacionadas {
  display: none !important;
}

/* Mostrar solo en pantallas móviles */
@media (max-width: 768px) {
  .sidebar-secciones li a#link-relacionadas {
    display: flex !important; /* o block */
  }
}


/* ===== EFECTOS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .enfermedad-layout { gap: 1.2rem; }
  .contenido-enfermedad { padding: 1.5rem; max-height: none; }
  .sidebar-secciones, .sidebar-recursos { overflow: visible; }
  .enfermedades-relacionadas {
    padding: 1.5rem;
    border-radius: 0 0 12px 12px;
  }
}

/* === Forzar ancho completo y centrado === */
.enfermedad-fullwidth {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  color: #fff !important;
}

.enfermedad-fullwidth .tj-post-wrapper{
  padding-inline-end: 0px;
}

.enfermedad-fullwidth .contenido-wrapper {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 3vw;
  color: #fff;
}

body.single-projects .site-content,
body.single-projects .tj-post-details__area {
  max-width: 100% !important;
  padding: 0 !important;
}

@media (max-width: 768px) {
  .enfermedad-fullwidth .contenido-wrapper {
    padding: 1.5rem 1rem;
  }
}

/* ===== GALERÍA DE ENFERMEDAD ===== */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.galeria-item {
  background: #161021;
  border: 1px solid #2b1c3f;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
}

.galeria-item:hover {
  transform: scale(1.03);
  box-shadow: 0 0 15px rgba(57, 37, 81, 0.4);
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== BOTÓN PARA SCROLL A RELACIONADAS ===== */
.btn-relacionadas {
  margin-top: 1rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid #392551;
  background: #1a122b;
  color: #fff;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
}

.btn-relacionadas:hover {
  background: #392551;
  transform: translateY(-1px);
}



/* ===== POPUP ARCHIVO ===== */
#popup-archivo {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: rgba(15, 10, 25, 0.85);
  backdrop-filter: blur(6px);
}

#popup-archivo.activo {
  display: flex;
}

#popup-archivo .popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

#popup-archivo .popup-contenido {
  position: relative;
  background: #161021;
  border: 1px solid #392551;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  width: 80%;
  max-width: 900px;
  height: 80%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
}

#popup-archivo .popup-titulo {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #392551;
  background: #1e1430;
}

#popup-archivo .popup-cerrar {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

#popup-archivo .popup-cerrar:hover {
  color: #d782ff;
}

#popup-archivo .popup-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #0b0612;
}

/**/
.zews-de-related{
    --de-text:#162033;
    --de-muted:#5f6b85;
    --de-line:#dbe4ef;
    --de-soft:#f6f8fc;
    --de-accent:#2e3a59;
    --de-white:#ffffff;
    /*margin-top:48px;*/
    /*padding-top:32px;*/
    border-top:1px solid var(--de-line);
  }

  .zews-de-related__header{
    margin-bottom:20px;
  }

  .zews-de-related__title{
    margin:0 0 8px;
    font-size:clamp(1.6rem,2.4vw,2.3rem);
    line-height:1.1;
    color:var(--de-text);
    font-weight:800;
  }

  .zews-de-related__subtitle{
    margin:0;
    color:var(--de-muted);
    font-size:1rem;
    line-height:1.6;
  }

  .zews-de-related__toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    padding:18px 0 24px;
    border-top:1px solid var(--de-line);
    border-bottom:1px solid var(--de-line);
    margin-bottom:24px;
  }

  .zews-de-related .zews-de-letter{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:42px;
    height:42px;
    padding:0 14px;
    border:1px solid var(--de-line);
    border-radius:999px;
    background:var(--de-white);
    color:var(--de-accent);
    text-decoration:none;
    font-weight:600;
    font-size:.95rem;
    transition:.2s ease;
    cursor:pointer;
    appearance:none;
    -webkit-appearance:none;
    font-family:inherit;
  }

  .zews-de-related .zews-de-letter:hover{
    transform:translateY(-1px);
    border-color:var(--de-accent);
  }

  .zews-de-related .zews-de-letter.is-active{
    background:var(--de-accent);
    color:#fff;
    border-color:var(--de-accent);
  }

  .zews-de-related .zews-de-grid{
    list-style:none;
    padding:0;
    margin:0;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:18px;
  }

  .zews-de-related .zews-de-card a{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:14px;
    padding:12px 20px;
    border-radius:18px;
    text-decoration:none;
    color:var(--de-text);
    transition:.2s ease;
    min-height:40px;
  }

  .zews-de-related .zews-de-card a:hover{
    transform:translateY(-2px);
    background:#fff;
  }

  .zews-de-related .zews-de-card__title{
    font-size:1rem;
    line-height:1.45;
    font-weight:500;
  }

  .zews-de-related .zews-de-card__arrow{
    flex:0 0 auto;
    font-size:1.2rem;
    opacity:.55;
  }

  .zews-de-related .zews-de-card[hidden]{
    display:none !important;
  }

  @media (max-width:768px){
    .zews-de-related{
      margin-top:36px;
      padding-top:24px;
    }
  }

