@import url('https://fonts.googleapis.com/css2?family=Bruno+Ace+SC&display=swap');
body {
    background-color: rgb(97, 97, 97);
    font-family: 'Bruno Ace SC', cursive;

}
body, p {
    margin: 0;
}
.header {
    position: sticky;
    top: 0;
    display: flex;
    z-index: 1;
}
.filter {
    align-self: auto;
    background-color: rgb(97, 97, 97);
    padding: 10px 20px;
    border-bottom-left-radius: 20px;
}
.filter>button {
    font-family: 'Bruno Ace SC', cursive;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 17px;
    color: rgb(255, 255, 255);
    transition: 0.3s;
}
.filter>button:hover {
    color: rgb(200, 255, 0);
    transform: scale(1.1);
    box-shadow: 5px 5px 10px rgb(54, 54, 54);
}
.filter>.active {
    color: rgb(9, 255, 0);
    text-decoration: underline;
}
.header {
    justify-content: space-between;
}
.back {
    display: flex;
    align-items: center;
    background-color: rgb(97, 97, 97);
    padding: 10px 20px;
    border-bottom-right-radius: 20px;
}
.back>ion-icon {
    font-size: 40px;
    color: white;
    transition: 0.3s;
}
.back>a {
    font-size: 30px;
    text-decoration: none;
    color: white;
    position: relative;
}
/* .back>a::before {
    position: absolute;
    content: "";
    height: 4px;
    width: 100%;
    background-color: white;
    border-radius: 5px;
} */
.back>a::after {
    position: absolute;
    content: "";
    /* bottom: -4px; */
    top: 0;
    right: 0;
    height: 4px;
    width: 0;
    background-color: white;
    transition: 0.3s;
    border-radius: 5px;
}
.back:hover ion-icon{
    transform: translateX(-5px);
}
a:hover::after {
    width: 100%;
}

.main {
    width: min(1200px, 90%);
    margin: 0 auto;
}
.devices {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.device {
    display: grid;
    grid-template-rows: 1fr 0.5fr;
    place-items: center;
    background-color: cornflowerblue;
    border-radius: 20px;
    box-shadow: 5px 5px 10px rgb(54, 54, 54);
    cursor: pointer;
    transition: 0.3s;
    overflow: hidden;
}
.device>.img {
    height: 300px;
    width: 100%;
    background-color: white;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
.device>.img>img {
    height: 100%;
    width: 100%;
    object-fit: scale-down;
    transition: 0.3s;
}
.device>p {
    font-size: 20px;
    text-align: center;
    font-weight: bold;
}
.device:hover img {
    transform: scale(120%);
}
.out:hover img {
    transform: scale(100%);
}


.device {position: relative;}
.device .out-img{
  display: none;
}
.out .out-img{
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300px;
}
.out-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300px;
}

@media (max-width:1200px) {
    .back>ion-icon {
        font-size: 30px;
    }
    .back>a {
        font-size: 20px;
    }
    .devices {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    .device>.img {
        height: 250px;
    }
    .device>p {
        font-size: 15px;
    }
}
@media (max-width:1000px) {
    .devices {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    .device>.img {
        height: 200px;
    }
}
@media (max-width:700px) {
    .devices {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .device>.img {
        height: 200px;
    }
}
@media (max-width:480px) {
    .device>.img {
        height: 150px;
    }
}