/* PROGETTI OVERLAY STYLE - Tipo Wix */

.hero-progetti {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(rgba(45, 45, 45, 0.8), rgba(61, 61, 61, 0.7)), url('facciata_marina.jpg') center/cover no-repeat fixed;
  color: #fff;
  text-align: left;
  width: 100%;
  padding: 60px 0;
}

.hero-progetti .container {
  width: 90%;
  max-width: 1100px;
}

.hero-progetti h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  margin: 18px 0;
  font-weight: 900;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  max-width: 16ch;
}

/* GRID PROGETTI */
.progetti-grid {
  padding: 80px 0;
  background: #f8f8f8;
}

.progetti-grid .container {
  max-width: 1200px;
}

/* FILTRI */
.filtri-wrapper {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
}

.filtro-btn {
  padding: 12px 28px;
  background: #fff;
  border: 2px solid #ddd;
  color: var(--c-dark);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  font-family: 'Syne', sans-serif;
}

.filtro-btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.filtro-btn.active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}

/* CONTAINER PROGETTI */
.progetti-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.progetto-overlay-item {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.progetto-overlay-item.hidden {
  display: none;
}

.progetto-overlay-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.18);
}

/* GALLERY CON OVERLAY */
.overlay-gallery {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

.overlay-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.overlay-slide.active {
  opacity: 1;
  pointer-events: all;
  z-index: 1;
}

.overlay-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* OVERLAY NERO 50% CON TESTO */
.overlay-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 50px;
  z-index: 2;
  color: #fff;
}

.overlay-content h2 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 900;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  font-family: 'Syne', sans-serif;
  line-height: 1.15;
  color: #fff;
}

.overlay-content p {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 480px;
}

.overlay-content p strong {
  font-weight: 800;
}

.overlay-meta {
  font-size: 0.9rem !important;
  font-weight: 700;
  opacity: 0.9;
  margin-top: 8px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* CTA SLIDE */
.overlay-cta {
  align-items: center;
  text-align: center;
  justify-content: center;
}

.overlay-cta h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin-bottom: 20px;
}

.overlay-cta p {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.btn-overlay-contact {
  background: #fff;
  color: var(--c-dark);
  padding: 14px 35px;
  border: 2px solid #fff;
  border-radius: 4px;
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  font-family: 'Syne', sans-serif;
}

.btn-overlay-contact:hover {
  background: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* DOTS NAVIGATION */
.overlay-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.overlay-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
}

.overlay-dot.active {
  background: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.overlay-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.15);
}

/* CTA SECTION */
.cta-progetti {
  background: linear-gradient(135deg, var(--c-dark) 0%, #3d3d3d 100%);
  padding: 80px 0;
  text-align: center;
  color: #fff;
}

.cta-progetti h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 20px;
  font-weight: 900;
}

.cta-progetti p {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-bottom: 35px;
}

/* RESPONSIVE */
@media (max-width: 968px) {
  .progetti-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .overlay-content {
    padding: 30px 25px;
  }

  .overlay-content h2 {
    font-size: 1.05rem;
    word-break: break-word;
  }

  .overlay-content p {
    font-size: 0.85rem;
  }

  .overlay-dots {
    bottom: 15px;
    gap: 8px;
  }

  .overlay-dot {
    width: 10px;
    height: 10px;
  }

  .btn-overlay-contact {
    padding: 12px 28px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .progetti-grid {
    padding: 50px 0;
  }

  .overlay-content {
    padding: 20px 18px;
  }

  .overlay-content h2 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    word-break: break-word;
  }

  .overlay-content p {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }
  
  .filtri-progetti-section {
    padding: 20px 0;
  }
  
  .filtri-wrapper {
    gap: 8px;
  }
  
  .filtro-btn {
    padding: 10px 18px;
    font-size: 0.75rem;
  }
}
