/* Graphics Gallery Styles */
.graphics-gallery-section {
  padding: 80px 0;
  background: var(--gray-light);
}

/* Filter Controls */
.gallery-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--white);
  border: 2px solid #ddd;
  color: var(--text-dark);
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--secondary-color);
  color: var(--white);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
}

.search-box {
  position: relative;
  min-width: 250px;
}

.search-box input {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--secondary-color);
}

.search-box i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.gallery-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.gallery-item.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item-wrapper {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.gallery-item-wrapper:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Video Items */
.video-item {
  position: relative;
  height: 250px;
  overflow: hidden;
  cursor: pointer;
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 100%;
}

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

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
}

.video-item:hover .play-overlay {
  background: var(--secondary-color);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-hover-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* Image Items */
.image-item {
  position: relative;
  height: 250px;
  overflow: hidden;
  cursor: pointer;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-item:hover .image-overlay {
  opacity: 1;
}

.image-item:hover img {
  transform: scale(1.1);
}

/* Gallery Item Info */
.gallery-item-info {
  padding: 25px;
}

.category-badge {
  background: var(--secondary-color);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 15px;
}

.gallery-item-info h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.gallery-item-info p {
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.6;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-light);
}

.item-type {
  display: flex;
  align-items: center;
  gap: 5px;
}

.item-type i {
  color: var(--secondary-color);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  grid-column: 1 / -1;
}

.no-results i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #ddd;
}

.no-results h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.image-modal .modal-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 90%;
  max-width: 800px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
}

.image-modal img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 25px;
  color: var(--white);
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
}

.close-modal:hover {
  color: var(--accent-color);
}

.modal-info {
  color: var(--white);
  margin-top: 20px;
}

.modal-info h3 {
  margin-bottom: 10px;
  color: var(--accent-color);
}

/* Admin Styles */
.gallery-grid-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item-card-admin {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.gallery-item-card-admin.inactive {
  opacity: 0.6;
}

.gallery-item-image-admin {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.gallery-item-image-admin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.category-badge-admin {
  background: var(--secondary-color);
  color: var(--white);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 10px;
}

.gallery-item-content-admin {
  padding: 20px;
}

.gallery-item-content-admin h3 {
  color: var(--primary-color);
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.gallery-item-content-admin p {
  color: var(--text-light);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.gallery-item-actions-admin {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-buttons {
    justify-content: center;
  }

  .search-box {
    min-width: auto;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .filter-btn {
    padding: 8px 15px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .filter-btn {
    justify-content: center;
  }

  .gallery-item-info {
    padding: 20px;
  }

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

/* Animation keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
