* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:root {
  --color-primary: #1e7d39;
  --color-warning: #f7c94b;
  --color-danger-variant: rgba(247, 88, 66, 0.4);
  --color-white: #fff;
  --color-light: rgba(255, 255, 255, 0.7);
  --color-black: #000;

  --container-width-lg: 80%;
  --container-width-md: 90%;
  --container-width-sm: 94%;

  --transition: all 400ms ease;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.7;
  color: var(--color-black);
  background: var(--color-white);
}

.container {
  width: var(--container-width-lg);
  margin: 0 auto;
}

section {
  padding: 6rem 0;
}

section.fullheight {
  height: 100vh;
}

section.fullwidth {
  margin: auto 0;
  width: 100%;
}

section h2 {
  text-align: center;
  margin-bottom: 4rem;
}

h1,
h2,
h3,
h4,
h5 {
  line-height: 1.2;
}

h1 {
  font-size: 2.4rem;
}

h2 {
  font-size: 36px;
}

h3 {
  font-size: 1.6rem;
}

h4 {
  font-size: 1.3rem;
}

p {
  font-size: 18px;
}

a {
  color: var(--color-black);
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: 0.4rem;
}

.btn {
  display: inline-block;
  background: var(--color-white);
  color: black;
  padding: 1rem 2rem;
  border: 1px solid transparent;
  font-weight: 500;
  transition: var(--transition);
}

.btn:hover {
  background: transparent;
  color: var(--color-black);
  border-color: var(--color-white);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: transparent;
  color: var(--color-black);
  border-color: var(--color-black);
}

.btn-primary-light:hover {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.text-white {
  color: var(--color-white);
}

.text-black {
  color: var(--color-black);
}

/* ========================= NAVBAR ======================= */

nav {
  background: transparent;
  width: 100vw;
  height: 5rem;
  position: fixed;
  top: 0;
  z-index: 11;
}

.nav__container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav button {
  display: none;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.nav__menu a {
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav__menu a:hover {
  color: var(--color-primary);
}

.window-scroll {
  background: var(--color-white);
  color: var(--color-black);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0, 2);
  transition: var(--transition);
}

.window-scroll .nav__container .text-white {
  color: var(--color-black);
}

.window-scroll button i {
  color: var(--color-black);
}

/* ========================= HEADER ======================= */

header {
  position: relative;
  height: 100vh;
  background-image: url("../img/Cancelli scorrevoli/8.jpg");
  background-size: cover;
  background-position: center;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.header__container {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 5rem;
  height: 100%;
}

.header__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 40vw;
}

.header__content .btn {
  align-self: center;
  width: auto;
}

/* ========================= CIT ======================= */

.text-section {
  text-align: center;
  margin: auto 2rem;
}

.text-section.description {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  place-items: center;
}

.text-section.description > * {
  width: 80%;
}

.text-section.cit {
  background: var(--color-primary);
  color: var(--color-white);
}

.cit__container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cit__container * {
  margin: 0 auto;
}

.cit__container .btn {
  padding: 1rem 2rem;
}

/* ========================= IMAGE GALLERY ======================= */

.image-container {
  columns: 4 250px;
  gap: 1rem;
  margin: auto 2rem;
}

.image-container img {
  margin-bottom: 1rem;
  width: 100%;
}

#galleria{
  display: grid;
  place-items: center;
}

.galleria__container {
  width: 86%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.galleria__container h3 {
  margin-bottom: 2rem;
  text-align: center;
}

.galleria__container img{
  height: 300px;
}

/* ========================= CONTACT ========================= */

.contact__container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  place-items: center;
  background: var(--color-primary);
  width: 100%;
  color: var(--color-white);
  padding: 3rem 10%;
}

.contact__container > div {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.contact__container li {
  background: var(--color-white);
  border-radius: 100%;
  height: 5rem;
  aspect-ratio: 1/1;
  display: grid;
  place-items: center;
  font-size: 2rem;
}

section#contattaci {
  margin: 0;
}

/* ========================= FOOTER ======================= */

footer {
  background: var(--color-light);
  font-size: 14px;
}

.footer__container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5rem;
}

.footer__container > div h4 {
  margin-bottom: 1.2rem;
}

.footer__column p {
  margin: 0 0 2rem;
}

footer ul li {
  margin-bottom: 0.7rem;
  transition: var(--transition);
}

footer ul li a:hover {
  text-decoration: underline;
}

.footer__socials{
  display: flex;
  gap: 1.2rem;
  align-items: center;
  justify-content: start;
}

.footer__socials a {
  font-size: 1.2rem;
}

.footer__copyright {
  text-align: center;
  padding: 1.2rem 0;
  border-top: 1px solid var(--color-bg2);
}

/* ========================= MEDIA QUERIES ======================= */

/* ========================= MEDIA QUERIES (TABLETS) ======================= */

@media screen and (max-width: 1024px) {
  .container {
    width: var(--container-width-md);
    /* padding: 0 2rem; */
  }
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.7rem;
  }
  h3 {
    font-size: 1.4rem;
  }
  h4 {
    font-size: 1.2rem;
  }

  /* -- NAV BAR -- */

  nav .nav__container {
    padding: 0 1rem;
  }
  nav button {
    display: inline-block;
    background: transparent;
    font-size: 1.8rem;
    color: var(--color-white);
    cursor: pointer;
  }
  nav button#close-menu-btn {
    display: none;
  }
  nav button#open-menu-btn {
    display: block;
  }
  .nav__menu {
    display: none;
    position: fixed;
    top: 5rem;
    right: 5%;
    height: fit-content;
    width: 18rem;
    flex-direction: column;
    gap: 0;
  }
  .nav__menu li {
    width: 100%;
    height: 5.8rem;
    animation: animateNavItems 400ms linear forwards;
    transform-origin: top right;
    opacity: 0;
  }
  .nav__menu li:nth-child(2) {
    animation-delay: 200ms;
  }
  .nav__menu li:nth-child(3) {
    animation-delay: 400ms;
  }
  .nav__menu li:nth-child(4) {
    animation-delay: 600ms;
  }

  @keyframes animateNavItems {
    0% {
      transform: rotateZ(-90deg) rotateX(90deg) scale(0.1);
    }
    100% {
      transform: rotateZ(0) rotateX(0) scale(1);
      opacity: 1;
    }
  }
  .nav__menu li a {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: -4rem 6rem 10rem rgba(0, 0, 0, 0.6);
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
  }
  .nav__menu li a:hover {
    background: var(--color-bg2);
    color: var(--color-white);
  }
  .window-scroll .nav__container li a.text-white {
    background: var(--color-primary);
    color: var(--color-white);
  }

  /* ----------- HEADER ----------- */

  header {
    height: 52vh;
    margin-bottom: 4rem;
  }
  .header__container {
    gap: 0;
    padding-bottom: 3rem;
    grid-template-columns: 1fr;
  }
  .header__left {
    display: grid;
    place-items: center;
    gap: 1rem;
  }
  .header__content {
    max-width: 90vw;
  }

  /* ----------- FOOTER ----------- */

  .footer__container {
    place-items: center;
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer__column {
    width: 80%;
  }

  /* other sections */

  .text-section {
    margin: auto 0;
    gap: 2rem;
  }

  .text-section.description {
    grid-template-columns: 1fr;
  }

  .cit__container * {
    width: 90%;
  }

  .contact__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    width: 100vw;
    margin: 0;
    padding: 3rem 0;
  }

  .image-container {
    columns: 2 250px;
  }
}

/* ========================= MEDIA QUERIES (PHONES) ======================= */

@media screen and (max-width: 600px) {
  .container {
    width: var(--container-width-sm);
  }

  /* ----------- NAV BAR ----------- */

  .nav__menu {
    right: 3%;
  }

  /* ----------- HEADER ----------- */

  header {
    height: 100vh;
  }
  .header__container {
    text-align: center;
    margin-top: 0;
  }
  .header__left p {
    margin-bottom: 1.3rem;
  }

  /* ----------- FOOTER ----------- */

  .footer__container {
    gap: 2rem;
  }
  .footer__column p {
    margin: 1rem auto;
  }
  .footer__socials {
    justify-content: center;
  }

  .image-container {
    columns: 1 250px;
  }

  .contact__container {
    grid-template-columns: 1fr;
    width: 100vw;
  }
}
