/* RB Progetti — griglia e galleria (coordinato col tema: Anton/Epilogue, accento). */

/* ===== Griglia card ===== */
.rb-progetti-grid {
  display: grid;
  grid-template-columns: repeat(var(--rb-cols, 3), 1fr);
  gap: 28px;
}
@media (max-width: 900px) {
  .rb-progetti-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .rb-progetti-grid { grid-template-columns: 1fr; }
}

.rb-progetto-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.rb-progetto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .12);
}
.rb-progetto-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #f0f0f0;
  background-image: var(--rb-card-bg, none) !important;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  transition: transform .3s ease;
}
.rb-progetto-card:hover .rb-progetto-card__media { transform: scale(1.05); }
.rb-progetto-card__body { padding: 18px 20px 22px; }
.rb-progetto-card__title {
  display: block;
  font-family: "Anton", Impact, "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 1.2rem;
  line-height: 1.1;
  color: #1a1a1a;
  margin-bottom: 8px;
  transition: color .15s ease;
}
.rb-progetto-card:hover .rb-progetto-card__title { color: var(--be-accent, #FA5616); }
.rb-progetto-card__excerpt {
  display: block;
  font-size: .95rem;
  color: #555;
  line-height: 1.5;
}
.rb-progetti-empty { color: #777; }

/* ===== Slider orizzontale (layout="scroll") ===== */
.rb-progetti-scroll {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--be-accent, #FA5616) #f0f0f0;
}
.rb-progetti-scroll::-webkit-scrollbar {
  height: 4px;
}
.rb-progetti-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 2px;
}
.rb-progetti-scroll::-webkit-scrollbar-thumb {
  background: var(--be-accent, #FA5616);
  border-radius: 2px;
}

/* su desktop le card si distribuiscono in modo uniforme;
   su mobile sono ~80 vw per invitare allo swipe */
.rb-progetti-scroll .rb-progetto-card {
  flex: 0 0 calc(20% - 20px); /* 5 card visibili sul desktop */
  min-width: 220px;
  scroll-snap-align: start;
}
@media (max-width: 900px) {
  .rb-progetti-scroll .rb-progetto-card {
    flex: 0 0 calc(50% - 12px);
    min-width: 0;
  }
}
@media (max-width: 560px) {
  .rb-progetti-scroll .rb-progetto-card {
    flex: 0 0 80vw;
  }
}

/* ===== Singolo progetto ===== */
.rb-progetto-single__desc { max-width: 760px; margin-bottom: 32px; }
.rb-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 700px) {
  .rb-gallery { grid-template-columns: repeat(2, 1fr); }
}
.rb-gallery__item {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
}
.rb-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.rb-gallery__item:hover .rb-gallery__img { transform: scale(1.05); }
