/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
.article-container {
  width: 100%;

  .article {
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    &:hover {
      transform: translateY(-5px);
    }

    .article-image {
      background-size: cover;
      background-position: center;
      cursor: pointer;
      position: relative;
      aspect-ratio: 5/3;
      @media (max-width: 768px) {
        padding-bottom: 0;
      }

      img {
        width: 100%;
        height: 100%;
        border-radius: 16px;
      }

      &::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        opacity: 0;
        transition: opacity 0.3s ease;
      }
    }

    .article-content {
      display: flex;
      gap: 16px;
      flex-direction: column;
      align-items: start;
      height: 100%;

      .article-title {
        font-size: 20px;
        font-weight: 600;
        color: var(--dp-black);
        line-height: 1.4;
      }

      .article-description {
        font-size: 16px;
        font-weight: 400;
        color: var(--dp-black);
        line-height: 1.5;
      }

      .learn-more {
        color: var(--dp-black);
        text-decoration: none;
        font-size: 16px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        margin-top: auto;
        gap: 8px;
        transition: color 0.3s ease;
      }

      .learn-more::after {
        content: '→';
        transition: transform 0.3s ease;
      }

      .learn-more:hover::after {
        transform: translateX(3px);
      }
    }


  }

  .card {
    height: 100%;
    background: white;
    padding: 24px;
    gap: 32px;
    border: 1px solid var(--dp-gray-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    &:hover {
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
  }

  .normal {
    width: 100%;
    transition: transform 0.3s ease;
    @media (max-width: 768px) {
      margin-top: 20px;
    }
  }

  &:has(.normal) {
    .article-content {
      align-items: start;
      flex: 1;
      text-align: start;
      height: auto;

      .article-title {
        margin-top: calc(50px - var(--dp-gap));
        transition: color 0.3s ease-in-out;
        @media (max-width: 768px) {
          margin-top: 0;
        }

      }

      @media (max-width: 768px) {
        padding: 15px 15px 0 0;
      }
    }

    .article-image {
      width: 100%;
      height: 100%;
      padding-left: 0;

    }

    .article-title {
      color: var(--dp-white) !important;
      font-size: 30px;
      font-weight: 600;
      width: 98%;
      word-wrap: break-word;
      @media (max-width: 768px) {
        font-size: 20px;
        margin: 0;
      }

    }
  }
}






.banner-wrapper {
  background-color: var(--dp-dark-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-right: auto;
  margin-left: auto;
  color: var(--dp-white);
  position: relative;
  min-height: 100vh;
  overflow: hidden;

  .content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 82px 60px;
    gap: var(--dp-gap-medium);
    z-index: 1;

    h1 {
      margin-block-end: 0;
    }

    h6 {
      font-weight: 500;
    }

    .texts {
      text-align: left;
      margin-top: var(--dp-gap-medium);

      p {
        margin-right: var(--dp-gap-medium);
        margin-left: var(--dp-gap-medium);
        margin-top: var(--dp-gap);
        font-size: 18px;
      }
    }

    .button {
      max-width: 320px;
    }

    .scroll-down {
      align-items: center;
      margin-top: 100px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      font-weight: 700;
      font-size: 18px;
      text-align: center;
    }
  }
}

.banner-services {
  .banner-wrapper {
    .content {
      h6 {
        font-weight: 500;
        font-size: 20px;
      }
    }
  }
}

@media (width <= 1024px) {
  .banner-wrapper {
    padding: var(--dp-gap-small);
    margin-bottom: var(--dp-gap-small);

    .content {
      h1 {
        margin-block-end: 0;
      }

      padding: 0;
      gap: var(--dp-gap);

      p {
        margin-right: 0;
        margin-left: 0;
      }

      .scroll-down {
        margin-top: 0;
        margin-bottom: var(--dp-gap-medium);
      }

      .texts {
        margin-top: var(--dp-gap-big);
        p {
          margin-right: 0;
          margin-left: 0;
          margin-top: 0;

        }
      }
    }
  }
}

@media (width <= 580px) {
  .banner-wrapper {
    padding-top: 100px;
  }
}
.header {
  padding: 15px 0;
}

.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  /*MAKE NAV LIST INFINITY*/
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory; /* Efecto "imán" al desplazar */
  scroll-behavior: smooth; /* Desplazamiento suave */
  -webkit-overflow-scrolling: touch; /* Mejora el scroll en iOS */


}

.nav-tab {
  padding: 10px 20px;
  background: none;
  border-radius: 25px;
  cursor: pointer;
  color: var(--dp-gray);
  font-size: 18px;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 1px solid var(--dp-gray-light);
}

.nav-tab.active {
  background: #007bff;
  font-weight: 700;
  color: var(--dp-white);
  border: none;

}

.nav-tab:not(.active) {
  color: #666;
}

.nav-tab:hover:not(.active) {
  background: #f0f0f0;
}

@media (max-width: 768px) {
  .nav-tabs {
    justify-content: flex-start;
    gap: 15px;
    padding: 0 20px;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    padding: 8px 16px;
    font-size: 13px;
    flex-shrink: 0;
    min-width: fit-content;
  }
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
}

.pagination-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--dp-gray-light);
  background: none;
  color: var(--dp-black);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
  user-select: none;
}

.pagination-item:hover:not(.active):not(.disabled) {
  background-color: #f3f4f6;
  color: #374151;
}

.pagination-item.active {
  background-color: var(--dp-blue);
  color: var(--dp-white);
  font-weight: 600;
}

.pagination-item.disabled {
  color: var(--dp-gray);
  cursor: not-allowed;
}

.pagination-item.disabled:hover {
  background: none;
}

.pagination-item.nav-button {
  padding: 0 2px;
  font-size: 16px;
  font-weight: 600;
}

.pagination-item.ellipsis {
  cursor: default;
  font-weight: 600;
}

.pagination-item.ellipsis:hover {
  background: none;
  color: #6b7280;
}

/* Responsive */
@media (max-width: 480px) {
  .pagination {
    gap: 2px;
    padding: 6px;
  }

  .pagination-item {
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }
}
.banner-wrapper {
  min-height: 0 !important;
  .banner-blog-content {
    padding: 56px 0 40px 0 !important;
  }
}

.blog-container {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 48px 100px;
  @media (max-width: 768px) {
    padding: 0 16px 32px 16px;
    gap: 24px;
  }

  .blog-nav-container {

  }

  .blog-banner-container {

    .blog-banner {


    }

    .blog-slider {
      background-color: black;
      width: 150px;
      height: 150px;
      z-index: 1;
    }
  }

  .blog-articles-container {
    margin: 0 auto;

    .blog-articles-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(200px, 339px));
      gap: 32px;
      @media (max-width: 768px) {
        grid-template-columns: 1fr;
        gap: 20px;
      }
    }
  }
}

.banner-wrapper {
  .content {
    padding: 82px 0;
  }
}

.banner-slider-container {
  margin-top: 50px;
  width: 100%;
  @media (max-width: 768px) {
    margin-top: 0;
  }

  .carousel-component {
    .title {
      @media (max-width: 768px) {
        justify-content: center;
        margin-bottom: 0;
      }

    }

    .slider-control {
      align-items: center;

      button {
        svg path {
          fill: var(--dp-white);
        }
      }
    }
  }
}

.carousel-component {
  display: grid;
  grid-template-areas:
  "title controls"
  "slider slider";

  .title {
    grid-area: title;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--dp-gap);

    h3, h1 {
      margin-bottom: 0;
    }
  }

  .slider-control {
    grid-area: controls;
    display: flex;
    justify-content: end;

    button {
      width: 64px;
      height: 64px;
      border: none;
      background-color: initial;
      display: flex;
      align-items: center;
      justify-content: center;

      svg path {
        fill: #1e1e1e;
      }
    }

    button:hover {
      cursor: pointer;
      border-radius: 50%;
      background: rgba(218, 218, 218, 0.20);
    }
  }

  .slider-control.static {
    display: none;
  }

  .slider {
    grid-area: slider;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    li {
      display: flex;
      width: 100%;
      flex-shrink: 0;

    }

    .short {
      width: 44% !important;
      margin-top: calc(50px - var(--dp-gap));
      @media (max-width: 768px) {
        margin-top: 0;
        width: 87% !important;
      }
    }

  }

  .slider:has(li.short) {
    gap: 20px;
    @media (max-width: 768px) {
      gap: 24px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

    li {
      scroll-snap-align: start
    }
  }

  .slider.related {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    gap: 32px;
    scrollbar-width: none;

    li {
      flex: 0 0 calc(100% / 3 - 32px * 2 / 3);
      scroll-snap-align: start;
      min-width: 0;

      @media (max-width: 1024px) {
        flex: 0 0 calc(50% - 16px);
      }

      @media (max-width: 768px) {
        flex: 0 0 100%;
      }
    }
    /*&:has(li:nth-child(3)) li{*/
    /*  */
    /*}*/
  }

  .slider.static {

    flex-wrap: wrap;
    justify-content: center;
    gap: var(--dp-gap);

    li {
      width: 30%;
    }
  }

  &:has(.slider li.short) {
    @media (max-width: 768px) {
      .slider-control {
        display: none;
      }
    }
  }

  &:has(.slider.related) {
    .title {
      @media (max-width: 768px) {
        justify-content: center;
        h3 {
          text-align: center;
        }
      }
    }
  }
}

@media (width <= 1024px) {
  .carousel-component {
    grid-template-areas:
      "title"
      "slider"
      "controls";

    .title {
      h3 {
        text-align: left;
      }
    }

    .slider {
      margin-bottom: var(--dp-gap-small, 12px);
      @media (max-width: 768px) {
        margin-bottom: 0;
      }
    }

    .slider.static {
      column-gap: unset;
      flex-wrap: nowrap;
      justify-content: unset;

      li {
        width: 100%;

      }
    }

    .slider-control {
      grid-area: controls;
      justify-content: center;
    }

    .slider-control.static {
      display: flex;
    }
  }

}

@media (width >= 1024px) {
  .carousel-component {
    grid-template-columns: 3fr 1fr;
  }
}

@media (width >= 1024px) {
  .projects-by-service {
    .carousel-component {
      .slider {
        gap: var(--dp-gap-medium);

        li {
          width: calc(50% - var(--dp-gap-medium) / 2);
        }
      }
    }
  }
}




form {
  flex: 1;

  input[type="text"],
  input[type="password"],
  input[type="email"],
  textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--dp-gray-light);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: medium;
    resize: none;
  }

  input[type="submit"] {
    background-color: var(--dp-blue);;
    color: var(--dp-white);
    padding: 12px 20px;
    border: none;
    border-radius: 500px;
    cursor: pointer;
    max-width: 328px;
    margin-top: 10px;
  }

  input[type="submit"]:hover {
    background-color: var(--dp-blue-dark); /* Darker shade for hover */
  }

  &.user-login-form {
    padding: var(--dp-gap-big);
  }
}


