@config "./tailwindcss-config.js";
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

body {
  font-size: clamp(14px, 1.5vw, 16px);
}

/* Extra Bold Italic */
@font-face {
  font-family: "ElanorExtraBoldItalic";
  src: url("./fonts/ElanorFreePersonalUse-ExBdIt.otf") format("opentype");
  font-weight: 800; /* ajusta si quieres */
  font-style: italic;
  font-display: swap;
}

/* Extra Light */
@font-face {
  font-family: "ElanorExtraLight";
  src: url("./fonts/ElanorFreePersonalUse-ExtLt.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@layer base {
  body {
    font-size: clamp(14px, 1.5vw, 16px);
  }

  * {
    font-family: "DM Sans";
  }
}

@keyframes slideIn {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(100vw - 100%));
  }
}

#titleTransition.slide-in {
  font-family: "ElanorExtraLight", sans-serif;
  animation: slideIn 1s ease-out forwards;

  @media screen and (max-width: 768px) {
    animation: slideIn 3s ease-out forwards;
  }

  span {
    font-family: "ElanorExtraLight", sans-serif;
  }
}

@keyframes redToWhite {
  from {
    color: #e04848;
  }
  to {
    color: #ffffff;
  }
}

/* Al hacer hover en la card (grupo), animamos la span */
.card:hover span {
  /* delay 0.2s para que primero veas el rojo un instante */
  animation: redToWhite 0.3s ease 0.2s forwards;
}

.card:hover p {
  color: #e04848;
  /* delay 0.2s para que primero veas el rojo un instante */
  animation: redToWhite 0.3s ease 0.2s forwards;
}

#navbar {
  /* semi-transparente para que se vea lo de atrás */
  background-color: rgba(255, 255, 255, 0.3);

  /* ahora es el nav el que “fija” su posición */
  position: fixed;

  z-index: 999999999;
  left: 50%;
  transform: translateX(-50%);
  top: 25px;

  /* borrado de fondo */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);

  /* -> eliminamos isolation/transform/will-change */
}

.multiple-slide-carousel.swiper-container {
  overflow: hidden !important;
  /* 2) Deja hueco a izquierda y derecha para las flechas */
  padding: 0 1rem; /* ajusta “2rem” al ancho de tus botones */
  position: relative; /* asegúrate de que sea relativo */

  @media screen and (max-width: 768px) {
    padding: 0; /* reduce el padding en pantallas pequeñas */
    margin: 0 20px; /* añade margen para centrar el swiper */
  }
}
.multiple-slide-carousel-2 {
  .swiper-slide {
    width: 80%;
    max-width: 100%;
  }
}

.multiple-slide-carousel-2.swiper-container {
  padding-bottom: 64px !important;
  -webkit-transition-timing-function: linear !important;
  transition-timing-function: linear !important;
  position: relative;
}

.swiper-button-prev-2 {
}
.swiper-button-next-2 {
}

/* 3) Sitúa las flechas pegadas al padding, no fuera */
.swiper-button-prev {
  left: 0 !important;
}
.swiper-button-next {
  right: 0 !important;
}

.swiper-pagination-bullet-active {
  background-color: #e04848 !important;
}

.title-large {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 56px;
  line-height: 56px;
  letter-spacing: -0.04em;
}

.title-medium {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -0.04em;
}

.title-small {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 44px;
  letter-spacing: -0.04em;
}

.title-xsmall {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 24px;
  letter-spacing: -0.04em;
}

.body-large {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 44px;
  letter-spacing: -0.02em;
}

.body-medium {
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 20px;
  letter-spacing: 0;
}

.body-medium-bold {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 20px;
  letter-spacing: 0;
}

.body-small {
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
}

.quote {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 44px;
  letter-spacing: -0.04em;
}

.caption {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 44px;
  letter-spacing: -0.04em;
}

.button-text {
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.01em;
}

.overline {
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.01em;
}

/* Mobile overrides */
@media (max-width: 767px) {
  .title-large {
    font-size: 38px;
    line-height: 36px;
    letter-spacing: -0.04em;
  }
  .title-medium {
    font-size: 38px;
    line-height: 36px;
    letter-spacing: -0.04em;
  }
  .title-small {
    font-size: 32px;
    line-height: 38px;
    letter-spacing: -0.04em;
  }
  .title-xsmall {
    font-size: 24px;
    line-height: 24px;
    letter-spacing: -0.04em;
  }

  .body-large {
    font-size: 22px;
    line-height: 32px;
    letter-spacing: -0.04em;
  }
  .body-medium {
    font-size: 18px;
    line-height: 20px;
    letter-spacing: 0;
  }
  .body-medium-bold {
    font-size: 18px;
    line-height: 20px;
    letter-spacing: 0;
  }
  .body-small {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0;
  }

  .quote,
  .caption {
    font-size: 40px;
    line-height: 44px;
    letter-spacing: -0.04em;
  }

  .button-text,
  .text-overline {
    font-size: 18px;
    line-height: 24px;
    letter-spacing: -0.01em;
  }
}

.step {
  width: 185px !important;
  overflow: hidden !important;
  padding: 0 1rem; /* ajusta “2rem” al ancho de tus botones */
  position: relative; /* asegúrate de que sea relativo */
}

.relative.z-10.text-center.px-6.pt-8.pb-8 {
  padding-top: 0rem !important;
}

.relative.z-10.bg-white.mx-5.mb-8.px-5.pt-4.pb-6.rounded-2xl.shadow-lg.md\:w-1\/2.md\:mx-auto {
  margin-bottom: auto !important;
}

.relative.z-10.text-center.pb-6 {
  padding: 1.5rem 0 !important;
  position: relative;
  bottom: 0;
  width: 100%;
}

/* Media query más estricto para pantallas muy pequeñas */

@media screen and (max-width: 1366px) {
  #navbar {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    top: 11px;
  }

  .title-large {
    font-size: clamp(36px, 4vw, 44px) !important;
  }

  header {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  /* Reducir espacios verticales */
  .md\:pt-48 {
    padding-top: 6rem !important;
  }

  .py-48 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
  }

  /* Reducir el tamaño de imágenes responsivas */
  .md\:h-\[820px\] {
    height: 550px !important;
  }

  #hero-image {
    width: 50% !important;
    height: 550px !important;
    left: 75% !important;
  }

  #hero-image-2 {
    width: 55% !important;
    height: 550px !important;
  }

  #hero-2-section {
    padding-top: 11.5rem !important;
    padding-bottom: 10rem !important;
    gap: 0;
  }

  #hero-2-steps {
    padding-top: 3rem !important;
    > div {
      height: 170px !important;
    }
  }

  /* Ajustes del carrusel para monitores pequeños */
  #static-carousel {
    .swiper-slide {
      height: 130px !important;
    }

    .swiper-slide img {
      max-height: 130px !important;
      width: 110px !important;
      height: 110px !important;
    }
  }

  #static-carousel-section {
    padding-top: 0rem !important;
    padding-bottom: 0rem !important;
  }

  /* Ajustes para la navbar en pantallas pequeñas */
  header {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  /* Reducir elementos demasiado altos */
  .md\:h-\[656px\] {
    height: 500px !important;
  }

  /* Reducir padding del footer */
  footer.py-24 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Ajuste de elementos flexibles */
  .md\:gap-24 {
    gap: 1rem !important;
  }

  .relative .z-10 .text-center .px-6 .pt-8 .pb-8 {
    padding-top: 0rem !important;
  }
}

@media screen and (max-width: 1440px) {
  .min-h-screen.bg-cover.bg-top.text-black.font-sans {
    .min-h-screen {
      min-height: 100vh;
    }

    /* Ajustar header */
    header {
      padding-top: 1rem !important;
      padding-bottom: 0.5rem !important;
    }

    /* Reducir espacios del hero */
    .pt-8 {
      padding-top: 1rem !important;
    }

    .pb-8 {
      padding-bottom: 1rem !important;
    }

    /* Hacer el formulario más compacto */
    .rounded-2xl {
      margin-bottom: 1rem !important;
      padding: 1rem !important;
    }

    /* Reducir espacios entre campos */
    .my-4,
    .mb-4 {
      margin-bottom: 0.75rem !important;
      margin-top: 0.75rem !important;
    }

    /* Hacer inputs más pequeños */
    input,
    .select-btn {
      font-size: 16px !important;
      padding-bottom: 0.25rem !important;
    }

    /* Labels más pequeños */
    label {
      font-size: 16px !important;
      margin-bottom: 0.25rem !important;
    }

    input[type="checkbox"] {
      margin-bottom: 1rem !important;
      margin-top: 1rem !important;
    }
    input[type="checkbox"] ~ span {
      margin-bottom: 1rem !important;
      margin-top: 1rem !important;
    }

    /* Reducir tamaño del título */
    h1 {
      font-size: 18px !important;
    }

    /* Texto descriptivo más pequeño */
    .text-\[16px\] {
      font-size: 14px !important;
    }

    /* Botón más compacto */
    button.w-full {
      padding-top: 0.5rem !important;
      padding-bottom: 0.5rem !important;
    }

    /* Footer más pequeño */
    footer {
      padding-bottom: 1rem !important;
    }

    /* Grid más compacto */
    .\[grid-template-columns\:100px_1fr\] {
      grid-template-columns: 70px 1fr !important;
      gap: 1rem !important;
    }

    .space-y-1.mb-6 {
      margin-bottom: 0.5rem !important;
    }

    .border-gray-200.mb-6 {
      margin-bottom: 0.5rem !important;
    }
  }
}

@media screen and (max-width: 1366px) {
  .min-h-screen.bg-cover.bg-top.text-black.font-sans {
    /* Ajustes aún más agresivos para pantallas muy pequeñas */
    .pt-8 {
      padding-top: 0.5rem !important;
    }

    .pb-8 {
      padding-bottom: 0.5rem !important;
    }

    /* Formulario aún más compacto */
    .rounded-2xl {
      margin: 0.5rem !important;
      padding: 0.75rem !important;
    }

    .my-4,
    .mb-4 {
      margin-bottom: 0.5rem !important;
      margin-top: 0.5rem !important;
    }

    /* Elementos aún más pequeños */
    h1 {
      font-size: 16px !important;
    }

    input,
    .select-btn,
    label {
      font-size: 14px !important;
    }

    /* Reducir altura del header */
    header {
      padding-top: 0.5rem !important;
    }

    .relative.z-10.bg-white.mx-5.mb-8.px-5.pt-4.pb-6.rounded-2xl.shadow-lg.md\:w-1\/2.md\:mx-auto {
      margin-left: auto !important;
      margin-right: auto !important;
      padding: 12px 16px !important;
    }

    .w-full.button-text.py-3.rounded-full.hover\:bg-purple-500.transition {
      font-size: 14px !important;
    }

    .select-value {
      font-size: 14px !important;
    }
  }
}
