/* ============================
   VARIABLES Y FUENTES
============================ */
:root {
  --color-fondo: #A9E159;
  --color-destacado: #72CB10;
  --color-boton: #468704;
  --color-blanco: #FFFFFF;
  --color-negro: #000000;
  --fuente-titulo: 'Noto Sans JP', sans-serif;
  --fuente-cuerpo: 'RobotoVariable', sans-serif;
}

/* Fuentes personalizadas */
@font-face {
  font-family: "Noto Sans JP";
  src: url("../Fonts/NotoSansJP-ExtraBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "RobotoVariable";
  src: url("../Fonts/Roboto-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* ============================
   ESTILOS GLOBALES
============================ */
body {
  background-color: var(--color-fondo);
  margin: 0;
  padding: 0;
}

/* ============================
   NOTICIA DESTACADA
============================ */
.noticia-destacada {
  position: fixed;
  top: 2cm;
  left: 0.5cm;
  width: 10.1cm;
  height: 87vh;
  background-color: var(--color-destacado);
  border-radius: 20px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.noticia-destacada form {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.noticia-destacada img,
.noticia-destacada video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 15px;
}

.noticia-destacada video {
  z-index: 2; /* más alto que el botón */
  position: relative;
}

/* Ajuste para dar prioridad a los estilos de pantalla completa */
.noticia-destacada video:fullscreen,
.imagen-noticia video:fullscreen {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* Asegura que el video se muestre completamente */
  border-radius: 0 !important; /* Elimina bordes redondeados en pantalla completa */
  background-color: black !important; /* Fondo negro para evitar distracciones */
}

.noticia-destacada video:-webkit-full-screen,
.imagen-noticia video:-webkit-full-screen {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* Asegura que el video se muestre completamente */
  border-radius: 0 !important; /* Elimina bordes redondeados en pantalla completa */
  background-color: black !important; /* Fondo negro para evitar distracciones */
}

.cuerpo-noticia-destacada {
  flex-grow: 1;
  overflow-y: hidden;
  min-height: 0;
  font-family: var(--fuente-cuerpo);
  font-size: 13pt;
  line-height: 1.1;
  text-align: justify;
}

.verMas {
  margin-top: auto;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
}

.estadisticas-fecha-destacada {
  display: flex;
  font-size: 10pt;
  justify-content: space-between;
}

.accion-buttons-destacada {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  z-index: 3;
}

.verNoticiaButton {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  cursor: pointer;
}

.titulo-noticia-destacada {
  font-family: var(--fuente-titulo);
  font-size: 15pt;
  font-weight: 700;
  line-height: 1.1;
  padding: 2.5px 0;
  text-align: center;
}

/* ============================
   CONTENEDOR DE NOTICIAS
============================ */
.noticias-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 0.1cm 0 10.6cm;
  padding-top: 2cm;
}

.noticia {
  position: relative;
  height: 300px;
  background-color: var(--color-blanco);
  border-radius: 20px;
  padding: 10px;
  margin: 0 20px;
  overflow: hidden;
  display: flex;
  flex-direction: row; /* Arrange content in a row */
  align-items: stretch; /* Ensure all items align properly */
  box-sizing: border-box;
}

/* ============================
   IMAGEN Y CONTENIDO DE LA NOTICIA
============================ */
.imagen-noticia {
  width: 300px;
  float: left;
  box-sizing: border-box;
  flex-shrink: 0; /* Prevent the image from shrinking */
}

.imagen-noticia img,
.imagen-noticia video {
  width: 280px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 15px;
  display: block;
}

.imagen-noticia video {
  z-index: 2; /* más alto que el botón */
  position: relative;
}

/* Ajuste para que el video se muestre completamente en pantalla completa */
video:fullscreen {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Asegura que el video se muestre completamente */
  border-radius: 0; /* Elimina bordes redondeados en pantalla completa */
  background-color: black; /* Fondo negro para evitar distracciones */
}

video:-webkit-full-screen {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Asegura que el video se muestre completamente */
  border-radius: 0; /* Elimina bordes redondeados en pantalla completa */
  background-color: black; /* Fondo negro para evitar distracciones */
}

.titulo-noticia {
  font-family: var(--fuente-titulo);
  font-size: 15pt;
  font-weight: 700;
  line-height: 1.1;
  padding: 2.5px 0;
  min-height: 2.2em; /* Reserve space for two lines of text */
  display: flex;
  align-items: center; /* Center text vertically if only one line */
  justify-content: center;
  text-align: center;
}

.verMas {
  text-align: center;
  display: block;
  width: 100%;
  margin-top: auto; /* Push it to the bottom of the content */
  font-weight: bold;
  cursor: pointer;
  align-self: flex-end; /* Align it to the right if needed */
}

.contenido-noticia {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1; /* Allow content to fill the remaining space */
  padding-left: 10px; /* Add spacing between image and content */
  box-sizing: border-box;
}

.cuerpo-noticia {
  position: relative;
  top: 3px;
  font-family: var(--fuente-cuerpo);
  font-size: 13pt;
  line-height: 1.1;
  column-count: 2;
  column-gap: 20px;
  text-align: justify;
  height: 155px;
  overflow: hidden;
  flex-grow: 1; /* Ensure it takes available vertical space */
  overflow-y: hidden;
}

/* Línea decorativa en el cuerpo */
.cuerpo-noticia::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--color-negro);
  border-radius: 2.5px;
  left: calc(50% - 2.5px);
  pointer-events: none;
}

/* ============================
   FECHA, BOTONES Y ESTADÍSTICAS
============================ */
.fecha-botones {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.stats-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.accion-buttons {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  z-index: 3;
}

.estadisticas {
  width: 200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--fuente-cuerpo);
  font-size: 12pt;
  margin-top: -15px;
}

.accion-button {
  background-color: var(--color-boton);
  border: none;
  border-radius: 10px;
  color: var(--color-blanco);
  font-family: var(--fuente-titulo);
  font-size: 13pt;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  cursor: pointer;
}

.accion-button svg {
  fill: var(--color-blanco);
  margin-left: 5px;
}

/* ============================
   BOTÓN FLOTANTE
============================ */
.floating-button {
  position: fixed;
  bottom: 20px;
    right: 20px;
  background-color: var(--color-boton);
  border: none;
  border-radius: 20px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  box-shadow: #000000 0px 0px 10px 0px;
}

.floating-button-usuarios {
  color: white;
    position: fixed;
    bottom: 90px; /* Más alto que el botón de noticias */
    right: 20px;
  background-color: var(--color-boton);
  border: none;
  border-radius: 20px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  box-shadow: #000000 0px 0px 10px 0px;
}

.floating-button svg {
  width: 24px;
  height: 24px;
  fill: var(--color-blanco);
}


/* ============================
   UTILIDADES
============================ */
.clear {
  clear: both;
}

/* ============================
   AJUSTES PARA RESOLUCIONES MÁS PEQUEÑAS
============================ */
@media (max-width: 1366px) {
  .titulo-noticia-destacada{
    font-size: 14pt;
  }

  .titulo-noticia {
    font-size: 14pt; /* Slightly smaller font size for regular news */
  }

  .fecha-botones, 
  .stats-actions, 
  .accion-buttons {
    font-size: 11pt; /* Adjust font size for buttons and stats */
  }

  .accion-button {
    font-size: 12pt; /* Adjust button text size */
    padding: 5px 9px; /* Slightly reduce padding for buttons */
  }

  .estadisticas {
    font-size: 11pt; /* Adjust stats font size */
  }
}

@media (max-width: 965px) {
  .noticias-container {
    margin: 0;
    padding: 0 10px;
  }

  .noticia-destacada {
    position: static;
    width: auto;
    height: auto ;
    margin: 80px 10px 20px 10px;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    box-sizing: border-box;
  }

  .noticia {
    position: relative;
    width: 100%;
    margin: 0 0 0 0;
    padding: 10px;
    height: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 56px;
    justify-content: flex-start;
    box-sizing: border-box;
  }

  .imagen-noticia {
    width: 100%;
    float: none;
    margin: 0 auto 10px;
    padding: 10px;
  }

  .imagen-noticia img,
  .imagen-noticia video {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .cuerpo-noticia,
  .cuerpo-noticia-destacada {
    font-size: 1em;
    column-count: 1 !important;
    height: 80vh !important;
    max-height: 6em !important;
    overflow: hidden !important;
    min-height: 0;
    margin-bottom: 10px;
    text-align: justify;
  }
  

  .titulo-noticia {
    font-size: 1.1em;
    margin-bottom: 5px;
    text-align: center;
  }


  .cuerpo-noticia::before {
    content: none;
  }


   .stats-actions {
    flex-direction: column;
    align-items: flex-end; /* Alinea a la derecha */
    gap: 0;
    margin-bottom: 0; /* Deja espacio para los botones flotantes abajo */
    position: relative;
    z-index: 2;
  }

  .fecha-botones {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 10px;
  }

  .fecha-botones .fecha {
    min-width: unset;
    max-width: unset;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    font-size: 0.95em;
    text-align: left;
  }

  .estadisticas{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  justify-content: space-between;
  }

 .accion-buttons {
  flex-wrap: wrap;
    position: absolute;
    bottom: 10px;
    left: 4px;
    right: 4px;
    padding: 0 2px;
    width: auto;
    justify-content: flex-end;
    justify-content: space-between;
    justify-content: space-evenly;
    display: flex;
    align-items: center;
    gap: 6px;
    margin :0;
    z-index: 3;
  }

 .accion-buttons button,
  .accion-button {
    min-width: 0;
    max-width: 33%;
    flex: 1 1 0;
    font-size: 0.95em;
    padding: 10px 0;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
    font-size: 0.80em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
    .estadisticas-fecha-destacada {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
    margin-bottom: 10px;
    font-size: 1em;
  }
  .estadisticas-fecha-destacada .estadisticas {
    display: flex;
    flex-direction: row;
    justify-content: center;     /* Centra los elementos */
    align-items: center;
    gap: 10px;                   /* Espacio entre cada estadística */
    width: auto;                 /* No ocupar todo el ancho */
    margin: 0;
  }
}

/* ====== LISTA DE USUARIOS ====== */

    .lista-usuarios {
      width: 80%;
      margin: 40px auto;
      border-collapse: collapse;
      font-family: var(--fuente-cuerpo);
      background-color: var(--color-blanco);
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    }

    .lista-usuarios th {
      background-color: var(--color-destacado);
      color: var(--color-blanco);
      padding: 12px;
      font-family: var(--fuente-titulo);
      font-size: 1.1em;
      text-align: center;
    }

    .lista-usuarios td {
      padding: 10px;
      text-align: center;
      border-bottom: 1px solid #ccc;
    }

    .lista-usuarios tr:nth-child(even) {
      background-color: #f9f9f9;
    }

    .lista-usuarios tr:hover {
      background-color: var(--color-fondo);
    }

    .lista-usuarios button {
      background-color: var(--color-boton);
      border: none;
      padding: 6px 12px;
      border-radius: 8px;
      color: var(--color-blanco);
      font-weight: bold;
      cursor: pointer;
      transition: background-color 0.3s;
    }

    .lista-usuarios button:hover {
      background-color: #356602;
    }

    h2.titulo-usuarios {
      text-align: center;
      font-family: var(--fuente-titulo);
      font-size: 1.8em;
      color: var(--color-negro);
      margin-bottom: 20px;
    }

    /* Modal */
    .modal {
      display: none;
      position: fixed;
      z-index: 1000;
      left: 0; top: 0;
      width: 100%; height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      justify-content: center;
      align-items: center;
      animation: fadeIn 0.3s;
    }

    .modal-content {
      background-color: #fff;
      padding: 20px 30px;
      border-radius: 12px;
      text-align: center;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
      animation: scaleIn 0.3s;
      max-width: 400px;
    }

    .modal-content h3 {
      margin-bottom: 15px;
      font-size: 1.2em;
      font-weight: bold;
      color: var(--color-negro);
    }

    .modal-buttons {
      margin-top: 20px;
    }

    .modal-buttons button {
      margin: 0 10px;
      padding: 8px 20px;
      font-weight: bold;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      transition: background-color 0.3s;
    }

    .btn-cancel {
      background-color: #ccc;
      color: #333;
    }

    .btn-cancel:hover {
      background-color: #b5b5b5;
    }

    .btn-confirm {
      background-color: #dc3545;
      color: white;
    }

    .btn-confirm:hover {
      background-color: #b52b39;
    }

    @keyframes fadeIn {
      from {opacity: 0;}
      to {opacity: 1;}
    }

    @keyframes scaleIn {
      from {transform: scale(0.8);}
      to {transform: scale(1);}
    }
.modal-warning {
  font-size: 2.5rem;
  color: #ffcc00;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.modal-comentario {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* fondo oscuro */
    justify-content: center;
    align-items: center;
}

.modal-contenido {
    background-color: #1e1e1e;
    color: white;
    padding: 20px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    animation: aparecer 0.3s ease-out;
}

.cerrar-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.cerrar-modal:hover {
    color: red;
}

@keyframes aparecer {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.form-comentario textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    margin-top: 15px;
    border: none;
    border-radius: 8px;
    resize: none;
    background: #2c2c2c;
    color: white;
}
  