@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;

@layer base {
  body {
    @apply bg-gray-100 text-gray-900;
  }

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

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    @apply font-semibold;
  }

  p {
    @apply text-base leading-relaxed;
  }
}

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

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

#titleTransition.slide-in {
  animation: slideIn 1s ease-out forwards;

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

@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;
}

header nav {
  /* fondo semitransparente */
  background-color: rgba(255, 255, 255, 0.3);

  /* Safari y Chrome necesitan el prefijo */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

@supports not (
  (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
  nav {
    /* sigue teniendo semi-transparencia */
    background-color: rgba(255, 255, 255, 0.3);
  }
  nav::before {
    content: "";
    position: absolute;
    inset: 0;
    /* hereda el fondo (imagen del hero) de tu contenedor padre */
    background: inherit;
    filter: blur(12px);
    z-index: -1; /* colocarlo detrás de tu contenido */
  }
}

.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 */
  }
}

/* 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 */
}

/* Estilos para solucionar problema del dropdown con footer */
.custom-select {
  position: relative;
}

/* Asegurar que el dropdown tenga z-index alto */
.select-options {
  z-index: 9999 !important;
  position: absolute !important;
  background: white !important;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  max-height: 320px !important; /* Aumentado para 6 opciones */
  min-height: 60px; /* Altura mínima para evitar que se vea muy pequeño */
  overflow-y: auto;
  overflow-x: hidden;
  width: 100% !important;
  margin-top: 4px !important; /* Separación del botón */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #D1D5DB #F3F4F6; /* Firefox */
}

/* Webkit scrollbar para Chrome, Safari, Edge */
.select-options::-webkit-scrollbar {
  width: 6px;
}

.select-options::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 3px;
}

.select-options::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}

.select-options::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Contenedor principal con altura mínima para evitar overlap con footer */
.min-h-screen {
  min-height: 100vh !important;
}

/* Ajustar el contenedor del formulario para dar más espacio */
.form-container-safe {
  margin-bottom: 120px !important; /* Espacio extra para el footer */
  padding-bottom: 2rem !important;
}

/* Hacer que el dropdown se abra hacia arriba si está cerca del footer */
.select-options-up {
  bottom: calc(100% + 4px) !important; /* Separación del botón */
  top: auto !important;
  border-radius: 0.5rem !important;
  margin-top: 0 !important;
  margin-bottom: 4px !important;
}

/* Asegurar que el footer no interfiera */
footer {
  position: relative !important;
  z-index: 1 !important;
}

/* Override para el layout principal */
.layout-container {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.layout-footer {
  margin-top: auto;
  flex-shrink: 0;
}
