/* ===== SEZIONE Platform Architecture ===== */

/* Sezione Architettura Piattaforma */
#context_platform {
  width: 100%;
  clear: both;
  display: block;
}

#context_platform .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#context_platform p {
  max-width: 1010px;
  margin-left: auto;
  margin-right: auto;
}

#context_platform .ccy-card {
  opacity: 1;
}

.section-spacer {
  height: 60px;
  width: 100%;
  clear: both;
}

.carousel-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  margin-top: 40px;
  padding: 20px 0;
  /* Intervento #6: edge fade gradient — effetto "infinity" professionale */
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.card-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  padding: 20px 0;
  /* Fix #14: will-change gestito dinamicamente da GSAP, non hardcoded */
}

#context_platform.container_mx {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Le card dentro il track prendono larghezza responsive */
.card-track > .ccy-card {
  flex: 0 0 calc(33.333% - 1rem); /* 3 card su desktop */
  min-width: calc(33.333% - 1rem);
}

/* Fix #5: disabilita CSS transform hover nelle card del carousel —
   GSAP gestisce scale e box-shadow via quickTo e gsap.to() */
.card-track .ccy-card:hover {
  transform: none;
}

@media (max-width: 1199px) {
  .card-track > .ccy-card {
    flex: 0 0 calc(50% - 0.75rem); /* 2 card su tablet */
    min-width: calc(50% - 0.75rem);
  }
}

@media (max-width: 767px) {
  .card-track > .ccy-card {
    flex: 0 0 100%; /* 1 card su mobile */
    min-width: 100%;
  }
}

/* ===== SEZIONE Connettori e integrazioni ===== */
#connectors {
  background-image: url("/image/bg_section_dark.png");
  background-size: cover;
  background-position: 0% 0%;
  background-repeat: no-repeat;
  padding-top: 100px;
}

#connectors .testo_output {
  color: var(--ccy-primary);
}

#connectors .right {
  width: 50%;
}

#connectors .left {
  width: 50%;
}

#connectors .left .subtitle_dark {
  color: var(--ccy-primary);
  padding: 0 25px;
}

#connectors ul {
  color: white; /* Colora testo e pallini */
  list-style-type: disc; /* Assicura che i pallini siano visibili */
  font-family: var(--font_family);
  font-optical-sizing: 100 !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  font-style: normal !important;
}

/* Colora i pallini dell'elenco in azzurro */
#connectors ul li::marker {
  color: var(--ccy-primary); /* DeepSkyBlue o l'azzurro che preferisci */
  font-size: 1.2em; /* Opzionale: rende i pallini leggermente più evidenti */
}

/* Colora la parola in grassetto (iniziale) in rosso */
#connectors ul li b {
  color: var(--ccy-accent); /* Rosso */
}

/* Colora il resto del testo in bianco (come richiesto prima) */
#connectors ul li {
  color: white;
}

#connectors .claim {
  color: var(--ccy-kicker);
  font-weight: 600;
  margin-top: 20px;
}

#connectors .line-divider {
  height: 2px;
  background: var(--ccy-line-divider);
  margin-left: 0;
  margin-right: auto;
  width: 600px;
  border-radius: 0 50px 50px 0;
  margin-left: auto;
  margin-right: auto;
}

.card_cap_connectors {
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
  margin-bottom: 40px;
}

/* Intervento #11: bordo ridotto a 2px — l'intensità hover è gestita da GSAP */
.cap_card_white {
  border: 2px solid var(--ccy-primary);
  transition: border-color 0.3s ease;
}

.cap_card_white:hover {
  border-color: var(--ccy-primary);
}

/* Intervento #13: CSS transition rimossa — GSAP gestisce opacity e y tramite gsap.to() */
#card-description-viewer {
  margin-top: 20px;
  font-size: 18px;
  min-height: 100px;
  opacity: 0.8;
  color: var(--ccy-bg-light);
  font-weight: 500;
  margin-left: 50px;
  margin-right: 50px;
  will-change: transform, opacity;
}

/* ===== SEZIONE Workflow e Automazioni ===== */
#workflow {
  padding: 80px 50px;
  background-color: var(--ccy-bg-light);
}

#workflow h2 {
  font-size: var(--font_size_title);
  font-weight: var(--font_weight_title);
  line-height: var(--line_height_title);
  color: var(--ccy-dark);
  margin-bottom: var(--margin_bottom_title);
}

#workflow h2::first-letter {
  font-size: var(--font_size_title_first_letter);
  color: var(--ccy-accent);
}

#workflow > .text-center > p {
  /* font-size: var(--font_size_subtitle);
  color: var(--ccy-dark); */
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Intervention row --- */
.intervention-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px auto;
  flex-wrap: wrap;
}

.intervention-label {
  font-weight: 800;
  font-size: 14px;
  color: var(--ccy-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 24px 10px 16px;
  white-space: nowrap;
  border-right: 2px solid var(--ccy-primary);
}

.action-box {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ccy-dark);
  transition: background 0.2s ease;
}

.action-box:hover {
  background: rgba(0, 212, 255, 0.16);
}

/* --- Deep content area (scoped a #workflow per non collidere con #connectors) --- */
#workflow .deep {
  max-width: 1200px;
  margin: 40px auto 0;
}

#workflow .deep-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-items: start;
}

#workflow .deep-left {
  width: 60%;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#workflow .deep-media {
  width: 40%;
  min-width: 300px;
  padding: 10px;
}

#workflow .deep-left h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ccy-dark);
  margin-bottom: 8px;
}

#workflow .deep-left p {
  /* font-size: var(--font_size_subtitle);
  color: var(--ccy-dark);
  line-height: 1.6; */
  margin-bottom: 0;
}

#workflow .deep {
  /* font-size: 22px; */
  /* font-weight: 700; */
  color: var(--ccy-dark);
  margin-bottom: 8px;
}

#workflow .deep-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: var(--font_size_subtitle);
  color: var(--ccy-dark);
}

#workflow .caption {
  margin-top: 10px;
  font-size: 14px;
  color: rgba(33, 30, 59, 0.55);
  text-align: center;
  font-style: italic;
}

/* --- Responsive #workflow --- */
@media (max-width: 1199px) {
  #workflow {
    padding: 60px 30px;
  }

  #workflow .deep-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 767px) {
  #workflow {
    padding: 40px 20px;
  }

  .intervention-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .intervention-label {
    border-right: none;
    border-bottom: 2px solid var(--ccy-primary);
    padding-right: 0;
    padding-bottom: 12px;
    text-align: center;
  }

  .action-box {
    text-align: center;
  }
}

/* ===== Stagger: cap card in #connectors ===== */
#connectors .card_cap_connectors > * {
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.45s ease-out, opacity 0.45s ease-out;
}

#connectors.show .card_cap_connectors > *:nth-child(1) { transition-delay: 0.15s; }
#connectors.show .card_cap_connectors > *:nth-child(2) { transition-delay: 0.28s; }
#connectors.show .card_cap_connectors > *:nth-child(3) { transition-delay: 0.41s; }

#connectors.show .card_cap_connectors > * {
  transform: translateY(0);
  opacity: 1;
}

/* ===== Stagger: intervention-row in #workflow ===== */
#workflow .intervention-row > * {
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.45s ease-out, opacity 0.45s ease-out, background 0.2s ease;
}

#workflow.show .intervention-row > *:nth-child(1) { transition-delay: 0.10s; }
#workflow.show .intervention-row > *:nth-child(2) { transition-delay: 0.22s; }
#workflow.show .intervention-row > *:nth-child(3) { transition-delay: 0.34s; }
#workflow.show .intervention-row > *:nth-child(4) { transition-delay: 0.46s; }

#workflow.show .intervention-row > * {
  transform: translateY(0);
  opacity: 1;
}

/* Reduced motion override per le nuove regole */
@media (prefers-reduced-motion: reduce) {
  #connectors .card_cap_connectors > *,
  #workflow .intervention-row > * {
    transform: none;
    opacity: 1;
    transition: none;
  }
}

/* ===== CTA standalone ===== */
.cta {
  background: linear-gradient(90deg, #052c55, #021124);
  text-align: center;
  padding: 60px 40px;
}

.cta h2 {
  font-size: var(--font_size_title);
  font-weight: var(--font_weight_title);
  color: var(--ccy-bg-light);
  margin-bottom: 12px;
}

.cta p {
  font-size: var(--font_size_subtitle);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

.cta a {
  display: inline-block;
  background-color: var(--ccy-primary);
  color: #0b2b33;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 16px;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.cta a:hover {
  background-color: #009bb0;
  color: #fff;
}

@media (max-width: 767px) {
  .cta {
    padding: 40px 20px;
  }
}
