/* Premium curved gallery filter buttons */
.gallery-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: #a78bfa;
  border: none !important;
  outline: none !important;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
  margin-right: 12px;
  margin-left: 0;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(139, 127, 219, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  text-transform: capitalize;
  isolation: isolate;
}

.gallery-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.gallery-pill:last-child { margin-right: 0; }

.gallery-pill:hover {
  color: #ffffff;
  border: none !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 127, 219, 0.25);
}

.gallery-pill:hover::before {
  opacity: 1;
}

.gallery-pill.active, .gallery-pill.selected {
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 6px 20px rgba(107, 95, 187, 0.3) !important;
}

.gallery-pill.active::before, .gallery-pill.selected::before {
  opacity: 1 !important;
}
.gallery-pill:after {
  content: '';
  position: absolute;
  left: -60%;
  top: 0;
  width: 220%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 60%, rgba(255,255,255,0.12) 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.5s;
  filter: blur(2px);
}
.gallery-pill:hover:after, .gallery-pill.active:after, .gallery-pill.selected:after {
  opacity: 1;
  animation: pillShine 1.1s linear;
}
/* gallery.css - Gallery section styled to match courses section */

.gallery-section {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 50%, #F0F7FF 100%);
  padding: 120px 20px 80px;
  min-height: 100vh;
}
.gallery-header {
  text-align: center;
  margin-bottom: 60px;
}
.gallery-header h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: #0B3C78;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.gallery-header p {
  font-size: 1.1rem;
  color: #5B6B82;
  margin-bottom: 20px;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 24px;
  margin-top: 32px;
  margin-bottom: 32px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 16px; }
}
.gallery-card {
  background: #FFFFFF;
  border: 1px solid #E8EFF8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(10, 116, 201, 0.06);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cardFadeInUp 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 1;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.gallery-card-link {
  display: block;
  width: 100%;
  height: 100%;
}
.gallery-card-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
}
.gallery-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-card-content {
  display: none !important;
}
.gallery-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0B3C78;
  margin: 0 0 8px 0;
  line-height: 1.4;
  transition: color 0.3s ease;
}
.gallery-card-category {
  font-size: 0.95rem;
  color: #0A74C9;
  font-weight: 600;
  margin-bottom: 8px;
}
.gallery-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0A74C9, #2EC5FF);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}
.gallery-card:hover::before {
  transform: scaleX(1);
}
.gallery-card:hover {
  transform: translateY(-6px);
  border-color: #0A74C9;
  box-shadow: 0 12px 32px rgba(10, 116, 201, 0.12);
}

/* Move down unloaded gallery cards */
.gallery-card.img-not-loaded {
  margin-top: 0 !important;
  opacity: 1;
}
.gallery-card:hover .gallery-card-title {
  color: #0A74C9;
}
.gallery-card-actions {
  display: none;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  padding-bottom: 18px;
}
.gallery-btn {
  padding: 10px 14px;
  border: 1.5px solid #0A74C9;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0A74C9;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 110px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-btn.view {
  background: linear-gradient(90deg, #0A74C9 0%, #2EC5FF 100%);
  color: #fff;
  border: none;
}
.gallery-btn.view:hover {
  background: linear-gradient(90deg, #2EC5FF 0%, #0A74C9 100%);
}
.gallery-btn:hover {
  background: #0A74C9;
  color: #fff;
}
@keyframes cardFadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
