.multimedia {
  padding: 80px 0;
  background-color: #f9f9f9;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  margin: 0 0 15px 0;
  color: var(--color-primary);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

/* .section-description {
  font-size: 1.1rem;
  color: #7f8c8d;
  max-width: 700px;
  margin: 0 auto;
} */

.multimedia-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  background: #f5f7fa;
  border: none;
  border-radius: 20px;
  color: #2c3e50;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #e4e8eb;
}

.filter-btn.active {
  background: #3498db;
  color: white;
}

.multimedia-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.media-item {
  background: white;
  /* border-radius: 8px; */
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.media-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.media-thumbnail {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.media-item:hover .thumbnail-img {
  transform: scale(1.05);
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3498db;
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
  text-decoration: none;
}

.media-item:hover .play-icon {
  opacity: 1;
}

.media-info {
  padding: 20px;
}

.media-title {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.media-description {
  margin: 0 0 15px 0;
  color: #7f8c8d;
  font-size: 0.9rem;
  line-height: 1.5;
}

.media-meta {
  display: flex;
  justify-content: space-between;
  color: #95a5a6;
  font-size: 0.8rem;
}

.download-btn {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

/* Galería */
.gallery-slider {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.gallery-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.gallery-item:hover .gallery-prev,
.gallery-item:hover .gallery-next {
  opacity: 1;
}

/* Documentos */
.document-icon {
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  color: #e74c3c;
  font-size: 3rem;
}

/* Paginación */
.multimedia-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pagination-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover {
  border-color: #3498db;
  color: #3498db;
}

.pagination-btn.active {
  background: #3498db;
  border-color: #3498db;
  color: white;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modales */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  width: 80%;
  max-width: 900px;
  background: white;
  border-radius: 8px;
  padding: 20px;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  color: #7f8c8d;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: #e74c3c;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.gallery-modal-container {
  position: relative;
  text-align: center;
}

#modal-gallery-image {
  max-width: 100%;
  max-height: 70vh;
  margin-bottom: 15px;
}

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

.modal-prev,
.modal-next {
  background: #3498db;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-prev:hover,
.modal-next:hover {
  background: #2980b9;
}

/* Responsive */
@media (max-width: 992px) {
  .multimedia-content {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .modal-content {
    width: 90%;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .multimedia-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .multimedia-content {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    padding: 10px;
  }

  .filter-btn {
    padding: 6px 15px;
    font-size: 0.8rem;
  }
}
