/* DC Sync — Single Immobile Template
   Exact match of Gestionale ImmobiliDetail (light theme)
   Font: "Assistant", Sans-serif
   Colors from gestionale [data-theme="light"]
*/
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@400;500;600;700;800&display=swap');


body {
  background: #F5F5F7 !important;
  margin: 0;
  padding: 0;
}
.dc-single {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
  font-family: 'Assistant', sans-serif;
  color: #1a1a1a;
  overflow-x: clip;

}
.dc-single *, .dc-single a { text-decoration: none !important; box-sizing: border-box; }

/* =========== FULL-WIDTH HERO BANNER =========== */
.dc-hero-banner {
  width: 100%;
  height: 50vh;
  margin-top: -100px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
.dc-hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
}

/* =========== HERO ROW =========== */
.dc-hero-row {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  align-items: flex-start;
}
.dc-hero-image {
  width: 50%;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 20px;
}
.dc-hero-image .dc-rendering-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.dc-hero-image img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 500px;
}

/* Hero gallery tabs */
.dc-hero-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  background: #fff;
}
.dc-hero-tabs::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
}
.dc-hero-tab {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #e0e0e0;
  transition: color 0.2s, border-color 0.2s;
  font-family: 'Assistant', sans-serif;
  white-space: nowrap;
}
.dc-hero-tab:hover {
  color: #555;
}
.dc-hero-tab.active {
  color: #d61116;
  border-bottom: 2px solid #d61116;
  font-weight: 700;
}
.dc-hero-image .dc-tab-content {
  display: none;
}
.dc-hero-image .dc-tab-content.active {
  display: block;
}
.dc-hero-image .dc-video-grid {
  padding: 16px;
}

/* Hero gallery: main image + thumbnails */
.dc-hero-gallery {
  display: flex;
  flex-direction: column;
}
.dc-hero-main {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f0f0f2;
  border-radius: 8px;
  margin: 12px 12px 0;
  width: calc(100% - 24px);
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dc-hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}
.dc-hero-thumbs {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  background: #fff;
  border-top: 0px solid #f0f0f0;
  scrollbar-width: thin;
}
.dc-hero-thumbs::-webkit-scrollbar {
  height: 4px;
}
.dc-hero-thumbs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}
.dc-hero-thumb {
  flex-shrink: 0;
  width: 88px;
  height: 66px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}
.dc-hero-thumb:hover {
  opacity: 0.85;
}
.dc-hero-thumb.active {
  opacity: 1;
  border-color: #d61116;
}
.dc-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dc-hero-placeholder {
  aspect-ratio: 16/10;
  background: #f0f0f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}
.dc-hero-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 0 0 0;
}
.dc-hero-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}
.dc-hero-title-logo {
  width: 60px !important;
  height: auto !important;
  object-fit: contain !important;
  flex-shrink: 0;
}
.dc-hero-info h1 {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0;
  color: #1a1a1a;
  font-family: 'Assistant', sans-serif;
  line-height: 1.2;
}
.dc-hero-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dc-hero-badges:empty { display: none; }
.dc-hero-badges .dc-card-badge {
  padding: 6px 12px;
  align-items: center;
  font-size: 12px;
}

/* =========== BADGES — exact gestionale colors =========== */
.dc-card-badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  font-family: 'Assistant', sans-serif;
}
.dc-badge-vendita { background: #16a34a; }
.dc-badge-sold { background: #d61116; }
.dc-badge-successi { background: #0ea5e9; }
.dc-badge-costruzione { background: #f59e0b; }
.dc-badge-affitto { background: #9333ea; }
.dc-badge-riservato { background: #d97706; }
.dc-badge-default { background: #999; }

/* Etichetta badges */
.dc-etichetta-badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  font-family: 'Assistant', sans-serif;
}
.dc-etichetta-in_costruzione { background: #f59e0b; }
.dc-etichetta-completato     { background: #16a34a; }
.dc-etichetta-in_attesa      { background: #6b7280; }
.dc-etichetta-urgente        { background: #dc2626; }
.dc-etichetta-da_confermare  { background: #0ea5e9; }
.dc-etichetta-annullato      { background: #991b1b; }

.dc-permuta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(245,158,11,0.15);
  color: #d97706;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.dc-hero-location {
  font-size: 24px;
  color: #666;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dc-hero-location::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23d61116' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  flex-shrink: 0;
}
.dc-hero-price {
  font-size: 26px;
  font-weight: 700;
  color: #d61116;
  font-family: 'Assistant', sans-serif;
  margin-bottom: 24px;
}
.dc-hero-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 20px 0;
}
.dc-hero-description {
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
}
.dc-hero-description p { margin: 0 0 12px; }

/* =========== SECTIONS =========== */
.dc-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dc-section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
  color: #1a1a1a;
}

/* =========== DETTAGLI BOX =========== */
.dc-detail-box {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 28px;
  margin-top: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dc-detail-box .dc-rendering-title {
  font-size: 22px;
  margin-bottom: 16px;
  padding-bottom: 12px;
}
.dc-detail-box .dc-rendering-title::before {
  display: none;
}
.dc-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.dc-detail-col:first-child {
  border-right: 1px solid #f0f0f0;
  padding-right: 24px;
}
.dc-detail-col:last-child {
  padding-left: 0;
}
.dc-detail-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-family: 'Assistant', sans-serif;
}
.dc-detail-line:last-child {
  border-bottom: none;
}
.dc-detail-label {
  font-size: 18px;
  color: #1a1a1a;
  font-weight: 700;
  white-space: nowrap;
  font-family: 'Assistant', sans-serif;
}
.dc-detail-value {
  font-size: 18px;
  font-weight: 400;
  color: #1a1a1a;
  margin-left: auto;
  font-family: 'Assistant', sans-serif;
}
@media (max-width: 480px) {
  .dc-detail-grid { grid-template-columns: 1fr; }
  .dc-detail-col:first-child { border-right: none; padding-right: 0; }
}

/* =========== STATO BOX =========== */
.dc-stato-box-content {
  font-family: 'Assistant', sans-serif;
}
.dc-stato-progress {
  position: relative;
  margin: 10px 0;
  padding-top: 28px;
}
.dc-stato-progress-pct {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  background: #d61116;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  font-family: 'Assistant', sans-serif;
}
.dc-stato-progress-bar {
  height: 10px;
  background: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
}
.dc-stato-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d61116, #ef4444);
  border-radius: 5px;
  transition: width 0.6s ease;
}
/* Zigzag step layout */
.dc-stato-zigzag {
  margin-top: 20px;
}
.dc-stato-row {
  display: grid;
  align-items: center;
}
.dc-stato-row-top {
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 6px;
}
.dc-stato-row-top .dc-stato-step-item:nth-child(1) { grid-column: 1; justify-self: start; }
.dc-stato-row-top .dc-stato-step-item:nth-child(2) { grid-column: 3; }
.dc-stato-row-top .dc-stato-step-item:nth-child(3) { grid-column: 5; justify-self: end; }
.dc-stato-row-bottom {
  grid-template-columns: repeat(5, 1fr);
  margin-top: 6px;
}
.dc-stato-row-bottom .dc-stato-step-item:nth-child(1) { grid-column: 2; }
.dc-stato-row-bottom .dc-stato-step-item:nth-child(2) { grid-column: 4; }
.dc-stato-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dc-stato-step-name {
  font-size: 14px;
  font-weight: 700;
  color: #666;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dc-stato-step-item.current .dc-stato-step-name {
  color: #d61116;
  font-weight: 800;
}
.dc-stato-step-item.done .dc-stato-step-name {
  color: #1a1a1a;
}

/* =========== UNITA STATS ROW =========== */
.dc-unita-stats {
  display: flex;
  gap: 16px;
  font-family: 'Assistant', sans-serif;
}
.dc-unita-stat,
.dc-date-card {
  flex: 1;
  text-align: center;
  padding: 20px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Number stat */
.dc-unita-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: -20px -16px 16px;
  padding: 10px 16px;
  background: #d61116;
  white-space: nowrap;
}
.dc-unita-stat-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: #d61116;
  line-height: 1;
}

/* Calendar date card */
.dc-date-card-header {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: -20px -16px 16px;
  padding: 10px 16px;
  background: #d61116;
  white-space: nowrap;
}
.dc-date-card-body {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}
.dc-date-card-day {
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1;
}
.dc-date-card-month {
  font-size: 16px;
  font-weight: 700;
  color: #d61116;
  text-transform: uppercase;
}
.dc-date-card-year {
  font-size: 16px;
  font-weight: 600;
  color: #888;
}
@media (max-width: 480px) {
  .dc-unita-stats { flex-direction: column; }
}

/* =========== PERMUTA + SHARE ROW =========== */
.dc-permuta-share-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0;
}
.dc-share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.dc-share-label {
  font-size: 13px;
  font-weight: 600;
  color: #888;
  font-family: 'Assistant', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dc-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.2s, opacity 0.2s;
  text-decoration: none !important;
}
.dc-share-btn svg {
  width: 18px;
  height: 18px;
}
.dc-share-btn:hover {
  transform: scale(1.15);
  background: #d61116 !important;
  color: #fff !important;
}
.dc-share-fb { background: #1877f2; color: #fff; }
.dc-share-tw { background: #1da1f2; color: #fff; }
.dc-share-li { background: #0a66c2; color: #fff; }
.dc-share-wa { background: #25d366; color: #fff; }

/* =========== PREZZO =========== */
.dc-hero-prezzo {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  font-family: 'Assistant', sans-serif;
  margin: 8px 0 8px;
}
.dc-hero-prezzo span {
  color: #d61116;
}

/* =========== PERMUTA BUTTON + MODAL =========== */
button.dc-permuta-btn,
.dc-hero-info button.dc-permuta-btn {
  display: inline-flex !important;
  align-self: flex-start !important;
  width: auto !important;
  align-items: center !important;
  gap: 10px !important;
  background: #d61116 !important;
  color: #fff !important;
  border: 2px solid #d61116 !important;
  padding: 14px 32px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  font-family: 'Assistant', sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  cursor: pointer !important;
  transition: background 0.2s, transform 0.2s, border-color 0.2s !important;
  margin: 16px 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 15px rgba(214,17,22,0.3) !important;
  outline: none !important;
}
button.dc-permuta-btn:hover,
.dc-hero-info button.dc-permuta-btn:hover {
  background: #b80e12 !important;
  border-color: #b80e12 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(214,17,22,0.4) !important;
}
button.dc-permuta-btn:focus,
.dc-hero-info button.dc-permuta-btn:focus {
  background: #9a0b0f !important;
  border-color: #9a0b0f !important;
  box-shadow: 0 0 0 3px rgba(214,17,22,0.4) !important;
  outline: none !important;
}
button.dc-permuta-btn:active,
.dc-hero-info button.dc-permuta-btn:active {
  background: #8a0a0d !important;
  transform: translateY(0) !important;
}
.dc-permuta-btn svg { stroke: #fff !important; }

.dc-permuta-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dc-permuta-modal-content {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 760px;
  height: 90vh;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
}
.dc-permuta-iframe {
  flex: 1 1 auto;
  width: 100%;
  border: none;
  display: block;
  background: transparent;
}
.dc-permuta-modal-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  width: 40px !important;
  height: 40px !important;
  background: #d61116 !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #fff !important;
  cursor: pointer !important;
  z-index: 2 !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s !important;
  padding: 0 !important;
}
.dc-permuta-modal-close:hover { background: #b80e12 !important; }
.dc-permuta-modal-close:focus { background: #9a0b0f !important; outline: none !important; }

@media (max-width: 768px) {
  .dc-permuta-modal { padding: 10px; }
  .dc-permuta-modal-content { max-width: 100%; height: 95vh; }
  .dc-permuta-btn { width: 100%; justify-content: center; }
}

/* =========== RENDERING GALLERY — hero layout =========== */
.dc-rendering-hero {
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dc-rendering-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dc-rendering-title::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23d61116' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  flex-shrink: 0;
}
.dc-rendering-main {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 8px;
  flex: 1;
}
.dc-rendering-main-img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.dc-rendering-ribbon {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 220px !important;
  height: 220px !important;
  object-fit: contain !important;
  z-index: 3 !important;
  pointer-events: none;
}
.dc-rendering-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.dc-rendering-thumb {
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}
.dc-rendering-thumb img {
  width: 100%;
  height: 75px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s, opacity 0.3s;
}
.dc-rendering-thumb:hover img {
  transform: scale(1.05);
  opacity: 0.85;
}
@media (max-width: 768px) {
  .dc-rendering-main-img { height: 280px; }
  .dc-rendering-thumbs { grid-template-columns: repeat(3, 1fr); }
  .dc-rendering-thumb img { height: 80px; }
  .dc-rendering-ribbon { width: 120px !important; height: 120px !important; }
}
@media (max-width: 480px) {
  .dc-rendering-main-img { height: 220px; }
  .dc-rendering-thumbs { grid-template-columns: repeat(2, 1fr); }
  .dc-rendering-thumb img { height: 90px; }
}

/* =========== STATO IMMOBILE — full width =========== */
.dc-stato-section {
  margin-bottom: 24px;
}

/* Horizontal stepper */
.dc-stepper {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}
.dc-stepper::-webkit-scrollbar { height: 6px; }
.dc-stepper::-webkit-scrollbar-thumb { background: #d8d8dc; border-radius: 3px; }
.dc-stepper .dc-stepper-item { flex-shrink: 0; }
.dc-stepper .dc-stepper-line { flex-shrink: 0; min-width: 40px; }


.dc-stepper {
    padding-top: 10px;
}

.dc-stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 90px;
  width: 90px;
}
.dc-stepper-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f0f2;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #999;
  margin-bottom: 8px;
  transition: all 0.3s;
}
.dc-stepper-item.done .dc-stepper-circle {
  background: #d61116;
  border-color: #d61116;
  color: #fff;
}
.dc-stepper-item.current .dc-stepper-circle {
  background: #fff;
  border-color: #d61116;
  color: #d61116;
  box-shadow: 0 0 0 4px rgba(214, 17, 22, 0.15);
}
.dc-stepper-label {
  font-size: 11px;
  color: #999;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  max-width: 80px;
}
.dc-stepper-item.done .dc-stepper-label { color: #1a1a1a; }
.dc-stepper-item.current .dc-stepper-label { color: #d61116; font-weight: 800; }
.dc-stepper-line {
  flex: 1;
  height: 2px;
  background: #e0e0e0;
  margin-top: 17px;
  min-width: 20px;
}
.dc-stepper-line.done { background: #d61116; }

/* Percentage row */
.dc-stato-pct-row {
  text-align: right;
  margin-bottom: 8px;
}
.dc-stato-pct {
  font-size: 28px;
  font-weight: 800;
  color: #d61116;
  font-family: 'Assistant', sans-serif;
}

/* Progress bar */
.dc-stato-bar {
  height: 6px;
  background: #f0f0f2;
  border-radius: 3px;
  overflow: hidden;
}
.dc-stato-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d61116, #ef4444);
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* =========== STAT CARDS (numeric highlights) =========== */
.dc-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.dc-stat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 12px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dc-stat-card:hover {
  border-color: #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.dc-stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.dc-stat-card-icon svg { width: 22px; height: 22px; }
.dc-stat-card-edifici { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.dc-stat-card-unita   { background: rgba(59,130,246,0.1); color: #3b82f6; }
.dc-stat-card-piani   { background: rgba(14,165,233,0.1); color: #0ea5e9; }
.dc-stat-card-dispo   { background: rgba(34,197,94,0.1); color: #22c55e; }
.dc-stat-card-value {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1;
  margin-bottom: 4px;
  font-family: 'Assistant', sans-serif;
}
.dc-stat-card-label {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* =========== INFO GROUPS (location + extra) =========== */
.dc-info-row {
  display: flex;
  gap: 24px;
}
.dc-info-group {
  flex: 1;
  display: flex;
  gap: 14px;
  padding: 18px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
}
.dc-info-group-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(214,17,22,0.08);
  color: #d61116;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dc-info-group-icon svg { width: 18px; height: 18px; }
.dc-info-group-content {
  flex: 1;
  min-width: 0;
}
.dc-info-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
}
.dc-info-line:last-child { border-bottom: none; }
.dc-info-label {
  font-size: 13px;
  color: #999;
  font-weight: 500;
}
.dc-info-value {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

/* =========== LOCATION MAP =========== */
.dc-map-info-row {
  margin-bottom: 20px;
}
/* Map popup — compact */
.dc-map-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15) !important;
  border: 1px solid #e0e0e0 !important;
}
.dc-map-popup-wrap .leaflet-popup-content {
  margin: 0 !important;
  min-width: 180px;
  max-width: 200px;
}
.dc-map-popup-wrap .leaflet-popup-tip {
  border-top-color: #fff !important;
}
.dc-map-popup-wrap .leaflet-popup-close-button {
  width: 22px !important;
  height: 22px !important;
  font-size: 14px !important;
  line-height: 22px !important;
  color: #fff !important;
  background: rgba(0,0,0,0.35) !important;
  border-radius: 50% !important;
  top: 6px !important;
  right: 6px !important;
  text-align: center;
  padding: 0 !important;
  z-index: 2;
}
.dc-map-popup-wrap .leaflet-popup-close-button:hover {
  background: rgba(0,0,0,0.5) !important;
}
.dc-map-popup {
  font-family: 'Assistant', sans-serif;
}
.dc-map-popup img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}
.dc-map-popup-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dc-map-popup-body strong {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}
.dc-map-popup-body span {
  font-size: 11px;
  color: #666;
  font-weight: 500;
}
.dc-map-popup-body a {
  font-size: 11px;
  font-weight: 700;
  color: #d61116 !important;
  margin-top: 4px;
  transition: opacity 0.2s;
}
.dc-map-popup-body a:hover { opacity: 0.75; }
.dc-mini-map {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dc-map-pin {
  background: none !important;
  border: none !important;
}
.dc-mini-map .leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
  border-radius: 8px !important;
  overflow: hidden;
}
.dc-mini-map .leaflet-control-zoom a {
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 16px !important;
  color: #1a1a1a !important;
  border-bottom-color: #f0f0f0 !important;
}

/* =========== TABS =========== */
.dc-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 20px;
  overflow-x: auto;
}
.dc-tab {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Assistant', sans-serif;
  letter-spacing: -0.2px;
}
.dc-tab:hover { color: #1a1a1a; background: #f0f0f2; }
.dc-tab.active { color: #d61116; border-bottom-color: #d61116; background: #f0f0f2; }
.dc-tab-count { font-size: 11px; color: #999; margin-left: 4px; }
.dc-tab-content { display: none; }
.dc-tab-content.active { display: block; }


/* =========== CAROUSEL =========== */
.dc-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  padding: 12px 0;
  cursor: grab;
  user-select: none;
}
.dc-carousel:active { cursor: grabbing; }
.dc-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}
.dc-carousel-slide {
  height: 100%;
  cursor: pointer;
  padding: 0 4px;
  box-sizing: border-box;
}
.dc-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  aspect-ratio: 4/3;
}
.dc-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.dc-carousel-btn svg { width: 24px; height: 24px; }
.dc-carousel-btn:hover { background: rgba(0,0,0,0.7); }
.dc-carousel-prev { left: 10px; }
.dc-carousel-next { right: 10px; }
.dc-carousel-counter {
  position: absolute;
  top: 17px;
  right: 12px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

/* Videos */
.dc-video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.dc-video-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  color: #1a1a1a;
}
.dc-video-embed {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: 8px;
  overflow: hidden;
}
.dc-video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.dc-video-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #f0f0f2;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #1a1a1a !important;
  font-size: 14px;
  font-weight: 500;
}

/* =========== UNITS =========== */
.dc-floor { margin-bottom: 28px; }
.dc-floor-title {
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1a1a1a;
  background: #f0f0f2;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #d61116;
  border-radius: 8px;
  padding: 12px 18px;
  margin: 8px 0 20px;
}
.dc-floor-count { font-size: 13px; font-weight: 500; opacity: 0.5; }
.dc-collapsible {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.dc-collapse-icon {
  opacity: 0.4;
  transition: transform 0.2s;
  transform: rotate(180deg);
  flex-shrink: 0;
}
.dc-collapsible[data-open="false"] .dc-collapse-icon { transform: rotate(0deg); }

.dc-units-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.dc-unit-card {
  background: #f0f0f2;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dc-unit-image {
  width: 100%;
  height: 220px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}
.dc-unit-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.dc-unit-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}
.dc-unit-body { padding: 16px 20px; flex: 1; }
.dc-unit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dc-unit-name {
  font-size: 18px;
  font-weight: 700;
  color: #d61116;
  letter-spacing: -0.3px;
}
.dc-unit-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.dc-unit-status-disponibile { background: rgba(22,163,74,0.15); color: #16a34a; }
.dc-unit-status-venduta { background: rgba(136,136,136,0.15); color: #666; }
.dc-unit-status-riservata { background: rgba(217,119,6,0.15); color: #d97706; }

.dc-stanze-list { }
.dc-stanza-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
}
.dc-stanza-row:last-child { border-bottom: none; }
.dc-stanza-mq {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}
.dc-no-rooms { color: #666; font-size: 14px; margin: 0; }

.dc-hero-description {
    font-size: 22px;
    line-height: 1.5;
    color: #1a1a1a;
    font-weight: 600;
}
.dc-description p { margin: 0 0 12px; }

/* =========== CALL TO ACTION BAR =========== */
.dc-cta-bar {
  width: 100%;
  background: #d61116;
  padding: 32px 20px;
  border-top:10px solid white ;
  border-bottom:10px solid white ;

}
.dc-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.dc-cta-text {
  color: #fff !important;
  font-family: 'Assistant', sans-serif !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  line-height: 1.4 !important;
  flex: 1;
}
.dc-cta-button {
    display: inline-block;
    background: #3a8c28 !important;
    color: #fff !important;
    font-family: 'Assistant', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px;
    padding: 13px 40px !important;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: transform 0.25s ease, background 0.25s ease;
    text-decoration: none !important;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid #ffffff;
}

/* =========== PLANIMETRIA GENERICA =========== */
.dc-planimetria-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.dc-planimetria-item {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  background: #f8f8f8;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.dc-planimetria-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.dc-planimetria-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* =========== DESCRIZIONE UNITÀ =========== */
.dc-unita-desc-text {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
  margin-top: 12px;
}
.dc-unita-desc-text p { margin: 0 0 10px; }

/* =========== PIANI E UNITÀ (accordion) =========== */
.dc-piani-list {
  display: flex;
  flex-direction: column;
  gap: 0px;
}
.dc-piano-units {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Accordion item */
.dc-unit-accordion {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.dc-unit-acc-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.dc-unit-acc-toggle:hover {
  background: #fafafa;
}
.dc-unit-acc-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.dc-unit-acc-icon svg {
  transition: transform 0.25s ease;
}
.dc-unit-accordion.is-open .dc-unit-acc-icon .dc-acc-vline {
  opacity: 0;
}
.dc-unit-acc-name {
  font-size: 20px;
  font-weight: 600;
  color: #d61116;
  font-family: 'Assistant', sans-serif;
}
.dc-unit-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px;
}
.dc-unit-accordion.is-open .dc-unit-acc-body {
  max-height: 1200px;
  padding: 20px 20px;
}
/* Two-column layout: planimetria left, stanze right */
.dc-unit-acc-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.dc-unit-acc-left {
  flex: 0 0 45%;
  max-width: 45%;
}
.dc-unit-acc-right {
  flex: 1;
  min-width: 0;
}
.dc-unit-acc-title {
  font-size: 32px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  font-family: 'Assistant', sans-serif !important;
  margin: 0 0 16px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}
.dc-unit-planimetria {
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #f8f8f8;
}
.dc-unit-planimetria img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.dc-unit-planimetria-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  cursor: default;
  min-height: 200px;
}
.dc-unit-planimetria-placeholder span {
  font-size: 13px;
  color: #aaa;
  margin-top: 10px;
  font-family: 'Assistant', sans-serif;
}
.dc-unit-stanze {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.dc-unit-stanza {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 22px;
  color: #444;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.dc-unit-stanza:last-child { border-bottom: none; }
.dc-stanza-nome {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dc-stanza-mq { font-weight: 700; color: #1a1a1a; font-size: 20px; }
@media (max-width: 768px) {
  .dc-unit-acc-layout { flex-direction: column; }
  .dc-unit-acc-left { flex: none; max-width: 100%; width: 100%; }
  .dc-unit-acc-right { width: 100%; }
}

/* =========== PREV / NEXT NAV =========== */
.dc-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
  gap: 16px;
}
.dc-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #f0f0f2;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  flex: 1;
  min-width: 0;
  text-decoration: none !important;
  color: #1a1a1a !important;
}
.dc-nav-link:hover {
  border-color: #d61116;
  background: #fff;
}
.dc-nav-next { align-items: flex-end; text-align: right; }
.dc-nav-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}
.dc-nav-link:hover .dc-nav-label { color: #d61116; }
.dc-nav-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========== LIGHTBOX =========== */
.dc-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.dc-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
.dc-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}
.dc-lightbox-close:focus,
.dc-lightbox-close:hover,
.dc-lightbox-close:active { background: none !important; outline: none; box-shadow: none; }
/* Gallery lightbox nav */
.dc-glb-prev, .dc-glb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}
.dc-glb-prev { left: 16px; }
.dc-glb-next { right: 16px; }
.dc-glb-prev:hover, .dc-glb-next:hover { background: rgba(214,17,22,0.8); }
.dc-glb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-family: 'Assistant', sans-serif;
  font-weight: 600;
  background: rgba(0,0,0,0.5);
  padding: 4px 14px;
  border-radius: 20px;
}

/* =========== RESPONSIVE =========== */
@media (max-width: 1024px) {
  .dc-info-row { flex-direction: column; }
}
@media (max-width: 768px) {
  .dc-hero-row { flex-direction: column-reverse; gap: 20px; }
  .dc-hero-image { width: 100%; }
  .dc-hero-info h1 { font-size: 24px; }
  .dc-hero-price { font-size: 22px; }
  .dc-section { padding: 20px; }
  .dc-nav-footer { flex-direction: column; }
  .dc-cta-inner { flex-direction: column; text-align: center; }
  .dc-cta-text { font-size: 18px !important; }
  .dc-cta-button { width: 100%; text-align: center; }
  .dc-stepper-label { font-size: 10px; max-width: 60px; }
  .dc-stepper-circle { width: 30px; height: 30px; font-size: 11px; }
  .dc-stepper-line { margin-top: 14px; }
  .dc-stato-pct { font-size: 22px; }
}
@media (max-width: 480px) {
  .dc-single { padding: 16px 12px; }
  .dc-stats-row { flex-wrap: wrap; }
  .dc-stat-card { min-width: calc(50% - 8px); }
  .dc-stepper-label { font-size: 9px; letter-spacing: 0; }
}

/* ============ Stato — clickable stepper + content panel ============ */
.dc-stepper-item { transition: transform 0.15s ease; }
.dc-stepper-item:hover { transform: translateY(-2px); }
.dc-stepper-item.has-content .dc-stepper-circle::after {
  content: '';
  position: absolute;
  top: -2px; right: -2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d61116;
  border: 2px solid #fff;
}
.dc-stepper-item .dc-stepper-circle { position: relative; }
.dc-stepper-item.selected .dc-stepper-circle {
  box-shadow: 0 0 0 4px rgba(214,17,22,0.18);
}
.dc-stepper-item.selected .dc-stepper-label { color: #d61116; font-weight: 800; }

.dc-stato-connector {
  position: relative;
  height: 0;
  margin: 24px 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.dc-stato-connector.active { opacity: 1; height: 24px; }
.dc-stato-connector-line {
  position: absolute;
  left: var(--dc-connector-x, 50%);
  top: 0;
  width: 2px;
  height: 24px;
  background: #d61116;
  transform: translateX(-50%);
  transition: left 0.3s ease;
}

.dc-stato-panel { position: relative; }
.dc-stato-content {
  display: none;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  animation: dcStatoFade 0.3s ease;
}
.dc-stato-content.active { display: block; }
@keyframes dcStatoFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dc-stato-content-header { margin-bottom: 16px; }
.dc-stato-content-header h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #1a1a1a;
}
.dc-stato-content-desc {
  font-size: 15px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 24px;
}
.dc-stato-content-desc p:last-child { margin-bottom: 0; }

/* Stato grid — fixed 4 columns, items keep same width even if only 1 image */
.dc-stato-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
  justify-content: start;
}
.dc-stato-grid-item {
  aspect-ratio: 4/3;
  background: #0a0a0a;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dc-stato-grid-item:hover {
  transform: translateY(-2px);
  border-color: #d61116;
}
.dc-stato-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1024px) {
  .dc-stato-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .dc-stato-content { padding: 20px 16px; }
  .dc-stato-content-header h4 { font-size: 16px; }
  .dc-stato-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ============================================================
   DCSI — Stato Immobile v2 (fully scoped, no conflicts)
   ============================================================ */
.dcsi { --dcsi-red: #d61116; --dcsi-red-soft: rgba(214,17,22,0.08); --dcsi-line: #ececef; --dcsi-text: #1a1a1a; --dcsi-muted: #8a8a90; }
.dcsi * { box-sizing: border-box; }

.dcsi__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 1024px) {
  .dcsi__grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ===== LEFT — progress (no card bg) ===== */
.dcsi__left {
  position: sticky;
  top: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 28px;
}
/* Title row matches accordion head: 1px border + 18px padding + 36px node + 18px padding = ~73px */
.dcsi__eyebrow {
  display: block;
  text-align: center;
  margin: 0;
  /* Align title with first accordion .dcsi__step-name:
     1px card border + 18px head padding + 4px (head-text top within head) */
  padding-top: 23px;
  font-size: 16px;
  font-weight: 700;
  color: var(--dcsi-text);
  letter-spacing: -0.2px;
  line-height: 1.2;
  text-transform: none;
}

/* Multi-ring chart */
.dcsi__chart {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1;
}
.dcsi__chart-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.dcsi__chart-svg circle {
  transition: stroke-dasharray 0.8s ease, opacity 0.25s ease;
}
.dcsi__ring { cursor: pointer; }
/* Minimal hover: dim others, keep target at full opacity */
.dcsi__chart:hover .dcsi__ring-fill { opacity: 0.35; }
.dcsi__ring:hover .dcsi__ring-fill { opacity: 1; }
.dcsi__chart-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dcsi__chart-pct {
  font-size: 34px;
  font-weight: 800;
  color: var(--dcsi-text);
  letter-spacing: -2px;
  line-height: 1;
}
.dcsi__chart-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--dcsi-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* Legend */
.dcsi__legend {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.dcsi__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dcsi-muted);
  background: #f4f4f6;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.dcsi__legend-item.is-done {
  color: var(--dcsi-text);
  background: #ececef;
}
.dcsi__legend-item.is-current {
  color: #fff;
  background: var(--dcsi-red);
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(214,17,22,0.25);
}
.dcsi__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.5;
}
.dcsi__legend-item.is-done .dcsi__legend-dot { opacity: 1; }
.dcsi__legend-item.is-current .dcsi__legend-dot {
  opacity: 1;
  background: #fff !important;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}
.dcsi__legend-name {
  white-space: nowrap;
}
.dcsi__pct {
  font-size: 64px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #d61116, #ff4d52);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 16px;
}
.dcsi__pct span { font-size: 26px; margin-left: 2px; }
.dcsi__bar {
  height: 8px;
  background: #e8e8eb;
  border-radius: 999px;
  overflow: hidden;
}
.dcsi__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dcsi-red), #ff4d52);
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(214,17,22,0.4);
  transition: width 0.6s ease;
}
.dcsi__meta {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed #d8d8dc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dcsi__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
}
.dcsi__meta-label { color: var(--dcsi-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.dcsi__meta-value { color: var(--dcsi-text); font-weight: 800; font-size: 13px; }

/* ===== RIGHT — accordion ===== */
.dcsi__acc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dcsi__item {
  background: #fff;
  border: 1px solid var(--dcsi-line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.dcsi__item:hover:not(.is-open) {
  border-color: #d8d8dc;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(20,20,30,0.06);
}
.dcsi__item.is-done {
  background: linear-gradient(180deg, #fff, #fafafa);
}
.dcsi__item.is-open {
  border-color: #d8d8dc;
  box-shadow: 0 8px 24px -10px rgba(20,20,30,0.12);
}

button.dcsi__head {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  width: 100% !important;
  padding: 18px 20px !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  text-align: left !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: inherit !important;
  line-height: 1.4 !important;
  min-height: 0 !important;
  height: auto !important;
}
.dcsi__head:hover { background: rgba(20,20,30,0.02); }
.dcsi__item.is-open .dcsi__head { background: transparent; }

.dcsi__node {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f4f4f6;
  color: #b0b0b5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dcsi__item.is-done .dcsi__node {
  background: var(--dcsi-red);
  color: #fff;
  box-shadow: 0 2px 6px rgba(214,17,22,0.18);
}
.dcsi__item.is-current .dcsi__node,
.dcsi__item.is-open .dcsi__node {
  background: #fff;
  color: var(--dcsi-red);
  border-color: #ececef;
  box-shadow: none;
}

.dcsi__head-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
}
.dcsi__step-name {
  display: block !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--dcsi-text) !important;
  letter-spacing: -0.2px !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}
.dcsi__step-status {
  display: block !important;
}
.dcsi__item.is-open .dcsi__step-name { color: var(--dcsi-red); }
.dcsi__step-status {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dcsi-muted);
}
.dcsi__item.is-done .dcsi__step-status { color: #16a34a; }
.dcsi__item.is-current .dcsi__step-status { color: var(--dcsi-red); }

.dcsi__head-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.dcsi__chip {
  font-size: 11px;
  font-weight: 700;
  color: var(--dcsi-muted);
  background: #f4f4f6;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.dcsi__item.is-open .dcsi__chip {
  background: var(--dcsi-red-soft);
  color: var(--dcsi-red);
}
.dcsi__chev {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f4f4f6;
  color: #b0b0b5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s, color 0.2s;
}
.dcsi__head:hover .dcsi__chev { background: #ececef; color: #666; }
.dcsi__item.is-open .dcsi__chev {
  background: var(--dcsi-red);
  color: #fff;
  transform: rotate(180deg);
}

/* Panel */
.dcsi__panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.dcsi__item.is-open .dcsi__panel {
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease 0.1s;
}
.dcsi__panel-inner {
  margin: 0 20px;
  padding: 16px 0 22px 0;
  border-top: 1px solid #ececef;
}
.dcsi__item.is-open .dcsi__panel-inner > * + * { margin-top: 16px; }
.dcsi__desc {
  font-size: 14px;
  line-height: 1.65;
  color: #555;
}
.dcsi__desc p:last-child { margin-bottom: 0; }
.dcsi__slider {
  position: relative;
  padding: 0 0 32px;
}
.dcsi__gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dcsi__gallery::-webkit-scrollbar { display: none; }
button.dcsi__slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin-top: -16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff !important;
  border: 1px solid #ececef !important;
  color: #1a1a1a !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  padding: 0 !important;
  box-shadow: 0 6px 18px rgba(20,20,30,0.12);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s, box-shadow 0.25s;
  outline: none !important;
}
button.dcsi__slider-btn:hover {
  background: var(--dcsi-red) !important;
  color: #fff !important;
  border-color: var(--dcsi-red) !important;
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 8px 22px rgba(214,17,22,0.28);
}
button.dcsi__slider-btn:focus,
button.dcsi__slider-btn:focus-visible,
button.dcsi__slider-btn:active {
  background: #fff !important;
  color: #1a1a1a !important;
  border-color: #ececef !important;
  outline: none !important;
  box-shadow: 0 6px 18px rgba(20,20,30,0.12), 0 0 0 3px rgba(214,17,22,0.18);
}
button.dcsi__slider-btn:focus:hover,
button.dcsi__slider-btn:focus-visible:hover {
  background: var(--dcsi-red) !important;
  color: #fff !important;
  border-color: var(--dcsi-red) !important;
}
.dcsi__slider-prev { left: -14px; }
.dcsi__slider-next { right: -14px; }

/* Dots */
.dcsi__slider-dots {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  height: 20px;
}
button.dcsi__slider-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8d8dc !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0;
  cursor: pointer;
  outline: none !important;
  box-shadow: none !important;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              transform 0.2s ease;
}
button.dcsi__slider-dot:hover {
  background: #a8a8b0 !important;
  transform: scale(1.25);
}
button.dcsi__slider-dot:focus,
button.dcsi__slider-dot:focus-visible {
  background: #b8b8c0 !important;
  outline: none !important;
}
button.dcsi__slider-dot.is-active {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: #ececef !important;
  transform: none;
  overflow: hidden;
}
button.dcsi__slider-dot.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: var(--dcsi-red);
  border-radius: 999px;
  transform-origin: left center;
  animation: dcsiDotFill 4500ms linear forwards;
}
@keyframes dcsiDotFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.dcsi__gallery-item {
  flex: 0 0 calc((100% - 30px) / 4);
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #f4f4f6;
  scroll-snap-align: start;
  transition: transform 0.25s;
}
.dcsi__gallery-item:hover { transform: scale(1.02); }
.dcsi__gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) {
  .dcsi__gallery-item { flex: 0 0 calc((100% - 20px) / 3); }
}
@media (max-width: 600px) {
  .dcsi__gallery-item { flex: 0 0 calc((100% - 10px) / 2); }
}
.dcsi__empty {
  font-size: 13px;
  color: #b8b8bd;
  font-style: italic;
  padding: 6px 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dcsi__empty::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #e0e0e3;
}

@media (max-width: 1024px) {
  .dcsi__left { position: static; }
  .dcsi__pct { font-size: 52px; }
}
@media (max-width: 768px) {
  .dcsi__head { padding: 16px; gap: 12px; }
  .dcsi__chip { display: none; }
  .dcsi__item.is-open .dcsi__panel-inner { padding: 4px 18px 18px 18px; }
  .dcsi__step-name { font-size: 15px; }
}
