/* GRID (fallback se no swiper) */
.pdv-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

/* CARD */
.pdv-project-card {
    position: relative;
    display: block;
    height: 380px;
    border-radius: 22px;
    overflow: hidden;
    isolation: isolate;

    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(8px);

    transition: 
        transform 0.4s cubic-bezier(.22,1,.36,1),
        box-shadow 0.4s ease;
}

/* glow border */
.pdv-project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, rgba(59,130,246,0.5), transparent, rgba(99,102,241,0.5));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* BACKGROUND IMAGE */
.pdv-card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transform: scale(1.02);
    transition: transform 0.7s cubic-bezier(.22,1,.36,1);
}

/* OVERLAY */
.pdv-card-overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to top,
        rgba(2,6,23,0.95) 0%,
        rgba(2,6,23,0.7) 40%,
        rgba(2,6,23,0.2) 70%,
        transparent 100%
    );
}

/* CONTENT */
.pdv-card-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    color: white;
}

/* TITLE */
.pdv-card-content h3 {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 600;
}

/* TECH ICONS */
.pdv-tech-list {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.pdv-tech-icon {
    width: 100px;
    height: 40px;

    object-fit: contain;

    padding: 6px;

    background: rgba(255,255,255,0.08);
    border-radius: 10px;

    backdrop-filter: blur(6px);

    transition: transform 0.3s ease;
}

/* hover micro interaction */
.pdv-project-card:hover .pdv-tech-icon {
    transform: scale(1.1);
}
/* HOVER CONTENT */
.pdv-card-hover {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.35s ease;
    margin-top: 10px;
}

.pdv-card-hover p {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.85;
}

.pdv-cta {
    display: inline-block;
    margin-top: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #93c5fd;
}

/* HOVER EFFECTS */
.pdv-project-card:hover {
    transform: translateY(-12px) scale(1.015);
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255,255,255,0.05);
}

.pdv-project-card:hover::before {
    opacity: 1;
}

.pdv-project-card:hover .pdv-card-bg img {
    transform: scale(1.12);
}

.pdv-project-card:hover .pdv-card-hover {
    opacity: 1;
    transform: translateY(0);
}
.pdv-project-card {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
}

.pdv-project-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: 
        opacity 0.6s ease,
        transform 0.6s cubic-bezier(.22,1,.36,1);
}

/* MICRO INTERACTION (click feel) */
.pdv-project-card:active {
    transform: scale(0.98);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .pdv-project-card {
        height: 320px;
    
    }/* mostra sempre contenuto */
  .pdv-card-hover {
    opacity: 1 !important;
    transform: none !important;
  }
.pdv-card-content h3,
  .pdv-card-hover p {
    opacity: 1 !important;
    visibility: visible !important;
    display: block;
  }

  /* RIMUOVE EVENTUALI ANIMAZIONI CHE NASCONDONO */
  .pdv-project-card:hover .pdv-card-hover {
    opacity: 1;
    transform: none;
  }
  /* niente animazione hover inutile */
  .pdv-project-card:hover .pdv-card-hover {
    opacity: 1;
    transform: none;
  }

  /* opzionale: rendi il contenuto più leggibile */
  .pdv-card-content {
    bottom: 15px;
  }
}