html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background-color: #f8f8f8;
  color: #333;
  text-align: center;
}

main.contenedor {
  flex: 1;
  padding: 20px;
}

.header {
  background: linear-gradient(
    90deg,
    #fead49,
    #d35400
  ); /* Degradado de naranja a un tono más oscuro */
  color: white;
  padding: 15px;
  text-align: center;
}

.tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.logo-container img {
  height: 50px;
}

.tab-button {
  text-decoration: none;
  color: white;
  font-weight: bold;
  padding: 10px 15px;
  transition: background 0.3s;
}
.tab-button.active {
  background-color: #ffd700;
  border-radius: 5px;
  color: #000;
}

.tab-button:hover {
  background-color: #ffd700; /* Amarillo */
  color: #000;
  border-radius: 5px;
}

.tabs a {
  text-decoration: none;
  color: white;
}

.novedad img {
  transition: transform 0.3s ease-in-out;
}

.novedad img.expandida {
  transform: scale(1.5);
}
.novedades-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 40px; /* Espacio entre las novedades */
  flex-wrap: wrap; /* Ajusta en pantallas pequeñas */
  max-width: 90%;
  margin: 0 auto; /* Centrar contenedor */
  align-items: flex-start;
}
.novedad {
  position: relative;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  text-align: center;
  overflow: hidden;
}

.novedad .fecha {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  color: gray;
  background: rgba(255, 255, 255, 0.8);
  padding: 3px 6px;
  border-radius: 5px;
}

.novedad.expandida {
  transform: scale(1.2);
  max-width: 90%; /* Se agranda */
}

.novedad img {
  width: 100%;
  transition: all 0.3s ease-in-out;
}

.novedad img.expandida {
  transform: scale(1.5);
}
/* Modal general */ /* Modal general */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%; /* El modal ocupa todo el ancho de la pantalla */
  height: 100%; /* El modal ocupa todo el alto de la pantalla */
  background-color: rgba(0, 0, 0, 0.8); /* Fondo oscuro semitransparente */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Contenido del modal */
.modal-contenido {
  position: relative;
  background-color: #fff;
  padding: 30px;
  border-radius: 15px;
  width: 60vw !important; /* Forzamos el ancho */
  max-width: none !important; /* Quitamos límite si lo hay */
  height: 69vh;
  overflow: auto;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Ajuste para imágenes dentro del modal */
.modal-contenido img {
  width: auto;
  height: auto;
  max-width: 90%; /* Limita el ancho máximo al 90% del contenedor */
  max-height: 80vh; /* Limita la altura máxima al 80% de la ventana */
  object-fit: contain; /* Asegura que la imagen mantenga sus proporciones */
  display: block;
  margin: 0 auto; /* Centra la imagen dentro del modal */
}

/* Ajuste para imágenes pequeñas */
.modal-contenido img.pequena {
  width: 700px; /* Amplía las imágenes pequeñas a un ancho de 700px */
  height: auto; /* Mantiene la proporción */
}

.ventana-confirmacion {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6); /* Fondo oscuro */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.ventana-contenido {
  background-color: white;
  width: 300px;
  max-width: 90%;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* Botón de cerrar */
.cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

.novedad button {
  background-color: #d9534f; /* Rojo */
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.novedad button:hover {
  background-color: #c9302c; /* Rojo más oscuro */
}

#modalFecha {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 14px;
  color: gray;
  background: rgba(255, 255, 255, 0.8);
  padding: 3px 6px;
  border-radius: 5px;
}

.modal-contenido p {
  font-size: 1.5rem;
  text-align: center;
  margin-top: 10px;
  max-width: 90%; /* Para que no se haga demasiado ancho */
}

#modalTexto {
  font-size: 20px; /* Texto más grande */
  margin-top: 15px;
}

#modalFecha {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  color: gray;
}

.cerrar {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 40px; /* Más grande */
  cursor: pointer;
  color: black;
}

#nuevaEntrada,
#guardarEntrada {
  display: block;
  margin: 10px auto;
  padding: 10px;
  background-color: #28a745;
  font-weight: bold;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

#borrarTodo {
  background-color: #c9302c;
  color: white;
  border: none;
  padding: 9px 14px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-weight: bold;
  display: inline-block;
  width: auto;
}

#borrarTodo:hover {
  background-color: #c9302c;
}

#nuevaEntrada:hover,
#guardarEntrada:hover {
  background-color: #218838;
}

.novedad {
  width: 80%;
  max-width: 600px;
  margin: 20px auto;
  padding: 15px;
  border: 2px solid #ccc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.novedad img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  border-radius: 5px;
}

/* Ajuste para videos en novedades */
.novedad video {
  width: 100%; /* Ocupa todo el ancho disponible */
  height: 300px; /* Altura fija para mantener consistencia */
  object-fit: cover; /* Mantiene las proporciones y llena el espacio */
  border-radius: 5px; /* Bordes redondeados */
  transition: transform 0.3s ease-in-out; /* Efecto suave al cambiar */
}

.novedad p {
  margin-top: 10px;
  font-size: 16px;
}

/* Modal general */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh; /* Mantén el modal ocupando toda la pantalla */
  background: rgba(0, 0, 0, 0.8); /* Fondo oscuro semitransparente */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden; /* Evita que el contenido desborde */
}

.modal-contenido {
  position: relative;
  background-color: #fff;
  padding: 20px;
  border-radius: 15px;
  width: 60vw; /* Ajusta el ancho del modal */
  max-width: 90%; /* Limita el ancho máximo */
  height: 80vh; /* Aumenta la altura del contenido interno */
  max-height: 90%; /* Limita la altura máxima */
  overflow: auto; /* Permite desplazamiento si el contenido excede el tamaño */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.modal.active {
  display: flex;
}

#formularioNovedad {
  display: none;
  background: #f9f9f9;
  padding: 15px;
  border: 1px solid #ddd;
  width: 300px;
  margin: 10px auto;
  text-align: center;
}

.novedad {
  border: 1px solid #ddd;
  padding: 10px;
  margin: 10px;
  text-align: center;
}

.novedad img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
}

.modal p {
  font-size: 18px;
  margin-bottom: 15px;
}

.btn-verde {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 10px 15px;
  margin: 5px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn-verde:hover {
  background-color: #388e3c;
}

.btn-rojo {
  background-color: #d32f2f;
  color: white;
  border: none;
  padding: 10px 15px;
  margin: 5px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn-rojo:hover {
  background-color: #b71c1c;
}

#formularioNovedad {
  display: none;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  margin: 20px auto;
  text-align: center;
}

#formularioNovedad input[type="file"] {
  width: calc(100% - 16px);
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  background: #f8f8f8;
  display: block;
  margin: 0 auto;
}

#formularioNovedad textarea {
  width: calc(100% - 16px);
  height: 120px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  resize: none;
  display: block;
  margin: 10px auto;
}

#formularioNovedad button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

#formularioNovedad button[type="submit"] {
  background-color: #007bff;
  color: white;
}

#formularioNovedad button.cancelar {
  background-color: #dc3545;
  color: white;
}

.cancel-button {
  background: #dc3545;
  color: white;
}

.cancel-button:hover {
  background: #c82333;
}

.modal-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.flecha {
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  z-index: 1;
}

.flecha.izquierda {
  left: 10px;
}

.flecha.derecha {
  right: 10px;
}

.novedad {
  position: relative;
  margin: 20px auto;
  max-width: 600px;
  padding: 10px;
  border: 1px solid #ccc;
  background-color: white;
}

.novedad img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}

.novedad img,
.novedad video {
  width: 100%; /* Ocupa todo el ancho disponible */
  height: 300px; /* Altura fija para mantener consistencia */
  object-fit: cover; /* Mantiene las proporciones y llena el espacio */
  border-radius: 5px;
  transition: transform 0.3s ease-in-out; /* Efecto suave al cambiar */
}

.footer {
  background-color: #122437;
  color: white;
  text-align: center;
  padding: 20px 0;
}

.footer h2 {
  margin-bottom: 15px;
}

.social-icons {
  display: flex;
  justify-content: center;
}

.social-icons a {
  margin: 0 10px;
}

.social-icons img {
  height: 30px; /* Adjust social icon size */
}

/* Apartado Responsive */
.menu-toggle {
  display: none;
}

@media screen and (max-width: 768px) {
  /* Estilos generales */
  body,
  html {
    font-size: 16px;
  }

  .menu-toggle {
    display: block;
    background-color: #ff4500; /* Fondo naranja */
    color: white; /* Texto blanco */
    border: none;
    font-size: 20px; /* Tamaño del texto */
    padding: 5px 15px; /* Espaciado interno */
    cursor: pointer;
    width: fit-content; /* Ajusta el ancho al contenido */
    text-align: center;
    border-radius: 50px; /* Bordes circulares */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra */
    transition: all 0.3s ease; /* Transición suave */
    margin: 5px auto; /* Centrado */
  }

  /* Efecto al pasar el mouse */
  .menu-toggle:hover {
    background-color: #ffd700; /* Fondo amarillo */
    color: #000; /* Texto negro */
    transform: scale(1.1); /* Aumenta ligeramente el tamaño */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Sombra más intensa */
  }

  .tabs {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #ffa500;
    margin-top: 0;
    padding: 10px 0;
    border-radius: 0 0 10px 10px;
    width: 100%;
  }

  .tabs.active {
    display: flex;
  }

  .tab-button {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
  }

  .tab-button:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  }

  /* Novedades */
  .novedades-container {
    flex-direction: column;
    gap: 20px;
  }

  .novedad {
    width: 95%;
    max-width: 100%;
    margin: 15px auto;
    padding: 10px;
  }

  .novedad img {
    max-height: 200px;
  }

  /* Modal */
  .modal-contenido {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    max-width: 100%; /* Limita el ancho máximo */
    max-height: 40%;
    overflow: auto; /* Permite desplazamiento si el contenido excede el tamaño */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  }

  .modal-contenido img {
    max-width: 80%; /* La imagen ocupa todo el ancho disponible */
    max-height: 100vh; /* Limita la altura para que no desborde */
    object-fit: contain; /* Mantiene las proporciones */
    border-radius: 10px;
  }

  .modal-contenido video {
    max-width: 100%; /* El video ocupa todo el ancho disponible */
    max-height: 70vh; /* Limita la altura para que no desborde */
    border-radius: 10px;
    background: #000; /* Fondo negro para videos */
  }

  #modalTexto {
    font-size: 16px;
  }

  #modalFecha {
    font-size: 14px;
  }

  .cerrar {
    font-size: 30px;
    top: 5px;
    right: 10px;
  }

  /* Formulario */
  #formularioNovedad {
    width: 90%;
    padding: 15px;
  }

  #formularioNovedad textarea {
    height: 100px;
  }

  /* Footer */
  .footer {
    padding: 20px 10px;
    font-size: 14px;
  }

  .footer h2 {
    font-size: 18px;
  }

  .social-icons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .social-icons a {
    margin: 8px;
  }

  .social-icons img {
    height: 24px;
  }

  /* Flechas del slider (si aplica) */
  .flecha {
    font-size: 1.5rem;
    padding: 8px;
  }

  .ventana-contenido {
    width: 90%;
    padding: 20px;
  }
}
