/* ----- Titolo card con icona inline ----- */
.card-title {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.3;
  min-width: 0;
}
.card-title svg {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.85;
  margin-top: 0.18rem;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about { background: var(--bg-soft); }

.about-centered { max-width: 780px; margin: 0 auto; text-align: center; }
.about-centered .section-label { justify-content: center; }

.about-body { margin-top: 1.8rem; }
.about-body p {
  font-size: 1.02rem; line-height: 1.85;
  color: var(--text-muted); margin-bottom: 1rem; text-align: center;
}
.about-body p strong { color: var(--navy); font-weight: 600; }

/* ----- Certificazioni ISO ----- */
.cert-logos {
  display: flex; justify-content: center;
  gap: 2.5rem; margin-top: 2.5rem; flex-wrap: wrap;
}

.cert-logo-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.7rem; text-decoration: none; transition: all 0.3s; cursor: pointer;
}
.cert-logo-item:hover { transform: translateY(-3px); }

.cert-logo-item img {
  height: 80px; width: auto; object-fit: contain;
  border-radius: 8px; transition: all 0.3s;
}
.cert-logo-item:hover img { box-shadow: 0 8px 25px rgba(0,0,0,0.08); }

.cert-logo-item span {
  font-size: 0.82rem; font-weight: 600;
  color: var(--navy); text-align: center; line-height: 1.3;
}
.cert-logo-item span small {
  display: block; font-weight: 400;
  color: var(--text-muted); font-size: 0.72rem; margin-top: 2px;
}

/* ============================================================
   SERVICES — Description + Icon Grid + Tech
   ============================================================ */

.services { background: var(--bg); }

.services-header { text-align: center; margin-bottom: 2.5rem; }
.services-header .section-subtitle { margin: 0 auto; }

/* Services description paragraph */
.services-description {
  max-width: 780px;
  margin: 0 auto 2.8rem;
  text-align: center;
}
.services-description p {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-muted);
}

/* Services icon grid */
.services-icons-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto 4rem;
}

.service-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.service-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(228,47,53,0.08), rgba(228,47,53,0.03));
  border: 1px solid rgba(228,47,53,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-icon-item:hover .service-icon-circle {
  background: var(--accent);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(228,47,53,0.22);
}

.service-icon-item span {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

/* ============================================================
   TECH SECTION — Left desc / Right: [arrow] [cards] [arrow] + dots below
   ============================================================ */

.tech-section {
  margin-top: 1rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--border);
}

.tech-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: center;
}

/* Left: description */
.tech-left {
  position: relative;
}
.tech-left .section-title {
  margin-bottom: 1.2rem;
}
.tech-desc {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Right wrapper */
.tech-right {
  position: relative;
  min-width: 0;
}

/* Row: arrow – carousel – arrow */
.tech-carousel-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
}

/* Arrows — flex items, outside cards */
.tech-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.tech-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(228,47,53,0.04);
  box-shadow: 0 4px 18px rgba(228,47,53,0.12);
  transform: scale(1.08);
}

/* Carousel viewport */
.tech-carousel {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
}
.tech-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.tech-slide {
  min-width: 50%;
  padding: 0 0.4rem;
  box-sizing: border-box;
}

/* Dots — below carousel, centered */
.tech-dots {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  margin-top: 1.2rem;
}
.tech-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.35s;
  cursor: pointer;
}
.tech-dot.active {
  background: var(--accent);
  width: 26px;
  border-radius: 4px;
}

/* Card */
.tech-card {
  padding: 1.8rem 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  height: 100%;
}
.tech-card:hover {
  border-color: rgba(228,47,53,0.15);
  box-shadow: 0 12px 32px rgba(228,47,53,0.07);
}

.tech-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 1rem;
}

.tech-card h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.8rem;
}

.tech-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tech-list li {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding-left: 1rem;
  position: relative;
}
.tech-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

/* ============================================================
   WHY US
   ============================================================ */

.why-us { background: var(--bg-soft); }

.why-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem; margin-top: 1.8rem;
}

.why-card {
  padding: 1.8rem 1.3rem;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); text-align: center;
  transition: all 0.4s; box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.why-card:hover {
  border-color: rgba(228,47,53,0.18);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(228,47,53,0.07);
}
.why-card h4  { font-size: 0.92rem; font-weight: 600; color: var(--navy); margin-bottom: 0.4rem; }
.why-card p   { font-size: 0.8rem; line-height: 1.6; color: var(--text-muted); }

/* ============================================================
   CONTACT
   ============================================================ */

.contact { background: var(--bg); position: relative; overflow: hidden; }
.contact::before {
  content: ''; position: absolute;
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(228,47,53,0.035), transparent 70%);
  top: -100px; right: -100px; border-radius: 50%;
}

/* Titolo centrato in cima */
.contact-top {
  text-align: center;
  margin-bottom: 2.8rem;
}
.contact-top .section-subtitle { margin: 0 auto; }

/* Layout form + sedi */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  position: relative; z-index: 2;
  align-items: start;
}

/* ----- Form ----- */
.contact-form {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.2rem;
  box-shadow: 0 4px 18px rgba(0,0,0,0.035);
}

.form-group          { margin-bottom: 1rem; }
.form-group label    { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text); margin-bottom: 0.3rem; }

.form-group input,
.form-group textarea {
  width: 100%; padding: 0.75rem 0.9rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.87rem;
  transition: all 0.3s; outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-faint); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(228,47,53,0.07);
}
.form-group textarea { height: 105px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

.btn-submit {
  width: 100%; padding: 0.9rem;
  background: var(--accent); color: #fff; border: none;
  border-radius: 8px; font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: all 0.3s; margin-top: 0.3rem;
  box-shadow: 0 4px 14px rgba(228,47,53,0.2);
}
.btn-submit:hover {
  background: var(--royal); transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(228,47,53,0.28);
}

/* ----- Sedi ----- */
.contact-sedi {
  display: flex; flex-direction: column; gap: 1rem;
}

.sede-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.sede-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 3px 0 0 3px;
  opacity: 0;
  transition: opacity 0.3s;
}
.sede-card:hover {
  border-color: rgba(228,47,53,0.2);
  box-shadow: 0 6px 20px rgba(228,47,53,0.07);
  transform: translateX(4px);
}
.sede-card:hover::before { opacity: 1; }

.sede-type {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.25rem;
}
.sede-city {
  font-size: 0.95rem; font-weight: 600;
  color: var(--navy); margin-bottom: 0.3rem;
}
.sede-address {
  font-size: 0.82rem; color: var(--text-muted);
  line-height: 1.5; margin-bottom: 0.5rem;
}
.sede-map {
  font-size: 0.78rem; font-weight: 600;
  color: var(--accent); text-decoration: none;
  transition: color 0.3s;
}
.sede-map:hover { color: var(--royal); text-decoration: underline; }

/* LinkedIn */
.linkedin-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: #0A66C2 !important; font-size: 0.92rem; font-weight: 600;
  text-decoration: none !important; transition: all 0.3s;
}
.linkedin-link:hover { color: #004182 !important; }
.linkedin-link svg { flex-shrink: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .contact-wrapper { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .about-body {
    margin-top: 1.2rem;
  }

  .about-body p {
    font-size: 0.97rem;
    line-height: 1.75;
  }

  .cert-logos {
    gap: 1.1rem;
    margin-top: 1.8rem;
  }

  .cert-logo-item {
    flex: 1 1 140px;
  }

  .cert-logo-item img {
    height: 64px;
  }

  .services-header {
    margin-bottom: 1.8rem;
  }

  .services-description {
    margin-bottom: 2rem;
  }

  .services-description p {
    font-size: 0.97rem;
    line-height: 1.75;
  }

  .services-icons-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 3rem;
  }

  .service-icon-circle {
    width: 50px;
    height: 50px;
  }

  .service-icon-item span {
    font-size: 0.78rem;
  }

  .tech-section {
    padding-top: 2.5rem;
  }

  .tech-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tech-left {
    text-align: center;
  }
  .tech-left .section-label {
    justify-content: center;
  }

  .tech-desc {
    font-size: 0.95rem;
    max-width: 100%;
    margin: 0 auto;
  }

  .tech-right {
    width: 100%;
    max-width: 100%;
  }

  .tech-carousel-row {
    gap: 0.5rem;
  }

  .tech-slide {
    min-width: 100%;
  }

  .tech-arrow {
    width: 36px;
    height: 36px;
  }
  .tech-arrow svg {
    width: 16px;
    height: 16px;
  }

  .tech-card {
    padding: 1.4rem 1.2rem;
  }

  .tech-card h4 {
    font-size: 0.92rem;
  }

  .tech-list li {
    font-size: 0.8rem;
  }

  .tech-dots {
    margin-top: 1rem;
  }

  .why-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .why-card {
    padding: 1.35rem 1.1rem;
    border-radius: 14px;
  }

  .why-card h4 {
    font-size: 1rem;
  }

  .why-card p {
    font-size: 0.86rem;
    line-height: 1.62;
  }

  .contact-top {
    margin-bottom: 1.9rem;
  }

  .contact-wrapper {
    gap: 1.25rem;
  }

  .contact-form {
    padding: 1.35rem;
    border-radius: 14px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.85rem 0.9rem;
    font-size: 16px;
  }

  .contact-sedi {
    gap: 0.85rem;
  }

  .sede-card {
    padding: 1rem 1.1rem;
  }

  .sede-card:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .about-body p {
    font-size: 0.93rem;
  }

  .cert-logo-item {
    flex-basis: 120px;
  }

  .services-header,
  .contact-top {
    margin-bottom: 1.5rem;
  }

  .services-icons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
  }

  .service-icon-circle {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .service-icon-item span {
    font-size: 0.75rem;
  }

  .tech-carousel-row {
    gap: 0.35rem;
  }

  .tech-arrow {
    width: 30px;
    height: 30px;
  }
  .tech-arrow svg {
    width: 13px;
    height: 13px;
  }

  .tech-card {
    padding: 1.2rem 1rem;
  }

  .tech-card,
  .why-card,
  .contact-form,
  .sede-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .contact::before {
    width: 260px;
    height: 260px;
    top: -60px;
    right: -90px;
  }

  .linkedin-link {
    font-size: 0.86rem;
  }
}