@import url(general.css);

@import url(general.css);

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #fbc737;
  --color-1: #8ebf38;
  --color-2: #007000;
  --color-3: #2b0002;
  --color-4: #fcd7c1;
  --font-1: "QuicksandMedium";
  --font-2: "QuicksandBold";
  --font-3: "Quicksand";
  --font-4: "JostRegular";
}



@font-face {
  font-family: "QuicksandMedium";
  src: url(../fonts/Quicksand-Medium.woff);
  font-display: swap;
}

@font-face {
  font-family: "QuicksandBold";
  src: url(../fonts/Quicksand-Bold.woff);
  font-display: swap;
}

@font-face {
  font-family: "Quicksand";
  src: url(../fonts/Quicksand-Regular.woff);
  font-display: swap;
}

@font-face {
  font-family: "JostRegular";
  src: url(../fonts/Jost-400-Book.woff);
  font-display: swap;
}

body {
  width: 100%;
}

main {
  width: 100%;
  overflow: hidden;
}

a {
  text-decoration: none;
}

li {
  list-style: none;
}

.contenedor {
  width: min(88%, 1550px);
  margin-inline: auto;
}

/* .splide{
  visibility: visible !important;
} */

#blog {
  height: 100%;
  padding-block: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  padding-block-end: 7rem;
  position: relative;

  .container-naranja {
    position: absolute;
    bottom: 2rem;
    right: -5rem;
    width: 20rem;
    height: 15rem;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }
  }

  .container-mortero {
    position: absolute;
    top: 6rem;
    left: -8rem;

    width: 20rem;
    height: 15rem;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }
  }

  #splide-blog-categorias {
    width: 85%;
    margin: 0 auto;

    .splide__track {
      width: 100%;

      .splide__list {
        width: 100%;
        display: flex;
        justify-content: space-evenly;

        .splide__slide {
          .tab {
            padding: 0.5rem 1rem;
            cursor: pointer;
            border-radius: 5px;
            text-align: center;
            position: relative;
            display: flex;
            justify-content: center;
            /* Cambiado para centrar el contenido */
            align-items: center;
            gap: 1rem;
            color: var(--3, #2b0002);
            font-family: var(--font-3);
            font-size: 17px;
            font-style: normal;
            font-weight: 400;
            line-height: 25px;

            a {
              padding: 0.5rem 1rem;
              cursor: pointer;
              border-radius: 5px;
              text-align: center;
              position: relative;
              display: flex;
              justify-content: center;
              align-items: center;
              gap: 0.1rem;
              color: var(--3, #2b0002);
              font-family: var(--font-3);
              font-size: 17px;
              font-style: normal;
              font-weight: 400;
              line-height: 25px;

              display: flex;
              align-items: center;

              /* El estilo ::before se aplicará solo cuando el tab esté activo */
              &::before {
                content: "";
                background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iMzEiIHZpZXdCb3g9IjAgMCA0OCAzMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggb3BhY2l0eT0iMC4yIiBkPSJNMCA0LjIwNTI1QzM1LjIwMDEgLTkuNTY4NzEgNDYuNTUwOSAxMy43NzA1IDQ3LjgyNjIgMjcuMTYxOEMzNC4wNTIzIDM0LjgxNCAyNC4yNTA4IDI3LjgzNzIgMjEuMDQzNSAyMS40MjI3QzE3LjIxNzQgMTMuNzcwNSAxMy43NzQgNS43MzU2NyAwIDQuMjA1MjVaIiBmaWxsPSIjOEVCRjM4Ii8+Cjwvc3ZnPgo=);
                background-position: center;
                background-size: contain;
                background-repeat: no-repeat;
                height: 25px;
                width: 25px;
                /* Ajusta el ancho según lo necesites */
                opacity: 0.5;
                /* Inicia oculto */
                transition: all 0.3s ease-in-out;
                /* position: absolute; */
                display: inline-block;
                top: 20%;
                /* Ajusta la posición según sea necesario */
                left: 0;
                /* Centra horizontalmente */
                /* transform: translateX(-50%); */
                /* Ajusta para centrar el icono */
              }
            }

            /* Solo cambia el color al hacer hover */
            &:hover {
              a {
                color: #007000;
                font-weight: 700;
                /* No cambia ::before en hover */
              }
            }

            /* Estilo para el tab activo */
            &.active {
              a {
                color: #007000;
                font-weight: 700;
                margin-left: 1rem;
                transition: all 0.3s ease-in-out;

                &::before {
                  opacity: 1;
                  /* Muestra el efecto ::before solo cuando el tab está activo */
                }
              }

            }
          }
        }
      }
    }
  }

  .content-container {
    display: flex;
    justify-content: center;
    height: 100%;

    width: 100%;

    .content {
      display: none;
      text-align: center;
      height: 100%;

      &.category-content {
        display: flex;
        flex-direction: column;
      }

      .container-blog {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        column-gap: 4rem;
        row-gap: 6rem;
        place-items: center;
      }

      .paginacion-simple {
        padding-top: 6rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;

        .paginacion {
          display: flex;
          justify-content: center;
          gap: 1rem;

          li {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            flex-shrink: 0;
            border-radius: 12px 0px;
            background: rgba(0, 112, 0, 0.2);
            text-align: center;
            font-family: var(--font-4);
            font-size: 20px;
            font-style: normal;
            font-weight: 700;
            line-height: 20px;
            a{
              color: #2b0002;
            }
            &.prev,
            &.next,
            &.active{
              background: var(--7, #007000);
              a{
                color: white;
              }
              span{
                color: white;
              }
            }
          }
        }
      }

      .box-blog {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        /* Ajusta el espacio interno si es necesario */
        width: 100%;
        /* Asegúrate de que las cajas se ajusten al contenedor de grid */
        max-width: 300px;
        /* Establece un ancho máximo para las cajas */

        /* Transición suave para el cambio de ancho */

        /* Agrega una regla para el estado hover en .box-blog */
        &:hover::after {
          width: 80%;
          /* Ancho de la línea al hacer hover */
        }

        &::after {
          content: "";
          position: absolute;
          bottom: -1rem;
          left: 0;
          width: 20%;
          height: 2px;
          /* Ajusta el grosor de la línea */
          background-color: var(--color-2);
          /* Cambia el color según tu preferencia */
          transition: width 0.2s ease;
          /* Transición suave para el cambio de ancho */
        }

        .container-image-blog {
          width: 100%;
          height: 17rem;
          overflow: hidden;
          border-radius: 0.5rem;

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            transition: transform 0.5s ease-in-out;
          }
        }

        .container-info-blog {
          display: flex;
          flex-direction: column;
          gap: 1rem;
          padding-top: 1rem;

          h3 {
            color: #007000;
            font-family: "JostRegular";
            font-size: 25px;
            font-style: normal;
            font-weight: 300;
            line-height: 28px;
            /* 100% */
            text-align: start;
          }

          p {
            color: #2b0002;
            font-family: "JostRegular";
            font-size: 18px;
            font-style: normal;
            line-height: 20px;
            text-align: start;
            transition: all 0.4s ease-in-out;
          }
        }

        /* Efectos al hacer hover sobre .box-blog */
        &:hover .container-image-blog img {
          transform: scale(1.05);
        }

        &:hover .container-info-blog p {
          /* Agrega aquí las reglas para el texto al hacer hover, si es necesario */
        }
      }
    }

    .content.active {
      display: flex;
      flex-direction: column;
      /* display: block; */
      gap: 4rem;
    }
  }
}

/* inicio queries */

@media (max-width: 768px) {
  /*Inicio queries blog*/

  #blog {
    .container-mortero {
      width: 12.5rem;
      height: 9.5rem;
      top: 14rem;
      left: -38%;
    }

    .asl_w_container.asl_w_container_1 {
      #ajaxsearchlite1 {}
    }

    div.asl_r .results .item .asl_content h3,
    div.asl_r .results .item .asl_content h3 a {
      color: black;
    }

    #splide-blog-categorias {
        padding: 0 1rem 6rem 1rem;
      /*padding-block-end: 6rem;*/
      width: 100%;
      ;

      .splide__track {
        .splide__list {
          display: grid;
          grid-template-columns: repeat(2, 1fr);

          .splide__slide {
            .tab {
                justify-content: flex-start;
                &.active{
                padding: 0;
                }
                a{
                    padding: 0;
                    gap: .1rem;
                    justify-content: flex-start;
                    text-align: left;
                }
              &::before {
                left: 77px;
              }
            }
          }
        }
      }
    }

    .content-container {
      .content {
        .container-blog {
          grid-template-columns: 1fr;
        }
      }
    }

    .container-naranja {
      width: 11rem;
      height: 9.6rem;
      right: -12%;
      pointer-events: none;
    }
  }

  /*fin queries blog*/
}
.asl_w_container {
  width: 400px !important;
 @media (max-width: 768px){
  width:280px !important;
 }
}
/*Fin queries*/

/* Estilos de paginación */
.blog-pagination {
  padding-top: 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: absolute;
  bottom: -83px;
  left: 50%;
  transform: translateX(-50%);
}

.blog-pagination span.current {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px 0px;
  background: var(--7, #007000);
  color: var(--2, #fff);
  text-align: center;
  font-family: var(--font-4);
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
}

.blog-pagination a.page-numbers {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 112, 0, 0.10);
  color: var(--7, #007000);
  text-align: center;
  font-family: var(--font-4);
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
  transition: all 0.3s ease;
}

.blog-pagination a.next,
.blog-pagination a.prev {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #007000;
  color: white;
  transition: all 0.3s ease;
}

.blog-pagination a.next:hover,
.blog-pagination a.prev:hover,
.blog-pagination a.page-numbers:hover {
  background: var(--7, #007000);
  color: var(--2, #fff);
}

.blog-pagination a.next:hover svg,
.blog-pagination a.prev:hover svg {
  stroke: var(--2, #fff);
}

@media (max-width: 768px) {
  .blog-pagination {
    padding-top: 3rem;
    position: relative;
    bottom: initial;
    left: initial;
    transform: initial;
    margin-top: 2rem;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: hidden;
  }

  .blog-pagination .page-numbers {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  /* Mostrar números adyacentes en móvil */
  .blog-pagination span.dots {
    display: none !important;
  }

  .blog-pagination a.page-numbers:not(.prev):not(.next):not(:nth-child(2)):not(:nth-last-child(2)) {
    display: none !important;
  }

  .blog-pagination .prev,
  .blog-pagination .next,
  .blog-pagination .current,
  .blog-pagination a.page-numbers:nth-child(2),
  .blog-pagination a.page-numbers:nth-last-child(2) {
    display: flex !important;
  }
}