/* --- VARIABILI COLORI --- */
:root {
  --primary: #7127b3;
  --primary-light: #853dc8;
  --primary-dark: #480092;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --text-dark: #1a1a1a;
  --text-gray: #555555;
  --border-radius: 8px;
}

/* --- RESET & BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--white);
}

h1,
h2,
h3,
h4,
.btn {
  font-family: "Montserrat", sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}
.bg-light {
  background-color: var(--off-white);
}
.bg-dark {
  background-color: var(--primary-dark);
  color: var(--white);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 10px;
  color: var(--primary);
}

.section-subtitle {
  text-align: center;
  color: var(--text-gray);
  margin-bottom: 50px;
}

/* --- HEADER --- */
.header {
  background-color: var(--primary-dark);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 35px;
  display: block;
}

.nav-menu ul {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-menu a {
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: #dcbfff;
}

.btn-nav {
  background-color: var(--primary-light);
  padding: 8px 18px;
  border-radius: 20px;
  transition: all 0.5s ease !important;
}

.btn-nav:hover {
  background-color: var(--white) !important;
  color: var(--primary) !important;
}

/* --- HAMBURGER MENU (Default nascosto) --- */
.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: var(--white);
}

/* --- HERO --- */
.hero {
  background: linear-gradient(
    to bottom,
    var(--primary-dark) 0%,
    var(--primary) 100%
  );
  color: var(--white);
  padding: 120px 0 100px;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background-color: var(--white);
  color: var(--primary);
}

.btn-outline {
  border: 2px solid var(--white);
  color: var(--white);
  margin-left: 15px;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* --- GRID SYSTEM --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* --- CARDS SERVIZI --- */
.card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
  border-top: 4px solid var(--primary);
}

.card:hover {
  transform: translateY(-5px);
}
.card h3 {
  margin-bottom: 15px;
  color: var(--primary);
}
.card p {
  color: var(--text-gray);
}

/* --- SCREENS --- */
#showcase {
  background-color: var(--white);
  /* Se vuoi spezzare il bianco tra le sezioni, puoi decommentare la riga sotto per renderlo grigio chiaro */
  /* background-color: var(--off-white); */
}

.ui-gallery {
  /* Assicura che gli elementi siano centrati se lo schermo è molto largo */
  justify-items: center;
  align-items: center;
}

.ui-item {
  text-align: center;
  position: relative;
  transition: transform 0.4s ease;
}

/* Effetto Hover sull'intero blocco */
.ui-item:hover {
  transform: translateY(-10px);
}

.phone-mockup {
  width: 100%;
  max-width: 280px; /* Dimensione realistica per non farli enormi su desktop */
  height: auto;
  border-radius: 35px; /* Arrotondamento simile a iPhone moderne */

  /* Simulazione bordo telefono elegante */
  border: 8px solid #2c2c2c;
  box-shadow:
    0 0 0 2px #444,
    /* Bordo esterno sottile */ 0 20px 40px rgba(0, 0, 0, 0.2); /* Ombra profonda */

  display: block;
  margin: 0 auto;
}

/* --- METODO (STEPS) --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.step {
  text-align: center;
  padding: 20px;
}

.step-number {
  display: inline-block;
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(113, 39, 179, 0.2);
  margin-bottom: 10px;
}

.step h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--primary);
}

/* --- CHI SONO --- */
.tech-tags span {
  display: inline-block;
  background-color: var(--off-white);
  color: var(--primary);
  padding: 5px 15px;
  border-radius: 5px;
  font-size: 0.9rem;
  margin-right: 5px;
  margin-top: 10px;
  border: 1px solid #ddd;
  font-weight: 600;
}

/* --- FORM CONTATTI --- */
.contact-container {
  display: flex;
  justify-content: center;
}

.form-wrapper {
  background-color: var(--white);
  padding: 40px;
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 600px;
  color: var(--text-dark);
}

.form-wrapper h2 {
  color: var(--primary);
  margin-bottom: 10px;
}
.form-wrapper p {
  color: var(--text-gray);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border 0.3s;
}

textarea {
  resize: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(113, 39, 179, 0.1);
}

.btn-full {
  width: 100%;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-full:hover {
  background-color: var(--primary-dark);
}

/* --- FOOTER --- */
footer {
  background-color: #2e005e;
  color: var(--white);
  padding: 10px 0;
  text-align: center;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.6;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: var(--white);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 850px) {
  .header .container {
    position: relative;
    justify-content: center;
  }

  .hamburger {
    display: block;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 0;
    gap: 0;
    flex-direction: column;
    background-color: var(--primary-dark);
    width: 100%;
    height: 100vh;
    text-align: center;
    transition: 0.3s;
    z-index: 1000;
    padding-top: 100px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 40px;
  }

  .nav-menu a {
    font-size: 1.5rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  .btn-outline {
    margin-left: 0;
  }

  .phone-mockup {
    max-width: 240px; /* Leggermente più piccoli su mobile per non occupare tutto */
    border-width: 6px;
  }
}
