/* ==========================================================================
   Revela Base - Galería Google Drive
   Estilos de la galería, modal, paginación y header
   ========================================================================== */

/* Estilos de la galería */
.gallery-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
  background-color: #fff;
}
.gallery-item:hover {
  transform: translateY(-5px);
}
.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.download-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(255,255,255,0.9);
  border: none;
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.download-btn::before {
  content: "e092";
  font-family: ETmodules !important;
  font-weight: 400 !important;
  font-size: 16px;
  color: #333;
}
.download-btn:hover {
  background-color: #fff;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.total-images {
  font-size: 14px;
  color: #666;
}

.order-selector {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 14px;
  cursor: pointer;
}

.order-selector:focus {
  outline: none;
  border-color: #007bff;
}

.order-selector option {
  padding: 8px;
}

/* Modal */
.modal-gallery {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  z-index: 999999;
  text-align: center;
}
.modal-gallery .modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
}
.modal-gallery .modal-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}
.modal-gallery .close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  background: transparent;
  border: none;
}
.modal-gallery .close-btn::before {
  content: "4d";
  font-family: ETmodules !important;
  font-size: 32px;
  color: #fff;
}
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255,255,255,0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-btn:hover {
  background-color: rgba(255,255,255,0.8);
}
.prev-btn {
  left: 20px;
}
.next-btn {
  right: 20px;
}
.prev-btn::before {
  content: "34";
  font-family: ETmodules !important;
  font-size: 24px;
  color: #333;
}
.next-btn::before {
  content: "35";
  font-family: ETmodules !important;
  font-size: 24px;
  color: #333;
}

/* Paginación */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 50px 0;
  gap: 20px;
}

.pagination-btn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.pagination-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.page-info {
  font-size: 14px;
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  .nav-btn {
    width: 30px;
    height: 30px;
  }
}
