/* Scheda pubblica cantiere (nuove costruzioni): hero, dati, tipologie. */

.project-hero {
  padding: clamp(28px, 4vw, 48px);
  background: var(--hero-bg);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.project-hero-copy h1 {
  font-size: var(--text-3xl);
  text-wrap: balance;
  margin: 6px 0 0;
}

.project-hero-copy .lead {
  margin-top: 10px;
  color: var(--muted);
}

.project-hero-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.project-figure {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 0.95rem;
}

.project-figure.is-price {
  border-color: rgba(var(--brand-rgb), 0.35);
  background: var(--brand-ghost);
  color: var(--brand-strong);
  font-size: 1.05rem;
  font-weight: 800;
}

.project-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.project-hero-media {
  border-radius: var(--radius-lg, 28px);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}

.project-hero-media img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.project-section {
  margin-top: clamp(28px, 4vw, 48px);
}

.project-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.project-section-head h2 {
  font-size: 24px;
  margin: 0;
}

.project-section-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-facts-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.project-facts-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-facts-grid span {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-description h2,
.project-works h2,
.project-documents h2 {
  font-size: 22px;
  margin: 0 0 10px;
}

.project-description p,
.project-works p {
  line-height: 1.75;
  margin: 0;
}

.project-units {
  padding: 0;
  overflow: hidden;
}

.project-unit {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.project-unit:last-child {
  border-bottom: 0;
}

.project-unit:hover {
  background: var(--brand-ghost);
}

.project-unit-media {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--line);
}

.project-unit-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-unit-price {
  font-size: 1.25rem;
  font-weight: 800;
}

.project-unit-title {
  font-weight: 600;
  margin-top: 2px;
}

.project-unit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.project-unit-availability {
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-unit-cta {
  white-space: nowrap;
  font-weight: 700;
  color: var(--brand-strong);
}

.project-unit-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.project-unit-banner-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.project-gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.project-gallery img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
}

.project-gallery figcaption {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.project-documents ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.9;
}

@media (max-width: 860px) {
  .project-hero {
    grid-template-columns: 1fr;
  }

  .project-hero-media {
    order: -1;
  }

  .project-unit {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  /* La riga è già interamente cliccabile: su mobile il CTA testuale
     finirebbe a capo sotto la riga sbagliata. */
  .project-unit-cta {
    display: none;
  }
}
