/* NOTICIA COMPLETA */

.new-noticia-completa .new-titulo-principal {
    font-size: 1rem;
    margin-bottom: 4px;
    text-align: center;
    padding: 4px;
    text-transform: uppercase;
    background: #bcbcbc;
}

.new-noticia-completa h3  {
  margin-bottom: 8px;
  font-size: 1rem;
  margin-left: 2%;
}
.new-noticia-completa .new-subtitulo {
    font-size: 1rem;
    color: #6b7280;
    font-weight: normal;
    text-align: center;
    margin-bottom: 7px;
}

/* CONTENIDO PRINCIPAL CON IMAGEN FLOTANTE */
.new-contenido-principal {
  margin: 1rem;
}

.new-imagen-flotante {
  position: relative;
  margin: 0 1rem;
}

.new-img-flotante {
  width: 50%;
  transition: transform 0.3s;
  height: auto;
  float: left;
  border: 1px inset #fff;
  border-radius: 4px;
}
.new-imagen-flotante:hover .new-img-flotante {
    transform: scale(1.02);
}

.new-badge-galeria {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgb(255, 255, 255);
    color: red;
    padding: 5px;
    border-radius: 50%;
    pointer-events: none;
    border: 1px inset white;
    font-weight: bold;
    font-size: 14px;
}

.new-texto-noticia {
  text-align: justify;
  width: 49%;
  float: right;
  padding: 1.5rem;
}

.new-clean {
    clear: both;
}

/* GALERÍA */
.new-galeria-completa {
    border-radius: 4px;
    width: 55%;
    float: left;
}

.new-galeria-titulo {
    margin-bottom: 1rem;
}

.new-grid-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(33%, 1fr));
}
.new-item-galeria {
    text-align: center;
}

.new-miniatura {
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.3s;
    width: 97%;
    background: #e1e1e1;
}

.new-miniatura:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.new-miniatura img {
  height: 120px;
  width: 100%;
  object-fit: cover;
}

.imgs-videos-relacionados {
  background: #e1e1e1;
  padding: 10px 1rem;
  width: 100%;
  border: 1px inset #f5deb3;
  border-radius: 5px;
}

/* VIDEO */
.new-video-container {
    text-align: center;
    width: 40%;
    float: right;
}

.new-video-titulo {
    padding: 7px;
}

.new-video-noticia {
    max-width: 100%;
    max-height: 500px;
    border-radius: 4px;
}

/* BOTÓN COMENTARIOS */
.new-comentarios-boton {
    text-align: center;
    margin: 1.5rem 0;
}

.btn-new-comentarios {
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 2rem;
}

.btn-new-comentarios:hover {
    background: #2563eb;
}

/* ACCIONES NOTICIA */
.new-acciones-noticia {
  display: flex;
  gap: 1rem;
  justify-content: space-around;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* COMPARTIR */
.new-compartir {
  padding: 9px;
  border-top: 1px inset #e8e8e8;
  background: #e1e1e1;
}
.new-compartir-titulo {
    margin-bottom: 0.5rem;
}

.new-redes-sociales {
  border-radius: 7px;
  float: right;
  margin-right: 2%;
  padding-bottom: 1rem;
}

/* BOTONES GENERALES */
.btn-new:hover {
  transform: translateY(-4px);
  background: none;
  color: #00b00b;
  font-weight: bold;
  border: none;
}
.btn-new-small {
  background: #ddd;
  text-align: center;
  font-size: 0.95rem;
}
.btn-new  {
  padding: 4px 5px;
  transition: all 0.2s;
  border: 1px solid;
  border-radius: 4px;
  margin: 6px;
}
.btn-new-large {
    padding: 9px 12px;
    font-size: 1rem;
}

.btn-new-secondary {
    background: #6b7280;
    color: white;
}

.btn-new-secondary:hover {
    background: #4b5563;
    color: white;
}

.btn-new-eliminar {
    background: #ef4444;
    color: white;
}

.btn-new-eliminar:hover {
    background: #dc2626;
}

/* ALERTAS */
.new-alerta {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.new-alerta-info {
    background: #e0f2fe;
    color: #0369a1;
    border-left: 2px solid #0ea5e9;
    border-bottom: 1px solid #0ea5e9;
}

.new-alerta-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* MODAL COMENTARIOS */
.new-modal-comentarios .new-modal-contenido {
  max-width: 1200px;
  max-height: 95vh;
  overflow-y: auto;
  margin: 0 auto;
}
.new-modal-contenido {
    position: relative;
    max-width: 90%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


.new-modal-comentarios-titulo {
    font-size: 1.3rem;
    color: #1f2937;
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.new-modal-comentarios-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
    width: 1024px;
}

.new-cerrar-modal-comentarios {
    position: absolute;
    top: 10px;
    right: 15px;
}

.new-modal-comentarios-cerrar {
    display: block;
    width: 100%;
    margin-top: 1rem;
    text-align: center;
}

/* FORMULARIO COMENTARIOS EN MODAL */
.new-modal-comentarios-body .new-formulario-comentario {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.new-modal-comentarios-body .new-campo-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-family: inherit;
    resize: vertical;
}

/* TARJETAS DE COMENTARIOS EN MODAL */
.new-modal-comentarios-body .new-tarjeta-comentario {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
}

.new-modal-comentarios-body .new-comentario-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.new-modal-comentarios-body .new-comentario-header img {
    border-radius: 50%;
    object-fit: cover;
}

.new-modal-comentarios-body .new-badge-admin {
    background: #8b5cf6;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

.new-modal-comentarios-body .new-badge-periodista {
    background: #3b82f6;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

.new-modal-comentarios-body .new-fecha {
    color: #9ca3af;
    margin-left: auto;
    font-size: 0.7rem;
}

.new-modal-comentarios-body .new-comentario-contenido {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.new-modal-comentarios-body .new-comentario-acciones {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* MODAL GALERÍA */
.new-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 4px;
  height: 100%;
  background-color: white;
  margin: 0 auto;
  width: 100%;
  left: 4px;
}

.new-modal-articulo {
  overflow-y: scroll;
  flex-direction: column;
  display: flex;
  width: 100%;
}
.new-imagen-modal-flotante {
  border-radius: 4px;
  height: 100%;
  width: auto;
}
.new-controles-modal  {
  display: inline-block;
  padding: 1rem;
  margin: 0 auto;
}
.btn-new-control  {
  background: rgb(255, 255, 255);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 1rem;
  transition: all 0.3s;
  color: blue;
}
.btn-new-control:hover {
    background: none;
    transform: scale(1.05);
    color: #00821a;
}

.new-cerrar-modal {
  position: absolute;
  top: 15px;
  left: 10px;
  color: white;
  font-size: 45px;
  cursor: pointer;
  z-index: 1002;
  transition: color 0.3s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 0, 0, 0.8);
  border-radius: 50%;
  opacity: 0.8;
}
.new-cerrar-modal:hover {
    color: #fff;
    background: rgba(255,0,0,0.5);
}

.new-contador  {
    color: #aeaeae;
    font-weight: bold;
    font-size: 0.9rem;
}
.new-flecha {
    font-size: 1.2rem;
    font-weight: bold;
}

/* MODAL CON SCROLL PARA TEXTO LARGO */

.new-texto-modal-flotante {
  text-align: justify;
  line-height: 1.5;
  color: #1f1f22;
  white-space: pre-wrap;
  word-wrap: break-word;
  width: 99%;
  padding: 1rem;
  overflow: auto;
}
/* Botón cerrar */

.new-cerrar-modal:hover {
    background: rgba(0,0,0,0.8);
}

/* TRUNCAR TEXTO A 3 LÍNEAS EN GALERÍA */

.new-texto-imagen {
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-height: calc(1.4em * 3);
  font-size: 0.8rem;
  color: #555;
}

.new-texto-imagen {
    position: relative;
}

.new-texto-imagen::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30%;
    height: 1.4em;
    background: linear-gradient(to right, transparent, white);
    pointer-events: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .new-img-flotante {
        width: 100%;
        float: none;
    }
    .new-video-noticia {
        width: 100%;
    }
    .new-texto-noticia {
        width: 96%;
        float: none;
    }
    
    .new-grid-galeria   .new-grid-galeria {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
    
    .new-galeria-completa {
        width: 100%;
        float: none;
    }
    
    .new-video-container {
        width: 100%;
        float: none;
        margin-left: 0;
    }
    
    .new-imagen-modal-flotante {
        width: 100%;
        margin-right: 0;
        margin: 1rem;

    }
    
    .new-modal-articulo {
        flex-direction: column !important;
    }
    

    .new-acciones-noticia {
        flex-direction: row;
        gap: 4px;
    }
    
    .new-comentario-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .new-fecha {
        margin-left: 0;
    }
    
    .new-redes-sociales {
        justify-content: center;
        display: flex;
    }
    
    .new-modal-comentarios .new-modal-contenido {
        width: 95%;
        margin: 0.5rem auto;
    }
    .new-cerrar-modal {
        top: 20px;
        left: 20px;
        width: 30px;
        height: 30px;
    }
  
    .new-texto-modal-flotante {
        overflow-y: auto;
        max-width: 720px;
    }    
    .new-grid-galeria {
        grid-template-columns: repeat(auto-fill, minmax(32%, 1fr));
        gap: 10px;
    }

    /* En móviles, puede ser 2 líneas para ahorrar espacio */

    .new-texto-imagen {
        max-height: calc(1.4em * 2);
    }
}


@media (max-width: 480px) {
    
    .new-grid-galeria {
        grid-template-columns: repeat(auto-fill, minmax(43%, 1fr));
        gap: 10px;
    }
    .new-miniatura img {
  height: 90px;
    }    
    
    .new-noticia-completa .new-titulo-principal {
        font-size: 1.2rem;
    }
    
    .new-texto-modal-flotante {  
        max-width: 460px;
    }
    button {
        padding: 7px 10px;
    }
}

