/* ===== PAINTINGS CATEGORIES PAGE ===== */

.paintings-page .page-content {
  max-width: 1100px;
}

.paintings-page .page-title {
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.category-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border-radius: 2px;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  filter: brightness(1.3) contrast(1.1) blur(1.5px);
}

.category-card .card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.4s ease;
}

.category-card:hover .card-overlay {
  background: rgba(0, 0, 0, 0.55);
}

.category-card .card-overlay h2 {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 1px rgba(0, 0, 0, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.45);
  padding: 16px;
  transition: transform 0.4s ease;
}

.category-card:hover .card-overlay h2 {
  color: #111111;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.95),
    0 0 10px rgba(255, 255, 255, 0.55),
    0 1px 4px rgba(0, 0, 0, 0.18);
  transform: translateY(-3px);
}

/* Animations */
.category-card:nth-child(1) { animation: fadeInUp 0.8s ease-out 0.15s both; }
.category-card:nth-child(2) { animation: fadeInUp 0.8s ease-out 0.25s both; }
.category-card:nth-child(3) { animation: fadeInUp 0.8s ease-out 0.35s both; }
.category-card:nth-child(4) { animation: fadeInUp 0.8s ease-out 0.45s both; }
.category-card:nth-child(5) { animation: fadeInUp 0.8s ease-out 0.55s both; }
.category-card:nth-child(6) { animation: fadeInUp 0.8s ease-out 0.65s both; }
.category-card:nth-child(7) { animation: fadeInUp 0.8s ease-out 0.75s both; }
.category-card:nth-child(8) { animation: fadeInUp 0.8s ease-out 0.85s both; }

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .category-card .card-overlay h2 {
    font-size: 18px;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .category-card .card-overlay h2 {
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-card .card-overlay h2 {
    font-size: 22px;
  }
}

/* Touch devices: avoid sticky hover effects while keeping desktop unchanged */
@media (hover: none) and (pointer: coarse) {
  .category-card:hover img {
    transform: none;
    filter: none;
  }

  .category-card:hover .card-overlay h2 {
    color: #ffffff;
    text-shadow:
      0 0 1px rgba(0, 0, 0, 0.9),
      0 2px 8px rgba(0, 0, 0, 0.45);
    transform: none;
  }
}
