body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f4f4;
  overflow-x: hidden;
}

.header-inicio {
  position: relative;
  width: 100%;
  background-image: url('oficina.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  padding: 80px 20px;
}

.formacion {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
  letter-spacing: 2px;
  margin-bottom: 40px;
  z-index: 10;
}

.logout-button {
  background-color: #ff4444;
  color: white;
  padding: 12px 24px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s;
}

.logout-button:hover {
  background-color: #cc0000;
}

main.grid-botones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  justify-items: center;
  padding: 60px 40px;
  background-color: none; 
  margin-top: 20px;
  
}

.boton-seccion {
  background-color: rgb(243, 225, 225, 0.9);
  padding: 30px 40px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  text-decoration: none;
  color: #2c3e50;
  font-size: 1.4rem;
  font-weight: bold;
  transition: transform 0.3s ease, background-color 0.3s ease;
  min-width: 200px;
}

.boton-seccion:hover {
  transform: scale(1.05);
  background-color: #f0f0f0;
}

footer.footer_inicio {
  background-color: white;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 30px 20px;
  gap: 80px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  footer.footer_inicio {
    flex-direction: column;
    gap: 20px;
  }
}


ul.horizontal-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 60px;
  max-width: 1000px;
}

.horizontal-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.iconos_footer_inicio {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}

.numero_footer,
.correo_footer,
.instagram_footer,
.puesto_footer {
  font-size: 0.95rem;
  color: #2c3e50;
}

@media (max-width: 768px) {
  .formacion {
    font-size: 2rem;
  }

  main.grid-botones {
    grid-template-columns: 1fr;
    margin-top: 0;
    padding: 40px 20px;
  }

  .boton-seccion {
    width: 100%;
    font-size: 1.2rem;
  }

  ul.horizontal-list {
    flex-direction: column;
    gap: 20px;
  }
}
body#body-page {
 background-image: url('prueba.png');
 margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: url('prueba.png') no-repeat center center fixed;
  background-size: cover;
  font-family: Arial, sans-serif;
}
header {
  padding: 40px 0;
  text-align: center;
}

.header_bloques h1 {
  display: inline-block;
  font-size: 3em;
  color: white;
  background-color: rgba(0,0,0,0.5);
  padding: 10px 30px;
  border-radius: 12px;
  margin: 0;
}



.grid-videos {
  display: grid;
  /* Cinco columnas iguales */
  grid-template-columns: repeat(5, minmax(200px, 1fr));
  /* Espacio horizontal y vertical mayor */
  gap: 30px 40px; /* 30px fila, 40px entre columnas */
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Aseguramos que los vídeos no se salgan del contenedor */
.video-item {
  background-color: rgba(236, 240, 241, 0.8);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.youtube-frame {
  width: 100%;
  height: 200px;
  border: none;
}

.pagination-container {
  display: flex;
  justify-content: center;
  /* más separación arriba y un poco abajo */
  margin: 350px 0  40px;
}


.pagination a {
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.pagination a:hover {
  background-color: #2980b9;
}

.pagination a.active {
  background-color: #1abc9c;
}
/* BOTÓN FLOTANTE PARA ADMIN */
.boton-flotante {
  position: absolute;
  top: 30px;
  right: 40px;
  z-index: 10;
}

.toggle-button {
  font-size: 1.8em;
  cursor: pointer;
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.toggle-button:hover {
  background-color: #219653;
}

/* FORMULARIO QUE SE DESPLIEGA */
.upload-form {
  margin-top: 10px;
  display: none;
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  position: absolute;
  top: 80px;
  right: 20px;
  z-index: 9;
}

.upload-form.visible {
  display: block;
}

.upload-form input[type="url"] {
  padding: 8px;
  width: 250px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.upload-form button {
  padding: 8px 12px;
  margin-left: 8px;
  background-color: #2ecc71;
  border: none;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}
/* === RESPONIVE PARA GRID DE VÍDEOS (productos.php, procesos.php, etc.) === */

/* Pantallas grandes (≤1400px): de 5 pasas a 4 columnas */
@media screen and (max-width: 1400px) {
  .grid-videos {
    grid-template-columns: repeat(4, minmax(200px, 1fr));
  }
}

/* Tablets grandes (≤1023px): 3 columnas */
@media screen and (max-width: 1023px) {
  .grid-videos {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 20px 30px;      /* menos espacio */
    padding: 20px 10px;  /* menos padding */
  }
  .youtube-frame {
    height: 180px;
  }
}

/* Tablets/móviles medianos (≤768px): 2 columnas */
@media screen and (max-width: 768px) {
  .grid-videos {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 15px;
    padding: 15px;
  }
  .youtube-frame {
    height: 160px;
  }
}

/* Móviles pequeños (≤480px): 1 columna */
@media screen and (max-width: 480px) {
  .grid-videos {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }
  .youtube-frame {
    height: 140px;
  }
}



@media screen and (max-width: 768px) {
  .pagination-container {
    margin: 20px 0;
  }
}
@media screen and (max-width: 480px) {
  /* Reposiciona y reduce un poco el botón “+” en móviles */
  .boton-flotante {
    top: 8px;    /* baja un poco */
    right: 10px;  /* acerca al borde */
  }
  .toggle-button {
    width: 20px;
    height: 20px;
    font-size: 1.1em; /* un pelín más pequeño */
  }
}