/* ===== PROJECTS SECTION - Modern Glassmorphism Cards ===== */
/* MODIFIED: 2025-11-10 14:30 - TESTING CACHE ISSUE */

/* Griglia progetti */
.projects_grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  justify-items: center;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Card con glassmorphism e gradient border */
.project_box {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  /* Glassmorphism background - usa variables */
  background: var(--card-bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  /* Gradient border effect */
  border-radius: 14px;
  border: var(--card-border);

  /* Multi-layer shadows for depth */
  box-shadow: var(--card-shadow);

  /* Smooth transitions */
  transition: all 0.4s var(--ease-smooth);
  cursor: pointer;

  /* Prepare for animations */
  will-change: transform, box-shadow, border-color;
}

/* Hover overlay - Portfolio style */
.project_box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease-smooth);
  pointer-events: none;
  z-index: 1;
}

/* Icona link centrale overlay */
.project_box::after {
  content: '↗';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-size: 3.5rem;
  color: var(--accent-color);
  font-weight: 300;
  opacity: 0;
  transition: all 0.4s var(--ease-smooth);
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* Hover effects - uniformato con overlay */
.project_box:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: var(--card-shadow-hover);
}

/* Mostra overlay scuro */
.project_box:hover::before {
  opacity: 1;
}

/* Mostra icona link */
.project_box:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Focus state for accessibility */
.project_box:focus-within {
  outline: 2px solid rgba(212, 175, 55, 0.5);
  outline-offset: 4px;
}

/* Project image with glow effect */
.project_img {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.5em;
  background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 0;

  /* Enhanced shadow with gold accent */
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(212, 175, 55, 0.1),
    0 0 20px rgba(212, 175, 55, 0.08);

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project_box:hover .project_img {
  transform: scale(1.08) rotate(2deg);
  box-shadow:
    0 6px 28px rgba(0, 0, 0, 0.35),
    0 0 0 4px rgba(212, 175, 55, 0.2),
    0 0 32px rgba(212, 175, 55, 0.15);
}

.project_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.project_box h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-family: 'Montserrat', sans-serif;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 0.6em;
  margin-top: 0;
  letter-spacing: 0.02em;
  line-height: 1.3;
  position: relative;
  z-index: 0;

  /* Subtle text glow */
  text-shadow: 0 2px 12px rgba(212, 175, 55, 0.15);

  transition: text-shadow 0.3s ease;
}

.project_box:hover h3 {
  text-shadow: 0 2px 16px rgba(212, 175, 55, 0.3);
}

.project_desc {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: rgba(244, 238, 212, 0.9);
  margin-bottom: 1.5em;
  min-height: 3em;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 0;
}

/* Nascondi pulsanti visivamente ma mantienili nel DOM per il JS */
.project_links {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== CARD CORO RARO - Stile Collaborazione ===== */
/* Card differente per Coro Raro (meno "mio progetto", più "collaborazione") */

/* Nascondi cerchietto logo */
#project_cororaro .project_img {
  display: none;
}

/* Nascondi titolo e descrizione - il logo parla da solo */
#project_cororaro h3,
#project_cororaro .project_desc {
  display: none;
}

/* Background più scuro per contrastare con logo trasparente */
#project_cororaro {
  background: linear-gradient(
    135deg,
    rgba(15, 15, 15, 0.98) 0%,
    rgba(20, 20, 20, 0.95) 100%
  );
  padding: 3rem 2rem 2.5rem;
  overflow: hidden;
  min-height: 280px; /* Mantieni altezza per il logo */
}

/* Logo centrale - ben visibile */
#project_cororaro::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 200px;
  height: 80%;
  background-image: url('/img/projects/cororaro_logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.9;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Al hover diventa completamente opaco */
#project_cororaro:hover::before {
  opacity: 1;
}

/* Badge Coming Soon */
.project_badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project_badge--coming-soon {
  background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
  color: #1a1a1a;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.7);
  }
}

/* Coming Soon card - disabilita hover effects */
.project_box--coming-soon {
  cursor: default;
  opacity: 0.85;
}

.project_box--coming-soon:hover {
  transform: none;
  box-shadow: var(--card-shadow);
}

.project_box--coming-soon:hover::before,
.project_box--coming-soon:hover::after {
  opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .projects_grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project_box {
    max-width: 100%;
    padding: 2rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project_box,
  .project_box::before,
  .project_box::after,
  .project_img,
  .project_box h3 {
    transition: none !important;
    animation: none !important;
  }
}
