/* Modern Dark Theme Styles */

/* Card Design */
.card {
  background: var(--card);
  border-radius: 24px;
  padding: 0;
  border: 1px solid rgba(109,40,217,0.2);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  isolation: isolate;
  box-shadow: 
    0 4px 20px rgba(0,0,0,0.3),
    0 0 0 1px rgba(109,40,217,0.2),
    0 0 40px rgba(109,40,217,0.1) inset;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(109,40,217,0.1) 40%,
    rgba(124,58,237,0.2) 60%,
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::before {
  transform: translateX(100%);
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(109,40,217,0.4) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.4),
    0 0 0 1px rgba(109,40,217,0.3),
    0 0 60px rgba(109,40,217,0.2) inset;
}

.card:hover::after {
  opacity: 1;
}

.card img {
  display: block;
  width: 100%;
  /* responsive image sizing */
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover img {
  transform: scale(1.05);
}

.card-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(
    to top,
    rgba(10,10,15,0.95) 0%,
    rgba(10,10,15,0.8) 50%,
    transparent 100%
  );
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-meta {
  transform: translateY(0);
}

.card h4 {
  margin: 0 0 8px;
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--text);
  font-weight: 600;
}

.card span {
  color: var(--accent-grad);
  font-size: 15px;
  font-weight: 500;
}

/* Category Styling */
.category-title {
  font-size: 42px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-grad) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.category-description {
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 60px;
  max-width: 700px;
}

/* Modal Updates */
.modal {
  background: rgba(10,10,15,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-content img {
  border-radius: 24px;
  box-shadow: 
    0 30px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(109,40,217,0.2);
}

.modal-caption {
  color: var(--text);
  font-size: 18px;
  margin-top: 20px;
}

.modal-nav {
  background: rgba(109,40,217,0.2);
  color: var(--text);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-nav:hover {
  background: rgba(109,40,217,0.4);
  transform: scale(1.1);
}

.modal-close {
  background: rgba(109,40,217,0.2);
  color: var(--text);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(109,40,217,0.4);
  transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .category-title {
    font-size: 32px;
  }
  
  .category-description {
    font-size: 16px;
  }
  
  .card img {
    height: 320px;
  }
  
  .gallery .grid {
    gap: 24px;
  }
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-section {
  animation: fadeUp 0.8s ease-out forwards;
}

.card {
  opacity: 0;
  animation: fadeUp 0.8s ease-out forwards;
}

.category-section:nth-child(1) { animation-delay: 0.2s; }
.category-section:nth-child(2) { animation-delay: 0.4s; }
.category-section:nth-child(3) { animation-delay: 0.6s; }
.category-section:nth-child(4) { animation-delay: 0.8s; }

.card:nth-child(1) { animation-delay: 0.3s; }
.card:nth-child(2) { animation-delay: 0.4s; }
.card:nth-child(3) { animation-delay: 0.5s; }
.card:nth-child(4) { animation-delay: 0.6s; }
.card:nth-child(5) { animation-delay: 0.7s; }
.card:nth-child(6) { animation-delay: 0.8s; }