/* INICIO '.MAIN' ==================================================================> */

.main {
    margin-top: 4.4rem;
}

.gallery__container {
    display: grid;
    gap: 6px;
}

.gallery__card {
    display: flex;
    flex-direction: column;
}

/* alarmas */
.gallery__card:nth-of-type(1) {
    grid-column: 1 / 3;
    grid-row: 1;
}

/* videovigilancia */
.gallery__card:nth-of-type(2) {
    grid-column: 1 / 2;
    grid-row: 2;
}

/* accesorios */
.gallery__card:nth-of-type(3) {
    grid-column: 2 / 3;
    grid-row: 2 / 4;
}

/* seguros */
.gallery__card:nth-of-type(5) {
    grid-column: 1 / 3;
    grid-row: 4;
}

.gallery__card--top {
    position: relative;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
}

.gallery__card--img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery__card--text {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    display: block;
    padding: 0.6rem;
    font-size: var(--size-500);
    font-family: var(--regular-font);
    text-transform: capitalize;
    text-align: center;
    color: #fff;
    background: var(--blue-light);
    backdrop-filter: blur(4px);
}

.gallery__card:hover .gallery__card--img{
    transform: scale(1.05);
}

@media screen and (min-width: 700px) {
    /* alarmas */
    .gallery__card:nth-of-type(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
    
    /* videovigilancia */
    .gallery__card:nth-of-type(2) {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }
    
    /* accesorios */
    .gallery__card:nth-of-type(3) {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
    }

    /* tutoriales */
    .gallery__card:nth-of-type(4) {
        grid-column: 1 / 2;
        grid-row: 3;
    }
    
    /* seguros */
    .gallery__card:nth-of-type(5) {
        grid-column: 2 / 3;
        grid-row: 3;
    }
}

@media screen and (min-width: 1000px) {
    /* alarmas */
    .gallery__card:nth-of-type(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }
    
    /* videovigilancia */
    .gallery__card:nth-of-type(2) {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
    }
    
    /* accesorios */
    .gallery__card:nth-of-type(3) {
        grid-column: 3 / 4;
        grid-row: 1 / 4;
    }

    /* tutoriales */
    .gallery__card:nth-of-type(4) {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }
    
    /* seguros */
    .gallery__card:nth-of-type(5) {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
    }
}

/* FINAL '.MAIN' ===================================================================> */

/* INICIO '.ARTICLES' ==============================================================> */

.articles__container {
    display: flex;
    gap: 32px;
    padding: 0 16px 16px 8px;
    overflow: auto;
    scroll-snap-type: x mandatory;
}

.article__subtitle a {
    line-height: 0;
    font-size: var(--size-700);
    transition: color 0.3s ease;
}

.article__subtitle a:hover {
    color: var(--blue-light);
}
  
/* Scrollbar */
.articles__container::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

/* Track */
.articles__container::-webkit-scrollbar-track {
    border-radius: 10px;
    background-color: var(--grey-extralight);
}

/* Handle */
.articles__container::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: var(--grey-light);
}

/* Handle on hover */
.articles__container::-webkit-scrollbar-thumb:hover {
    background-color: var(--grey-light);
}

.articles__slide {
    flex: 0 0 300px;
    display: grid;
    place-items: center;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

@media screen and (min-width: 900px) {
    .articles__slide {
        flex: 0 0 350px;
    }
}

@media screen and (min-width: 1200px) {
    .articles__container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));;
        grid-auto-rows: minmax(12.5rem, auto);
        grid-gap: 2rem;
        overflow: initial;
    }
}