/*--------------------------------------------------------------
# General Styling & Shared Classes
--------------------------------------------------------------*/
:root {
  --default-font: "Roboto",  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Raleway",  sans-serif;
  --nav-font: "Poppins",  sans-serif;

  --first-color: #ffffff; 
  --second-color: #4e4e4e; 
  --third-color: #0a090f;
  --quarter-color: #3393ff;  

  scroll-behavior: smooth;
}

body {
  color: var(--second-color);
  background-color: var(--first-color);
  font-family: var(--default-font);
}

a {
  color: var(--quarter-color);
  text-decoration: none;
  transition: 0.3s;
  font-family: var(--default-font);
}

a:hover {
  color: color-mix(in srgb, var(--quarter-color), transparent 25%);
  text-decoration: none;
}

h1,h2,h3,h4,h5,h6 {
  color: var(--third-color);
  font-family: var(--heading-font);
}

p{
   font-family: var(--heading-font);
   font-size: 1rem;
   font-weight: 300;
}

.start{
  padding: 1em;
  border: none;
  background-color: var(--quarter-color);
  color: var(--first-color);
  font-size: 1em;
  border-radius: 20px;
  cursor:pointer;
}

.name{
  font-weight: bold;
  font-size: 3.2rem;
}

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  overflow: hidden;
  background: var(--first-color);
  transition: all 0.6s ease-out;
}

#preloader:before {
  content: "";
  position: fixed;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid var(--first-color);
  border-color: var(--quarter-color) transparent var(--quarter-color) transparent;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: animate-preloader 1.5s linear infinite;
}

@keyframes animate-preloader {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Scroll Top Button
--------------------------------------------------------------*/
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--quarter-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: var(--first-color);
  line-height: 0;
}

.scroll-top:hover {
  background-color: color-mix(in srgb, var(--quarter-color), transparent 20%);
  color: var(--first-color);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  bottom: 15px;
}
/*--------------------------------------------------------------
# Global Sections
--------------------------------------------------------------*/
section,
.section {
  color: var(--second-color);
  background-color: var(--first-color);
  padding: 60px 0;
  scroll-margin-top: 92px;
  overflow: clip;
}

/*--------------------------------------------------------------
# Navbar And Other
--------------------------------------------------------------*/
.grid-container {
    width: 100%;
    display: flex;
    height: 45em;
  }

  .div1{
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: left;
}

.more-button{
    padding: 0.9em;
    border: none;
    background-color: var(--quarter-color);
    color: var(--first-color);
    font-size: 1em;
    border-radius: 20px;
    cursor:pointer;
    font-family: var(--default-font);
    font-weight: normal;
}

.div1 > h1{
    font-size: 2em;
}

.text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
}

.div2{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.div2 > img{
    width: 50%;
}

#logo {
    width:40%;
    height: auto;
    transform: translateX(0px);
    animation: float 7s ease-out infinite;
}

@keyframes float {
0%, 100% { 
    transform: translateY(0); 
    }
50% { 
    transform: translateY(-25px);
    }
}
.navbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 20px;
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--quarter-color); 
}

.navbar-links {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-links li {
    padding: 0 15px;
}

.navbar-links a {
    font-size: 1.1em;
    font-family: var(--nav-font);
    text-decoration: none;
    color: var(--first-color);
}

.navbar-links a:hover{
    color: var(--first-color);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.line {
    width: 100%;
    height: 3px;
    background-color: var(--first-color);
}

.headertwo {
  font-size: 1.1rem;
}

/*--------------------------------------------------------------
# About Section
--------------------------------------------------------------*/
.about-me{ 
  text-align: center;
}

.about-me-tittle{
  font-size: 2rem;
  position: relative;
  padding-bottom: 5px;
  font-weight: 600;
}

.about-me h4::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 64px;
  height: 3px;
  background: var(--quarter-color);
}

.about .container {
  background-color: var(--first-color);
  box-shadow: 0px 2px 15px #0000001a;
  padding: 30px;
}

.about {
  font-size: 20px;
  position: relative;
  padding-bottom: 5px;
  font-weight: 600;
}

#profile-img{
  height: 250px;
  width: 250px;
}

strong {
  font-weight: bold;
}

span{
  color:black;
}

.here{
  font-weight: bold;
}

.tittle{
  color: var(--quarter-color);
}

.skill-div{
  font-size: 1.0rem; 
  text-align: left;
  margin-top: 0.5rem;
}

.skill-ul{
  padding-left: 1.2rem; 
  margin-top: 0.5rem;
  font-weight: normal;
}

.btn-icon {
    color: var(--quarter-color);
    transition: all 0.3s ease;
    margin-left: 20px;
    line-height: 2.0;  
}

.btn-icon:hover {
    transform: scale(2.0);
}

.btn-icon:active {
    transform: scale(1.9);
}

.btn-icon:hover {
    color: var(--quarter-color);
}

/*--------------------------------------------------------------
# Servizi Section
--------------------------------------------------------------*/
.servizi{ 
  text-align: center;
}

.servizi-tittle{
  font-size: 2rem;
  position: relative;
  padding-bottom: 5px;
  font-weight: 600;
}

.servizi h2:after {
  content: "";
  justify-content: center;
  display: block;
  width: 64px;
  height: 3px;
  background: var(--quarter-color);
  left: 0;
  bottom: 0;
  margin: auto;
}

.servizi .servizi-item {
  background-color: var(--first-color);
  box-shadow: 0px 5px 90px 0px #0000001a;
  padding: 60px 30px;
  border-radius: 18px;
  border-bottom: 5px solid var(--first-color);
  height: 100%;
  border-color: var(--quarter-color);
}

.servizi .servizi-item .icon {
  font-size: 20px;
  color: var(--quarter-color);
  width: 56px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease-in-out;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--quarter-color), transparent 40%);
  margin-right: 15px;
}

.servizi-item:hover .icon {
  background: var(--quarter-color);
  color: var(--first-color);

}

.servizi .servizi-item h3 {
  font-weight: 700;
  margin: 10px 0 15px 0;
  font-size: 22px;
}

.servizi .servizi-item p {
  line-height: 24px;
  font-size: 16px;
  margin-bottom: 0;
}

/*--------------------------------------------------------------
# Lavori
--------------------------------------------------------------*/
.title-container {
      text-align: center;
      margin-bottom: 30px;
    }

    .section-title {
      font-size: 1.8rem;
      font-weight: 600;
      margin-bottom: 4px;
      display: inline-block;
    }

    .title-underline {
      width: 60px;
      height: 4px;
      background-color: var(--quarter-color);
      margin: 0 auto;
      display: block;
    }
    
    img{
      max-width: 100%;
    }
    
    .gallery{
      padding: 80px 0;
    }
    
    .gallery img{
      background-color: #ffffff;
      padding: 15px;
      width: 100%;
      box-shadow: 0 0 15px rgba(0,0,0,0.3);
      cursor: pointer;
    }
    
    #gallery-modal .modal-img{      
      width: 100%;
    }
    
    .modal-header {
      border-bottom: none
    }
/*--------------------------------------------------------------
# Contatti
--------------------------------------------------------------*/
.contact-bg{
  background-color: var(--first-color);
}

.contact {
  background-color: var(--first-color);
  padding: 30px;
  border-radius: 12px;
}

.contact input,
.contact textarea {
  font-size: 1rem;
  padding: 12px 15px;
  border: 1px solid color-mix(in srgb, var(--second-color), transparent 80%);
  border-radius: 8px;
  color: var(--second-color);
  background-color: color-mix(in srgb, var(--first-color), #000 2%);
  width: 100%;
  box-sizing: border-box;
  font-family: var(--default-font);
}

.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-color: var(--quarter-color);
  box-shadow: 0 0 5px rgba(51, 147, 255, 0.2);
}

.contact input::placeholder,
.contact textarea::placeholder {
  color: color-mix(in srgb, var(--second-color), transparent 70%);
  font-style: italic;
}

.terms-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: var(--second-color);
}

.terms-wrapper input[type="checkbox"] {
  accent-color: var(--quarter-color);
  margin: 0;
  flex-shrink: 0;
}

.terms-wrapper label {
  margin: 0;
  line-height: 1.4;
}

.contact button[type="submit"] {
  color: var(--first-color);
  background: var(--quarter-color);
  border: 0;
  padding: 12px 30px;
  transition: 0.4s;
  border-radius: 50px;
  font-weight: 500;
  font-family: var(--default-font);
  cursor: pointer;
}

.contact button[type="submit"]:hover {
  background: color-mix(in srgb, var(--quarter-color), transparent 20%);
  transform: translateY(-2px);
}

.contact .loading,
.contact .error-message,
.contact .sent-message {
  font-size: 0.9rem;
  margin-top: 10px;
}

.contact .loading {
  display: none;
  color: var(--second-color);
}

.contact .error-message {
  display: none;
  color: #e74c3c;
}

.contact .sent-message {
  display: none;
  color: #27ae60;
}

.privacy-text {
  font-size: 0.9rem;
  color: var(--second-color);
  line-height: 1.5;
}

.terms-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 0.95rem;
  color: var(--second-color);
}

.terms-wrapper input[type="checkbox"] {
  accent-color: var(--quarter-color);
  margin: 0;
}

.terms-wrapper label {
  margin: 0;
  line-height: 1.4;
}
/*--------------------------------------------------------------
# For Mobile
--------------------------------------------------------------*/
@media (max-width: 575px) {
  .contact {
    padding: 20px;
  }
}

@media (max-width: 768px) {
[data-aos-delay] {
    transition-delay: 0;
  }

section, .section {
    scroll-margin-top: 76px;
  }

.grid-container {
    flex-direction: column-reverse;
    height: auto;
  }

  .div1{
      width: 100%;
      height: auto;
  }
      
  .div2{
    width: 100%;
    min-height: 200px;
  }

  .div2.add-margin {
    margin-top: 190px;
  }

  #logo{
    width: 50%;
    margin-top: 6.5em;
    width: 250px;
    height: 250px;
    z-index: 1;
  }

  .navbar-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 40px;
    left: 0;
    background-color: var(--quarter-color);
    width: 100%;
    gap: 0;
  }

  .navbar-links a {
    color:var(--first-color);
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-links li {
    padding: 10px;
    text-align: center;
  }

  .hamburger-menu {
    display: flex;
  }

  .about-me{
    text-align: center;
  }

  #profile-img{
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .servizi {
    display: block;
  }

  .servizi .servizi-item {
    background-color: var(--first-color);
    box-shadow: 0px 5px 90px rgba(0, 0, 0, 0.1); 
    padding: 60px 30px;
    transition: all 0.3s ease-in-out;
    border-radius: 18px;
    border-bottom: 5px solid var(--first-color);
    height: 100%;
  }

  .servizi .servizi-item h3 {
    font-weight: 700;
    margin: 10px 0 15px 0;
    font-size: 22px;
    transition: 0.3s ease-in-out;
  }

  .servizi .servizi-item p {
    line-height: 24px;
    font-size: 16px;
    margin-bottom: 0;
    color: var(--default-font);
  }

  .servizi .servizi-item:hover {
    transform: translateY(-10px);
    border-color: var(--quarter-color);;
  }

  .servizi .servizi-item:hover h3 {
    color: var(--quarter-color);
  }

}

@media screen and (max-width: 1900px){
    #logo{
      width: 50%;
      margin-top: 6.5em;
      width: 350px;
      height: 350px;
      z-index: 1;
    }
}