* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    background: #fafafa;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.container {
    width: 100%;
    background: #fff;
    margin: 0 auto;
    max-width: 1180px;
    box-shadow: 0 0 0 1.5px #f5f4f4;
}
header {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
header nav ul {
  display: flex;
  padding-left: 0.75rem;  
  padding-right: 0.75rem;
  font-size: 0.875rem; 
  font-weight: 500;  
  color: #27272a; 
  background-color: rgba(255, 255, 255, 0.9); 
  border-radius: 9999px;  
  box-shadow: 0 10px 15px -3px rgba(39, 39, 42, 0.05), 
              0 4px 6px -2px rgba(39, 39, 42, 0.05); 
  backdrop-filter: blur(4px); 
  border: 1px solid rgba(24, 24, 27, 0.05); 
}
header nav {
   transition: all .3 ease-in;
}
ul li {
    list-style: none;
}
header nav ul li a {
  position: relative;
  display: block;
  padding: 0.75rem; 
  transition: color 0.3s ease;
  color: inherit; 
  text-decoration: none;
}
header nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: #2563EB; 
  transition: width 0.3s ease;
  border-radius: 9999px;
}

header nav ul li a:hover::after {
  width: 100%;
}



.hero-glow {
  position: absolute;
  left: 100px;
  top: 0px;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle at center,
    #2563EB,
    #1E40AF,
    transparent 70%
  );
  filter: blur(160px);
  opacity: 1;
  z-index: 1;


}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
    padding: 80px 40px;
    position: relative;

}

 .hero-text {
      flex: 1 1 400px;
      z-index: 2;
      position: relative;
    }

    .hero-text h1 {
      font-size: 3.6rem;
      font-weight: 700;
      margin-bottom: 20px;
      position: relative;
      z-index: 100;
    }

    .hero-text p {
      font-size: 1.2rem;
      color: #6B7280;
      margin-bottom: 30px;
     
      position: relative;
      z-index: 100;
    }

    .cta {
      display: inline-block;
      padding: 12px 26px;
      margin: 10px 10px 0 0;
      border-radius: 30px;
      font-size: 1rem;
      text-decoration: none;
      font-weight: 500;
      transition: all 0.3s ease, color 0.3s ease;
      z-index: 100;
      position: relative;
    }

    .btn-primary {
      background-color: #2563EB;
      color: white;
    }

    .btn-primary:hover {
      background-color: #1E40AF;
    }

    .btn-secondary {
      color: #2563EB;
      border: 2px solid #2563EB !important;
    }

    .btn-secondary:hover {
      background-color: #2563EB;
      color: white;
    }

    .hero-image {
      flex: 1 1 400px;
      text-align: center;
      position: relative;
      display: flex;
      justify-content: center;
      z-index: 2;
    }

    .hero-image img {
      max-width: 100%;
      position: absolute;
      top: 0px;
      left: 50%;
      transform: translateX(-50%);
      height: 100%;
    }


    .blob {
      width: 400px;
      height: 400px;
      background: #E9EFFD;
      border-radius: 50%;
      z-index: 0;
    }
.hero svg {
    stroke: oklch(92.8% .006 264.531);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
     mask-image: linear-gradient(
  to bottom,
  transparent 0%,
  white 10%,
  white 90%,
  transparent 100%
);
-webkit-mask-image: linear-gradient(
  to bottom,
  transparent 15%,
  white 40%,
  white 60%,
  transparent 100%
);
}
.services-section {
  padding: 120px 40px;
}

.services-container {
  text-align: center;
}

.section-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: #6B7280;
  max-width: 700px;
  margin: 0 auto 50px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.card {
  background: #fff;
  border: 1px solid #f5f4f4;
  border-radius: 16px;
  padding: 30px;
  text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
}

.card-icon {
  background: #E9EFFD;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563EB;
  font-size: 24px;
  margin-bottom: 20px;
}
.card.react {
  top: 20px;
}
.card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #000;
}

.card-desc {
  font-size: 1rem;
  color: #6B7280;
  margin-bottom: 20px;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.card-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #000;
}

.card-list li i {
  color: #2563EB;
  margin-right: 8px;
}

.cta.btn-primary {
  background-color: #2563EB;
  color: #fff;
  padding: 10px 22px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
  transition: background 0.3s ease;
}

.cta.btn-primary:hover {
  background-color: #1E40AF;
}

.about-section {
  padding: 80px 0px;
}

.about-container {
  position: relative;
}

.about-text {
  width: 50%;
  z-index: 100;
  padding: 20px;
}

.about-container h2 {
   font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1e1e1e;
  line-height: 1.3;
  text-align: center;
}

.about-text p {
  font-size: 1.125rem;
  color: #4b5563;
  margin-bottom: 16px;
  line-height: 1.6;
  max-width: 550px;
}

.about-image {
  width: 50%;
}

.about-image img {
  max-width: 100%;
  height: auto;
}
.portfolio-section {
  padding: 60px 40px;
  margin: 0 auto;
  position: relative;
}

.portfolio-section h2 {
  font-size: 3.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
}

.portfolio-section p {
  text-align: center;
  color: #6b7280;
  margin-bottom: 50px;
  font-size: 1.1rem;
}

.portfolio-collage {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin: 0 auto;
}

.collage-item {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.07);
  width: 340px;
  position: relative;
  top: var(--top);
  transform: rotate(var(--rotate));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  z-index: 1;
}

.collage-item:hover {
  transform: rotate(0) scale(1.05);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  z-index: 10;
}

.collage-item img {
  width: 100%;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.collage-item h3 {
  font-size: 1.3rem;
  text-align: center;
  color: #1f2937;
}

.flex {
  display: flex;
  align-items: flex-start; 
  padding-left: 20px;
  padding-right: 40px;
  gap: 10px;
}

.flex .about-text {
  width: 50%;
}
.flex .about-text p {
  max-width: initial !important;
}
.flex .about-image {
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.flex .about-image img {
  max-height: auto; 
  width: 100%;
}


.icon {
  position: absolute;
  background: #2563EB;
  color: white;
  font-weight: bold;
  font-family: Arial, sans-serif;
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 3rem;
  user-select: none;
  cursor: default;
  z-index: 999;
}

.icon.html {
  top: -7%;
  left: 50%;
  transform: translateX(-50%) rotate(-15deg);
}
.icon.css {
  top: 35%;
  right: 5%;
  transform: rotate(15deg);
}
.icon.js {
  bottom: 20%;
  right: 10%;
  transform: rotate(-10deg);
}
.icon.react {
  bottom: 6%;
  left: 10%;
  transform: rotate(10deg);
}
.icon.wp {
  top: 30%;
  left: 4%;
  transform: rotate(-10deg);
}
nav.active {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}
.contact-section {
  padding: 80px 40px;
  background: #fff;
}

.contact-container {
  margin: 0 auto;
  text-align: center;
}

.contact-form {
  margin: 40px auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 6px;
  font-weight: 600;
  color: #111827;
}

.form-group input,
.form-group textarea {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  background: #f9fafb;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #2563EB;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form .btn-primary {
  align-self: flex-start;
  padding: 12px 28px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
}

@media(min-width: 1920) {
    .container {
        max-width: 80rem;
    }
}
/* Overlay generale - inizialmente nascosto */
#quote-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.3);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999999;
}

/* Popup form centrato */
#quote-form {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 40px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  z-index: 9999999;
  position: relative;
}

/* Titolo del form */
#quote-form h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #1E3A8A;
}

/* Sottotitolo */
#quote-form p {
  color: #6B7280;
  margin-bottom: 30px;
}

/* Griglia opzioni */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* Pulsante invio */
#calculator-form button[type="submit"] {
  background-color: #1E3A8A;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

#calculator-form button[type="submit"]:hover {
  background-color: #3B5BC2;
}

/* Blocchi select */
.select-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.select-block select {
  padding: 12px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 1rem;
}

.select-block label {
  font-weight: 600;
  color: #1E3A8A;
}

/* Opzioni checkbox */
.option-item {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  padding: 15px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Blur sul body quando il popup è attivo */
body.popup-active {
  overflow: hidden;
}

/* STILE GLOBALE: input & select */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="checkbox"],
select {
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* OUTLINE BLU SU FOCUS */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: #1E3A8A;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.2);
}

.option-item:has(input[type="checkbox"]:focus) {
  border-color: #1E3A8A;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.2);
}
.close-quote {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
}
.cta {
  border: none;
  cursor: pointer;
}
.toast-success {
  background: #fff !important;
  color: #6B7280 !important;
  font-weight: 500;
  border-left: 5px solid #16A34A;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  gap: 10px;
  min-width: 250px;
  position: relative;
}

.toast-close {
  background: transparent;
  border: none;
  color: #000 !important;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  position: absolute;
  top: 0px;
  right: 0px;
}

footer a {
    display: flex
;
    flex-direction: column;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    background: #fff;
    margin-bottom: 10px;
    margin-top: 10px;
    text-align: center;
    padding: 10px;
    color: #333;
    padding-right: 20px;
    font-family: 'Montserrat', sans-serif;
    border-radius: 10px;
    position: relative;
}
footer a img {
    width: 40px;
    height: 20px;
}
footer a .icons {
    margin-top: 10px;
}
footer a .icons i {
    color: #fdb44b;
}
footer {
      display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
footer a::after {
    position: absolute;
    content: '';
    background: #fff;
    top: 20px;
    right: -23px;
    width: 30px;
    height: 30px;
    -webkit-clip-path: polygon(0 0, 0% 100%, 100% 100%);
    clip-path: polygon(0 0, 0% 100%, 100% 100%);
    border-radius: 5px;
}
.open-nv {
  display: none !important;
}
@media (max-width: 768px) {
  nav.active {
    position: initial;
    transform: initial;
    overflow: hidden;
     max-height: 0;
    transition: max-height 0.5s ease;
  }
  nav.active.open {
   max-height: 500px;
  }
  .open-nv {
    display: block !important;
    margin-left: auto;
  }
  footer {
    gap: 10px;
  }
  header {
    flex-direction: column;
    gap: 10px;
  }
  nav {
    width: 90%;
  }
  .flex .about-image {
    margin-bottom: 50px;
  }
  .flex .about-image::before, .flex .about-image::after {
    height: initial;
    aspect-ratio: 1/1;
  }
section {
  padding-top: 0px !important;
}
  header {
    padding: 15px 10px;
  }
  .about-text  {
    text-align: center;
  }
  .about-image {
    margin-top: 20px;
  }
  header nav ul {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.5rem;
      flex-direction: column;
    border-radius: 0px;
    box-shadow: none;
    border: none;
    width: 100%;
  }
  header nav ul li {
    margin: 5px 8px;
  }

  .hero {
    flex-direction: column;
    padding: 40px 20px !important;
    gap: 30px;
    overflow: hidden;
    border-top-left-radius: 30px;
     border-top-right-radius: 30px;
  }

  .hero-text, .hero-image {
    flex: 1 1 100%;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

.hero-image img{
    position: absolute;
    height: auto;
    max-width: 60%;
}

  .blob {
    width: 250px;
    height: 250px;
  }

  .services-section, .contact-section, .portfolio-section {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  .section-subtitle {
    font-size: 1rem;
    max-width: 90%;
    margin-bottom: 40px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-section {
    padding: 60px 20px;
  }

  .about-text, .about-image, .flex .about-text, .flex .about-image {
    width: 100%;
    padding: 0;
  }

  .about-container h2 {
    font-size: 2.5rem;
    text-align: center;
  }

  .about-text p {
    max-width: 100%;
    text-align: center;
  }

  .flex {
    flex-direction: column;
    padding-left: 0px;
    padding-right: 0px;
  }

  .flex .about-image img {
    margin: 0;
  }

  .portfolio-collage {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .collage-item {
    width: 100%;
    transform: none !important;
    top: 0 !important;
  }

  .contact-form {
    max-width: 100%;
    padding: 0 10px;
  }

  .form-group input, .form-group textarea {
    font-size: 0.9rem;
  }

  footer {
    padding: 20px 10px;
  }

  footer a {
    font-size: 0.85rem;
    margin: 5px 0;
  }

  footer a img {
    width: 30px;
    height: 15px;
  }

  .icon {
    font-size: 1.5rem;
    padding: 4px 8px;
  }
  .icon.html {
    top: -40%;
  }
      .icon.css {
        top: 35%;
        right: 6%;
  }
    .icon.js {
        bottom: -43%;
        right: 42%;
    }
  .icon.wp {
    top: -10%;
    left: 4%;
  }
  #quote-form {
    width: 95%;
    padding: 30px 10px;
  }
  .toastify {
    max-width: calc(90% - 20px) !important;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {

  .hero-text h1 {
    font-size: 3rem;
  }

  .section-title {
    font-size: 3rem;
  }

  .about-container h2 {
    font-size: 3rem;
  }

  .blob {
    width: 300px;
    height: 300px;
  }

  .collage-item {
    width: 280px;
  }
}
