/* Achievements Gallery Styles */

#achievements {
  padding: 6rem 0;
  position: relative;
  z-index: 2;
}

#achievements-gallery-root {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Event Card */
.event-card {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 107, 0, 0.3);
  box-shadow: 0 10px 30px rgba(255, 107, 0, 0.05);
}

.ag-visible {
  opacity: 0;
  animation: fadeUpIn 0.8s ease forwards;
}

@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.event-cover-wrap {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
}

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

.event-card:hover .event-cover {
  transform: scale(1.05);
}

.event-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-location, .event-status {
  font-size: 0.85rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.event-status {
  color: var(--orange);
  font-weight: 500;
  margin-bottom: 0;
  margin-top: auto;
  padding-top: 1rem;
}

.event-title {
  font-size: 1.3rem;
  color: #fff;
  margin: 0.5rem 0 1rem 0;
  font-weight: 600;
  line-height: 1.3;
}

/* Thumbnail Strip */
.event-thumbs-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none; /* Firefox */
}

.event-thumbs-strip::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.strip-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.more-badge {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid rgba(255, 107, 0, 0.2);
}

/* Lightbox Gallery */
.ag-lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ag-lightbox.active {
  opacity: 1;
  visibility: visible;
}

/* Force OS Cursor inside Lightbox to prevent mix-blend-mode bugs */
.ag-lightbox, .ag-lightbox * {
  cursor: auto !important;
}
.ag-lightbox-close, .ag-nav-btn, .ag-thumb {
  cursor: pointer !important;
}

.ag-lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ag-lightbox-title {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 500;
}

.ag-lightbox-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.ag-lightbox-close:hover {
  color: var(--orange);
}

.ag-lightbox-content {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.ag-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ag-main-img.fade {
  opacity: 0;
  transform: scale(0.98);
}

.ag-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  z-index: 2;
}

.ag-nav-btn:hover {
  background: var(--orange);
  transform: translateY(-50%) scale(1.1);
}

.ag-prev { left: 2rem; }
.ag-next { right: 2rem; }

.ag-lightbox-footer {
  padding: 1rem 2rem;
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ag-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s, border-color 0.3s;
  border: 2px solid transparent;
}

.ag-thumb.active {
  opacity: 1;
  border-color: var(--orange);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  #achievements-gallery-root {
    grid-template-columns: 1fr;
  }
  
  .ag-nav-btn {
    display: none; /* Rely on swipe for mobile */
  }
  
  .ag-lightbox-content {
    padding: 1rem;
  }
  
  .ag-lightbox-header {
    padding: 1rem;
  }
}
