@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap");

/********************************************************************************
Variables
*/

:root {
  --primary-color: #154360;
  --secondary-color: #fd7d13;
  --light-color: #f3f3f3;
  --dark-color: #333;
  --overlay-color: rgba(0, 0, 0, 0.6);
  --nav-color: rgba(99, 99, 99, 0.4);
  --max-width: 1400px;
  --logo-width: 160px;
}

/********************************************************************************
Reset CSS
*/

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/********************************************************************************
Utility CSS
*/

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  color: #fff;
  background: black;
}

ul {
  list-style: none;
  display: flex;
}

li {
  padding: 0 15px;
  font-size: 1.2rem;
}

a {
  text-decoration: none;
  color: #fff;
}

i {
  font-size: 3rem;
  color: var(--secondary-color);
}

.vl {
  border-left: 1px dotted var(--secondary-color);
}

.container {
  /* Container principale per limitare la larghezza*/
  max-width: var(--max-width);
}

.flex-row {
  display: flex;
  justify-content: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.btn {
  margin-top: 20px;
  padding: 15px 40px;
  cursor: pointer;
  display: block;
  border: none;
  border-radius: 5px;
  transition: 0.5s;
}

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

.btn-primary:hover {
  background: var(--secondary-color);
  color: var(--dark-color);
  opacity: 0.7;
}

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

.btn-secondary:hover {
  background: var(--primary-color);
  color: var(--light-color);
  opacity: 0.7;
}

.bg-colored {
  background: var(--primary-color);
  color: var(--light-color);
}

.bg-white {
  background: white;
  color: var(--dark-color);
}

/********************************************************************************
HEADER
*/

.hero {
  background: url(../img/showcase.jpg) no-repeat center center/cover;
  height: 100vh;
  /* Consente il posizionamento assoluto dei child */
  position: relative;
}

.hero * {
  /* Alza IL CONTENUTO di hero. */
  z-index: 1;
}

/* Crea l'effetto overlay opaco */
.hero:before {
  content: "";
  /* La posizione è absolute rispetto ad hero che è relative  */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-color);
  border-bottom: 5px solid var(--secondary-color);
}

/* Navbar */
.nav-container {
  /* Fascia larga come tutto lo schermo */
  width: 100%;
  background: var(--nav-color);
  display: flex;
  justify-content: center;
  /*La barra superiore non si muove con lo scroll*/
  position: fixed;
  transition: 0.5s;
}

.nav-container.top {
  /* Classe per lo scroll gestita da javascript */
  background: transparent;
}

.navbar {
  display: flex;
  align-items: center;
  /*Mette il logo a SX e il menu a DX*/
  justify-content: space-between;
  /* Occupa tutto lo spazio del container*/
  width: 100%;
  padding: 10px 20px 0 20px;
}

.logo img {
  width: var(--logo-width);
  margin-left: 50px;
}

ul li a:hover {
  /* Trattino sotto alla voce del menu */
  padding-bottom: 10px;
  border-bottom: var(--secondary-color) 2px solid;
  transition: 0.3s;
}

/* Showcase */
.showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.showcase h1 {
  font-size: 3.5rem;
  padding: 0px 50px;
  text-align: center;
}

.showcase p {
  font-size: 2rem;
  margin: 0 0 20px;
  padding: 0px 10px;
  text-align: center;
}

/********************************************************************************
ABOUT
*/

#about {
  border-bottom: var(--secondary-color) 5px solid;
}

.about-image {
  background: url(../img/about.jpg) no-repeat center center/cover;
  flex: 1;
}

.about-text {
  background: var(--dark-color);
  color: var(--light-color);
  padding-top: 50px;
  padding-bottom: 30px;
  flex: 1;
  text-align: justify;
}

.about-text h2 {
  text-align: center;
  font-size: 4rem;
  margin: 40px 0 0 0;
}

.about-text p {
  text-align: justify;
  padding: 10px 50px;
  font-size: 1.1rem;
  line-height: 1.8rem;
}

/********************************************************************************
SERVICES
*/

#services {
  padding-top: 50px;
  border-bottom: var(--secondary-color) 5px solid;
}

.service-item {
  margin: 50px;
  padding: 50px 20px;
  border-top: 25px solid var(--primary-color);
  border-radius: 10px;
  background-color: var(--light-color);
  color: var(--primary-color);
  box-shadow: 5px 5px 10px var(--dark-color);
  max-width: 400px;
}

.service-item p {
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8rem;
}

.service-item h2 {
  padding: 20px 0;
}

/********************************************************************************
INDUSTRIA 4.0
*/

#ind4 {
  border-bottom: var(--secondary-color) 5px solid;
  min-height: 1000px;
}

.ind4-image {
  background: url(../img/industry.jpg) no-repeat center center/cover;
  flex: 1;
}

.ind4-text {
  background: var(--dark-color);
  color: var(--light-color);
  padding-bottom: 30px;
  flex: 1;
  text-align: justify;
}

.ind4-text h2 {
  text-align: center;
  font-size: 4rem;
  margin: 40px 0 0 0;
}

.ind4-text p {
  text-align: justify;
  padding: 10px 50px;
  font-size: 1.1rem;
  line-height: 1.8rem;
}

/********************************************************************************
BRANDS
*/

#brands {
  padding-top: 100px;
  border-bottom: var(--secondary-color) 5px solid;
}

.brand-row {
  justify-content: space-around;
}

.brand-item {
  padding: 60px 0px;
}

.first-brand-row .brand-item img{
  height: 80px;
}

.second-brand-row .brand-item img{
  height: 250px;
}

/********************************************************************************
CONTACT
*/

#contact {
  padding: 40px 0px;
  padding-right: 80px;
  border-top: var(--secondary-color) 30px solid;
  background-color: var(--dark-color);
  justify-content: center;
  font-style: italic;
}

.contact-item {
  padding: 0px 30px;
  justify-content: center;
  align-items: center;
}

.contact-row {
  padding: 10px 0px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.contact i {
  font-size: 2rem;
  padding-right: 10px;
}

/********************************************************************************
MOBILE CSS
*/

@media(max-width: 820px){

  /* ***** HEADER ***** */
  .navbar {
    flex-direction: column;
  }

  nav a {
    font-size: 1rem;
  }

  .logo img {
    margin-left: 0px;
    width: 120px;
  }

  .showcase h1 {
    font-size: 2.5rem;
  }

  .showcase p {
    font-size: 1.5rem;
  }

  /* ***** ABOUT ***** */
  .about{
    flex-direction: column;
  }

  .about-image {
    flex: none;
    background: url(../img/about.jpg) fixed 50%;
    height: 75vh;
  }

  .about-text h2 {
    margin-top: 70px;
    font-size: 3rem;
  }

  /* ***** SERVICES ***** */
  #services {
    padding-top: 100px;
    padding-bottom: 30px;
  }

  .services-row {
    flex-direction: column;
    align-items: center;
  }

  .service-item {
    padding: 50px 20px;
    margin: 20px;
  }

  /* ***** INDUSTRIA 4.0 ***** */
  #ind4 {
    min-height: 0px;
    flex-direction: column-reverse;
  }

  .ind4-text h2 {
    margin-top: 120px;
    font-size: 3rem;
  }

  .ind4-image {
    flex: none;
    height: 75vh;
    background: url(../img/industry.jpg) fixed 50%;
  }

  /* ***** BRANDS ***** */
  .first-brand-row {
    flex-direction: column;
  }

  .first-brand-row .brand-item img {
    height: 40px;
  }

  .second-brand-row .brand-item img {
    height: 120px;
  }

  /* ***** CONTACT ***** */
  #contact {
    flex-direction: column-reverse;
    align-items: center;
    padding: 30px 0px;
  }

  .contact-item {
    padding: 0px;
  }

  .contact .vl {
    border-left: 0px dotted var(--secondary-color);
    border-top: 1px dotted var(--secondary-color);
    margin: 20px 0;
    height: 1px;
    width: 100px;
  }
}
