@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 1s; /* más tiempo = más suave */
  animation-timing-function: ease-in-out; /* suaviza entrada y salida */
}

::view-transition-old(root) {
  animation-name: slideOut;
}

::view-transition-new(root) {
  animation-name: slideIn;
}

@keyframes slideIn {
  from {
    transform: translateY(20%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-20%);
    opacity: 0;
  }
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
li,
ul,
img,
div,
section,
nav,
input,
textarea,
button,
form,
label,
select,
option {
  font-family: "Montserrat", sans-serif;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

body.menu-open::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 40;
}

#loader {
  position: fixed;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 1000;
}

.loader-container {
  position: absolute;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 1);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;

  .logo-images {
    position: relative;
  }

  .loader-logo-mini {
    width: 5rem;
    position: absolute;
    bottom: 0;
    left: 80px;
    animation: loader-rotate 1s linear infinite;
    transition: all 0.3s ease-in-out;

    &.animate-fade-out {
      width: 1.8em;
      left: 23px;
    }
  }

  .loader-logo-full {
    width: 15em;
    opacity: 0;

    &.show-loader-logo-full {
      opacity: 1;
      animation: fade-out 1s ease-in-out forwards;
      animation-delay: 1s;
    }
  }

  .opacity-0 {
    opacity: 0;
  }
}

@keyframes loader-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

@keyframes fade-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-200px) scale(1);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-carousel-ltr {
  animation: carousel-ltr 20s linear infinite;
}
.animate-carousel-rtl {
  animation: carousel-rtl 20s linear infinite;
}

.animate-delay-100 {
  animation-delay: 0.1s;
}

.animate-delay-200 {
  animation-delay: 0.2s;
}

.slider-container {
  position: relative;
  overflow: hidden;
}

.slider-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
  margin: 0 50px;
}

.slide {
  min-width: 100%;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .slide {
    min-width: 50%;
  }
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-button:hover {
  background: white;
  transform: translateY(-50%) scale(1.05);
}

.nav-button.prev {
  left: 10px;
}

.nav-button.next {
  right: 10px;
}

.dots-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #3b82f6;
  transform: scale(1.2);
}

.text-primary {
  color: #3b82f6;
}

.testimonial-card {
  transform: translateX(0);
  opacity: 1;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
}

.carousel {
  .slick-track {
    display: flex;
    align-items: center;
  }
  img {
    padding: 0 50px;
  }
}

.d-none {
  display: none;
}

/* ---- whatsapp ----*/
@keyframes whatsapp_animation {
  0% {
    opacity: 0;
    right: 0;
    bottom: 4%;
  }
  100% {
    opacity: 1;
    right: 4%;
    bottom: 4%;
  }
}

@keyframes whatsapp_rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

.w-flotante {
  opacity: 0;
  background-color: green;
  width: 4rem;
  height: 4rem;
  position: fixed;
  bottom: 4%;
  right: 4%;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  /* animation */
  animation-name: whatsapp_animation;
  animation-duration: 2s;
  animation-delay: 2s;
  animation-fill-mode: forwards;

  &:hover {
    background-color: #2879ff;
  }

  .whatsapp {
    color: white;
    font-size: 2.5rem;
    /* animation */
    animation-name: whatsapp_rotation;
    animation-duration: 2s;
    animation-delay: 2s;
    animation-fill-mode: forwards;
  }
}
