:root{
  --red:#dd1e2b;
  --black:#090909;
  --text:#181818;
  --muted:#6f6f6f;
  --background:#f7f7f7;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-family:"Montserrat", Arial, sans-serif;
}

html{
  scroll-behavior:smooth;
}

body{
  background:var(--background);
  color:var(--text);
}

.hero{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:90vh;
  color:#fff;
  text-align:center;
  background-image:url("../img/specialecantiere.jpg");
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
}

.overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.52);
}

.logo{
  position:absolute;
  z-index:2;
  top:38px;
  left:50%;
  width:220px;
  max-width:70%;
  filter:drop-shadow(0 5px 10px #000);
  transform:translateX(-50%);
}

.hero-content{
  position:relative;
  z-index:1;
  max-width:850px;
  padding:120px 25px 40px;
  animation:fade 1.2s ease;
}

.subtitle,
.section-label{
  color:var(--red);
  font-size:12px;
  font-weight:700;
  letter-spacing:3px;
}

.subtitle{
  margin-bottom:20px;
}

h1{
  margin-bottom:20px;
  font-size:clamp(46px, 7vw, 74px);
  line-height:1.05;
}

.hero-content > p:not(.subtitle){
  max-width:720px;
  margin:auto;
  font-size:clamp(17px, 2vw, 22px);
  line-height:1.55;
}

.btn{
  display:inline-block;
  margin-top:34px;
  padding:15px 34px;
  border-radius:40px;
  background:var(--red);
  color:#fff;
  font-weight:600;
  text-decoration:none;
  transition:.3s ease;
}

.btn:hover{
  background:#fff;
  color:#000;
  transform:translateY(-2px);
}

.intro{
  max-width:1000px;
  margin:auto;
  padding:90px 25px 75px;
  text-align:center;
}

.intro h2,
.section-heading h2{
  margin-top:12px;
  font-size:clamp(30px, 4vw, 43px);
  line-height:1.2;
}

.intro-text{
  max-width:720px;
  margin:22px auto 0;
  color:var(--muted);
  font-size:17px;
  line-height:1.7;
}

.counter{
  display:flex;
  justify-content:center;
  gap:24px;
  margin-top:48px;
}

.counter div{
  min-width:190px;
  padding:28px 24px;
  border-radius:14px;
  background:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.07);
}

.counter strong{
  display:block;
  color:var(--red);
  font-size:39px;
}

.counter span{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
}

.projects-section{
  padding:32px 0 85px;
}

.section-heading{
  padding:0 25px;
  text-align:center;
}

.filters{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  margin:36px 15px 25px;
}

.filters button{
  padding:12px 22px;
  border:1px solid #ddd;
  border-radius:30px;
  background:#fff;
  color:#222;
  cursor:pointer;
  font-size:14px;
  transition:.25s ease;
}

.filters button:hover,
.filters button.active{
  border-color:var(--black);
  background:var(--black);
  color:#fff;
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(290px, 1fr));
  gap:30px;
  max-width:1300px;
  margin:auto;
  padding:15px 40px;
  align-items:stretch;
}

.card{
  display:flex;
  flex-direction:column;
  height:100%;
  overflow:hidden;
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  opacity:0;
  transform:translateY(25px);
  transition:opacity .5s ease, transform .5s ease, box-shadow .35s ease;
}

.card.show{
  opacity:1;
  transform:translateY(0);
}

.card:hover{
  box-shadow:0 18px 42px rgba(0,0,0,.14);
  transform:translateY(-8px);
}

.card img{
  width:100%;
  height:240px;
  object-fit:cover;
}

.card,
#cantieri{
  scroll-margin-top:25px;
}

.content{
  display:flex;
  flex:1;
  flex-direction:column;
  align-items:center;
  gap:15px;
  padding:32px 26px 28px;
  text-align:center;
}

.content h2{
  width:100%;
  min-height:2.7em;
  margin:0;
  font-size:22px;
  line-height:1.35;
}

.property-location{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  gap:8px;
  width:100%;
  min-height:45px;
  margin:0;
  color:#777;
  font-size:13px;
  font-weight:600;
  line-height:1.5;
  text-align:center;
}

.property-description{
  width:100%;
  min-height:52px;
  margin:0;
  color:#464646;
  line-height:1.65;
}

.card-btn{
  display:inline-flex;
  align-items:center;
  align-self:center;
  gap:10px;
  margin-top:auto;
  padding:13px 20px;
  border-radius:9px;
  background:var(--black);
  color:#fff;
  font-size:14px;
  font-weight:600;
  text-decoration:none;
  transition:.3s ease;
}

.card-btn:hover{
  background:var(--red);
}

.card-btn i{
  font-size:12px;
  transition:.3s ease;
}

.card-btn:hover i{
  transform:translateX(4px);
}

.site-footer{
  padding:65px 8% 0;
  background:#080808;
  color:#fff;
}

.footer-container{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr;
  gap:70px;
  max-width:1200px;
  margin:auto;
  padding-bottom:50px;
}

.footer-logo{
  width:175px;
  max-width:100%;
  margin-bottom:18px;
}

.footer-brand p{
  max-width:280px;
  margin-bottom:25px;
  color:#bcbcbc;
  line-height:1.6;
}

.footer-column{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:14px;
}

.footer-column h3{
  position:relative;
  margin-bottom:10px;
  padding-bottom:12px;
  font-size:18px;
}

.footer-column h3::after{
  position:absolute;
  bottom:0;
  left:0;
  width:38px;
  height:2px;
  background:var(--red);
  content:"";
}

.footer-column p,
.footer-column a{
  color:#bcbcbc;
  font-size:14px;
  line-height:1.55;
  text-decoration:none;
  transition:.25s ease;
}

.footer-column a:hover{
  color:var(--red);
  transform:translateX(4px);
}

.footer-column i{
  width:20px;
  color:var(--red);
}

.social{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.social a{
  display:flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border:1px solid #444;
  border-radius:50%;
  color:#fff;
  text-decoration:none;
  transition:.3s ease;
}

.social a:hover{
  border-color:var(--red);
  background:var(--red);
  transform:translateY(-3px);
}

.footer-bottom{
  display:flex;
  justify-content:space-between;
  gap:15px;
  max-width:1200px;
  margin:auto;
  padding:22px 0;
  border-top:1px solid #292929;
  color:#777;
  font-size:12px;
}

.back-to-top{
  position:fixed;
  right:25px;
  bottom:25px;
  z-index:999;
  display:flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border:none;
  border-radius:50%;
  background:var(--red);
  color:#fff;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  box-shadow:0 8px 20px rgba(0,0,0,.25);
  transform:translateY(20px);
  transition:.35s ease;
}

.back-to-top:hover{
  background:#000;
  transform:translateY(-5px);
}

.back-to-top.visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

@keyframes fade{
  from{
    opacity:0;
    transform:translateY(25px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }
}

@media(max-width:700px){
  .hero{
    min-height:85vh;
  }

  .logo{
    top:25px;
    width:175px;
  }

  .hero-content{
    padding-top:125px;
  }

  .intro{
    padding:65px 20px;
  }

  .counter{
    flex-direction:column;
    gap:16px;
    margin-top:32px;
  }

  .counter div{
    min-width:0;
  }

  .projects-section{
    padding-bottom:60px;
  }

  .filters{
    gap:8px;
    margin-top:28px;
  }

  .filters button{
    padding:11px 15px;
    font-size:13px;
  }

  .grid{
    grid-template-columns:1fr;
    gap:22px;
    padding:15px 20px;
  }

  .card img{
    height:225px;
  }

  .content{
    padding:23px;
  }

  .content h2,
  .property-location,
  .property-description{
    min-height:0;
  }

  .property-location{
    margin-bottom:12px;
  }

  .property-description{
    margin-bottom:22px;
  }

  .footer-container{
    grid-template-columns:1fr;
    gap:38px;
  }

  .site-footer{
    padding:50px 25px 0;
  }

  .footer-bottom{
    flex-direction:column;
    padding:20px 0;
    text-align:center;
  }

  .back-to-top{
    right:18px;
    bottom:18px;
    width:45px;
    height:45px;
  }
}