/* MEDIA PAGE */

.media-page{
  background:#f4f4f4;
  overflow:hidden;
}

/* HERO */

.media-hero{
  position:relative;
  min-height:650px;
  color:#fff;
  overflow:hidden;
  background:#111;
}

.media-hero-bg{
  position:absolute;
  inset:0;
  background-image:url("https://www.malossi.com/wp-content/uploads/2024/11/TestaCilindro100.png");
  background-size:cover;
  background-position:center;
  transform:scale(1.02);
  transition:background-image .35s ease, transform .6s ease;
  z-index:0;
}

.media-hero-overlay{
  position:absolute;
  inset:0;
  background:
    linear-gradient(
      90deg,
      rgba(0,0,0,.82) 0%,
      rgba(0,0,0,.56) 45%,
      rgba(0,0,0,.26) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0,0,0,.10) 0%,
      rgba(0,0,0,.76) 100%
    );
  z-index:1;
}

.media-hero::after{
  content:"";
  position:absolute;
  left:-4%;
  right:-4%;
  bottom:-115px;
  height:150px;
  background:#f4f4f4;
  transform:rotate(-3deg);
  transform-origin:left bottom;
  z-index:2;
}

.media-hero-content{
  position:relative;
  z-index:3;
  width:min(1180px, calc(100% - 88px));
  margin:0 auto;
  padding-top:92px;
}

.media-hero-content h1{
  max-width:720px;
  margin:0 0 18px;
  color:#fff;
  font-size:62px;
  line-height:.88;
  font-weight:900;
  font-style:italic;
  text-transform:uppercase;
  letter-spacing:-2px;
}

.media-hero-content p{
  margin:0 0 34px;
  color:#fff;
  font-size:24px;
  line-height:1.35;
  font-weight:700;
}

.media-hero-btn{
  min-width:170px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:0 22px;
  border-radius:4px;
  background:var(--red);
  color:#fff;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}

.media-hero-btn span{
  font-size:20px;
  line-height:1;
}

.media-hero-pagination{
  position:absolute;
  left:50%;
  bottom:150px;
  z-index:4;
  width:min(1180px, calc(100% - 88px));
  transform:translateX(-50%);
  display:flex;
  align-items:flex-start;
  gap:34px;
}

.media-hero-bullet{
  width:220px;
  padding:0;
  border:0;
  background:transparent;
  color:#fff;
  text-align:left;
  cursor:pointer;
}

.media-hero-bullet span{
  display:block;
  width:100%;
  height:4px;
  margin-bottom:12px;
  background:rgba(255,255,255,.85);
  border-radius:999px;
}

.media-hero-bullet.active span{
  background:var(--yellow);
}

.media-hero-bullet strong{
  display:block;
  color:#fff;
  font-size:11px;
  line-height:1.2;
  font-weight:900;
  text-transform:uppercase;
}

/* TABLET */

@media(max-width:1200px){
  .media-hero{
    min-height:600px;
  }

  .media-hero-content{
    width:calc(100% - 64px);
    padding-top:78px;
  }

  .media-hero-content h1{
    max-width:680px;
    font-size:54px;
  }

  .media-hero-content p{
    font-size:22px;
  }

  .media-hero-pagination{
    width:calc(100% - 64px);
    bottom:132px;
  }
}

/* MOBILE */

@media(max-width:700px){
  .media-hero{
    min-height:530px;
  }

  .media-hero-bg{
    background-position:center;
  }

  .media-hero-overlay{
    background:
      linear-gradient(
        90deg,
        rgba(0,0,0,.88) 0%,
        rgba(0,0,0,.56) 100%
      ),
      linear-gradient(
        180deg,
        rgba(0,0,0,.12) 0%,
        rgba(0,0,0,.82) 100%
      );
  }

  .media-hero::after{
    bottom:-58px;
    height:92px;
    transform:rotate(-4deg);
  }

  .media-hero-content{
    width:calc(100% - 32px);
    padding-top:62px;
  }

  .media-hero-content h1{
    max-width:100%;
    font-size:39px;
    line-height:.9;
    letter-spacing:-1.2px;
  }

  .media-hero-content p{
    max-width:300px;
    margin-bottom:26px;
    font-size:18px;
  }

  .media-hero-btn{
    min-width:155px;
    min-height:42px;
    padding:0 18px;
  }

  .media-hero-pagination{
    width:calc(100% - 32px);
    bottom:86px;
    gap:18px;
  }

  .media-hero-bullet{
    width:50%;
  }

  .media-hero-bullet strong{
    font-size:10px;
  }
}

/* MEDIA HERO VIDEOS */

.media-hero{
  overflow:visible;
  margin-bottom:190px;
}

.media-hero-video-row{
  position:absolute;
  left:50%;
  bottom:-190px;
  z-index:6;
  width:min(1180px, calc(100% - 88px));
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:32px;
}

.media-hero-video-card{
  width:100%;
  aspect-ratio:16 / 9;
  border-radius:8px;
  overflow:hidden;
  background:#111;
  box-shadow:0 24px 60px rgba(0,0,0,.28);
}

.media-highlight-video,
    .media-highlight-static-image,
    .media-highlight-image-link,
    .media-highlight-image-link img {
      width: 100%;
      height: 100%;
      display: block;
    }
    
    .media-highlight-video,
    .media-highlight-static-image,
    .media-highlight-image-link img {
      object-fit: cover;
    }
    
    .media-highlight-video {
      border: 0;
      background: #000;
    }
    
    .media-highlight-image-card,
    .media-highlight-image-link {
      overflow: hidden;
    }
    
    .media-highlight-image-link img {
      transition: transform .35s ease;
    }
    
    .media-highlight-image-link:hover img {
      transform: scale(1.05);
    }

.media-video-thumb{
  position:relative;
  width:100%;
  height:100%;
  display:block;
  padding:0;
  border:0;
  background:#111;
  cursor:pointer;
  overflow:hidden;
}

.media-video-thumb img,
.media-hero-video-card iframe{
  width:100%;
  height:100%;
  display:block;
  border:0;
}

.media-video-thumb img{
  object-fit:cover;
  transition:transform .35s ease;
}

.media-video-thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.22);
  z-index:1;
}

.media-video-thumb:hover img{
  transform:scale(1.06);
}

.media-video-play-icon{
  position:absolute;
  left:50%;
  top:50%;
  z-index:2;
  width:68px;
  height:68px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--red);
  color:#fff;
  transform:translate(-50%, -50%);
  box-shadow:0 14px 30px rgba(0,0,0,.25);
}

.media-video-play-icon svg{
  width:34px;
  height:34px;
  display:block;
  fill:currentColor;
  transform:translateX(2px);
}

/* MEDIA HERO VIDEOS TABLET */

@media(max-width:1200px){
  .media-hero{
    margin-bottom:170px;
  }

  .media-hero-video-row{
    bottom:-105px;
    width:calc(100% - 64px);
    gap:26px;
  }
}

/* MEDIA HERO VIDEOS MOBILE */

@media(max-width:700px){
  .media-hero{
    min-height:520px;
    margin-bottom:190px;
  }

  .media-hero-video-row{
      left:0;
      right:0;
      bottom:-120px;
      width:100%;
      transform:none;
      display:flex;
      gap:14px;
      padding:0 16px 12px;
    }
    
    /*
     * One highlight:
     * keep the card centred.
     */
    .media-hero-video-row.is-single{
      justify-content:center;
      overflow-x:hidden;
    }
    
    .media-hero-video-row.is-single
    .media-hero-video-card{
      flex:0 0 84%;
      max-width:340px;
      margin:0 auto;
    }
    
    /*
     * Multiple highlights:
     * horizontal swipe carousel.
     */
    .media-hero-video-row.is-carousel{
      justify-content:flex-start;
      overflow-x:auto;
      overflow-y:hidden;
      scroll-snap-type:x mandatory;
      scroll-padding-inline:16px;
      overscroll-behavior-x:contain;
      -webkit-overflow-scrolling:touch;
    }
    
    .media-hero-video-row.is-carousel
    .media-hero-video-card{
      flex:0 0 84%;
      scroll-snap-align:center;
      scroll-snap-stop:always;
    }
    
    .media-hero-video-row.is-carousel::-webkit-scrollbar{
      height:4px;
    }
    
    .media-hero-video-row.is-carousel::-webkit-scrollbar-thumb{
      background:var(--red);
      border-radius:999px;
    }

  .media-video-play-icon{
    width:56px;
    height:56px;
  }

  .media-video-play-icon svg{
    width:29px;
    height:29px;
  }
}

/* MEDIA CATALOG SECTION */

.media-container{
  width:min(1180px, calc(100% - 88px));
  margin:0 auto;
}

.media-catalog-section{
  padding:68px 0 96px;
  background:#f4f4f4;
}

.media-catalog-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:34px;
}

.media-section-title{
  margin:0;
}

.media-section-title span{
  display:inline-flex;
  align-items:center;
  min-height:52px;
  padding:0 28px;
  background:#353b47;
  color:#fff;
  border-radius:4px;
  clip-path:polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  font-size:22px;
  line-height:1;
  font-weight:900;
  font-style:italic;
  text-transform:uppercase;
}

.media-catalog-all-btn{
  min-width:170px;
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 22px;
  border:1px solid var(--red);
  border-radius:4px;
  color:var(--red);
  background:#fff;
  font-size:12px;
  line-height:1;
  font-weight:900;
  text-transform:uppercase;
  transition:background .2s ease, color .2s ease;
}

.media-catalog-all-btn:hover{
  background:var(--red);
  color:#fff;
}

.media-catalog-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:26px;
}

.media-catalog-card{
  min-width:0;
}

.media-catalog-image{
  position:relative;
  display:block;
  aspect-ratio:3 / 4;
  border-radius:6px;
  overflow:hidden;
  background:#111;
  box-shadow:0 16px 38px rgba(0,0,0,.08);
}

.media-catalog-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
}

.media-catalog-card:hover .media-catalog-image img{
  transform:scale(1.045);
}

.media-catalog-body{
  padding-top:16px;
}

.media-catalog-body h3{
  margin:0 0 12px;
  color:#101827;
  font-size:19px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:-.2px;
}

.media-catalog-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--red);
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  text-transform:uppercase;
}

.media-catalog-link span{
  font-size:13px;
  line-height:1;
}

.media-catalog-link:hover{
  text-decoration:underline;
}

/* MEDIA CATALOG TABLET */

@media(max-width:1200px){
  .media-container{
    width:calc(100% - 64px);
  }

  .media-catalog-section{
    padding:62px 0 88px;
  }

  .media-catalog-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:30px 26px;
  }

  .media-catalog-image{
    aspect-ratio:4 / 5;
  }
}

/* MEDIA CATALOG MOBILE */

@media(max-width:700px){
  .media-container{
    width:calc(100% - 32px);
  }

  .media-catalog-section{
    padding:42px 0 72px;
  }

  .media-catalog-head{
    align-items:flex-start;
    flex-direction:column;
    gap:18px;
    margin-bottom:24px;
  }

  .media-section-title span{
    min-height:46px;
    padding:0 22px;
    font-size:18px;
  }

  .media-catalog-all-btn{
    min-width:150px;
    min-height:42px;
    padding:0 18px;
    font-size:11px;
  }

  .media-catalog-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:18px 14px;
  }

  .media-catalog-image{
    aspect-ratio:3 / 4;
    border-radius:5px;
  }

  .media-catalog-body{
    padding-top:10px;
  }

  .media-catalog-body h3{
    margin-bottom:8px;
    font-size:15px;
    line-height:1.1;
  }

  .media-catalog-link{
    font-size:10px;
    gap:4px;
  }

  .media-catalog-link span{
    font-size:11px;
  }
}