/* ============================================================
   Dondi Salotti – Storia Aziendale | Frontend CSS
   ============================================================ */

.ds-history-section {
  position: relative;
  background:
    radial-gradient(circle at 8% 20%,  rgba(255,255,255,.06), transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(255,255,255,.04), transparent 34%),
    #050505;
  color: #fff;
  padding: 120px 0 140px;
  overflow: hidden;
}

.ds-history-inner {
  width: min(1320px, 85%);
  margin: 0 auto;
}

.ds-history-head { 
	margin-bottom: 200px; 
}

.ds-history-kicker {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.ds-history-head h2 {
  margin: 0;
  font-size: clamp(42px, 5vw, 82px);
  line-height: .95;
  font-weight: 400;
  letter-spacing: -0.055em;
}

/* ── Timeline ────────────────────────────────────────────── */
.ds-history-timeline {
  position: relative;
  margin-left: -40px;
}

.ds-history-timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 0;
  left: 165px;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.08),
    rgba(255,255,255,.55),
    rgba(255,255,255,.08)
  );
}

/* ── Item ────────────────────────────────────────────────── */
.ds-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 80px;
  padding: 0 0 130px;
  opacity: 0;
  transform: translateY(70px);
  transition: opacity .9s ease, transform .9s ease;
}

.ds-history-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ds-history-item::before {
  content: "";
  position: absolute;
  left: 149px;
  top: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.4px solid rgba(255,255,255,.9);
  background: #050505;
  z-index: 2;
}

.ds-history-item::after {
  content: "";
  position: absolute;
  left: 164px;
  top: 23px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  z-index: 3;
}

/* ── Anno ────────────────────────────────────────────────── */
.ds-history-year {
  position: sticky;
  top: 120px;
  align-self: start;
  width: fit-content;
  padding: 10px 20px 11px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 999px;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.06em;
  color: rgba(255,255,255,.95);
}

/* ── Contenuto ───────────────────────────────────────────── */
.ds-history-content { max-width: 760px; }

.ds-history-content h3,
.ds-carousel-slide h3 {
  margin: 0 0 24px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.06em;
}

.ds-history-content p,
.ds-carousel-slide p {
  margin: 0;
  max-width: 650px;
  font-size: clamp(18px, 1.5vw, 20px);
  line-height: 1.45;
  font-weight: 200;
  letter-spacing: -0.025em;
  color: rgba(255,255,255,.82);
}

/* ── Media ───────────────────────────────────────────────── */
.ds-history-logo {
  margin-top: 34px;
  width: 250px;
  min-height: 96px;
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-history-logo img {
  display: block;
  max-width: 100%;
  max-height: 64px;
  object-fit: contain;
}

.ds-history-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 38px;
}

.ds-history-media.ds-single-img {
  grid-template-columns: 1fr;
  max-width: 420px;
}

.ds-history-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
  background: rgba(255,255,255,.06);
  display: block;
}

/* ── Carosello ───────────────────────────────────────────── */
.ds-carousel { position: relative; }
.ds-c-viewport {
  overflow: hidden;
  transition: height .45s cubic-bezier(.4,0,.2,1);
}

.ds-c-track {
  display: flex;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

.ds-carousel-slide { min-width: 100%; }

.ds-carousel-slide .ds-history-media,
.ds-carousel-slide .ds-history-logo { margin-top: 28px; }

/* Nav: frecce + dots in riga orizzontale, sotto il contenuto della slide */
#dsHistory .ds-c-nav {
  display: grid !important;
  grid-template-columns: 38px auto 38px minmax(42px, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 30px !important;
  padding: 0 !important;
  list-style: none !important;
}

#dsHistory .ds-c-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  position: static !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255,255,255,.35) !important;
  background: rgba(255,255,255,.06) !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

#dsHistory .ds-c-btn:hover:not(:disabled) {
  background: rgba(255,255,255,.14) !important;
  border-color: rgba(255,255,255,.6) !important;
}

#dsHistory .ds-c-btn:disabled {
  opacity: .28 !important;
  cursor: default !important;
}

#dsHistory .ds-c-dots {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#dsHistory .ds-c-dot {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: block !important;
  width: 7px !important;
  height: 7px !important;
  min-width: 7px !important;
  max-width: 7px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.25) !important;
  cursor: pointer !important;
  float: none !important;
  box-shadow: none !important;
}

#dsHistory .ds-c-dot.active,
#dsHistory .ds-c-dot.is-active {
  background: rgba(255,255,255,.9) !important;
  transform: scale(1.3) !important;

}

#dsHistory .ds-c-counter {
  justify-self: end !important;
  display: block !important;
  margin: 0 !important;
  font-size: 12px !important;
  color: rgba(255,255,255,.35) !important;
  letter-spacing: .06em !important;
  white-space: nowrap !important;
}

#dsHistory, #dsHistory * { 
	box-sizing: border-box;
}

/* ── Empty ───────────────────────────────────────────────── */
.ds-storia-empty { color: rgba(255,255,255,.4); font-size: 15px; padding: 40px 0; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 980px) {
  .ds-history-section { padding: 90px 0; }
  .ds-history-timeline { margin-left: 0; }
  .ds-history-timeline::before { left: 16px; }

  .ds-history-item {
    display: block;
    padding-left: 54px;
    padding-bottom: 86px;
  }

  .ds-history-item::before { left: 0; width: 32px; height: 32px; }
  .ds-history-item::after  { left: 14px; top: 22px; }

  .ds-history-year {
    position: relative;
    top: auto;
    margin-bottom: 24px;
    font-size: 34px;
    display: block;
  }

  .ds-history-content h3,
  .ds-carousel-slide h3 { font-size: 34px; }

  .ds-history-content p,
  .ds-carousel-slide p  { font-size: 17px; }

  .ds-history-media { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .ds-history-head { 
	  text-align: center !important; 
   }

  .ds-history-head {
    margin-bottom: 120px;
  }
}