/* ==========================================
   PREFAB: 3D Tilt Cards
   Eger mozgast koveto 3D perspektiva
   ========================================== */

.pf-tilt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  perspective: 1000px;
}

.pf-tilt-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  cursor: pointer;
  will-change: transform;
}

.pf-tilt-card:hover {
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.pf-tilt-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

.pf-tilt-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: white;
  transform: translateZ(30px);
}

.pf-tilt-card-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pf-tilt-card-content p {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Glare effect */
.pf-tilt-card-glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,0.15),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.pf-tilt-card:hover .pf-tilt-card-glare {
  opacity: 1;
}

/* Flat variant (no image, content card) */
.pf-tilt-card--flat {
  background: white;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 32px;
}

.pf-tilt-card--flat .pf-tilt-card-content {
  position: static;
  background: none;
  color: inherit;
  transform: none;
  padding: 0;
}

.pf-tilt-card--flat h3 { color: #1e1d14; }
.pf-tilt-card--flat p { color: #565247; opacity: 1; }
