/** {
  outline: 1px solid rgb(208, 223, 8);
} */

.contentdeinicio {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  animation: fadeIn 1.5s ease-out;
  position: relative;
  padding-top: 2rem; /* Espacio superior general */
}

.inicio_contenido {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: 0 20px;
}

.logo-desc-container {
  flex: 0 1 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.inicio_logo {
  fill: #f6fffe;
  width: 620px; /* Tamaño más pequeño */
  max-width: 100%;
  margin-top: 6rem;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease-out forwards;
}

.inicio_logo svg {
  max-width: 100%;
  margin-right: 2px;
  height: auto;
}

#svg_logo_veganimo .cls-1 {
  fill: none; /* Inicialmente sin relleno */
  stroke: #f6fffe;
  stroke-width: 1px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: draw 2s ease-out forwards;
}

@keyframes draw {
  0% {
    stroke-dashoffset: 2600;
    fill-opacity: 0;
  }

  70% {
    stroke-dashoffset: 0;
    fill-opacity: 0; /* Mantener sin relleno hasta el 70% */
  }

  100% {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    fill: #f6fffe; /* Rellenar al final */
  }
}

.imagen_lado {
  flex: 0 1 46%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeInRight 1s ease-out 0.5s forwards;
  padding-top: 2rem; /* Alineación vertical con el logo */
}

.imagen_lado img {
  max-width: 100%;
  height: auto;
  max-height: 550px;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.div_descripcion {
  margin: 0;
  font-size: 1.2rem;
  color: #f6fffe;
  max-width: 100%;
  line-height: 1.6; /* Mejor legibilidad */
  animation: fadeInUp 1s ease-out 0.3s forwards;
}

.div_descripcion p {
  margin-bottom: 1rem; /* espaciado entre párrafos */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards;
}

.div_descripcion p:first-child {
  animation-delay: 0.5s;
}

/* Boton de descubrir */

.btn-descubrir {
  margin: 40px 0 20px; /* Top-right-bottom-left */
  position: relative;
  background-image: linear-gradient(to bottom right, #f8c78c 40%, #e99a3c 60%);
  width: 240px;
  height: 60px;
  color: #1a1c1c;
  border-radius: 60px;
  display: flex;
  align-items: center;
  text-decoration: none;
  letter-spacing: 2px;
  border-top: 0.5px solid rgb(0 0 0 / 35%);
  border-left: 0.5px solid rgb(0 0 0 / 35%);
  cursor: pointer;
  transition: 0.35s ease;
  padding-left: 20px;
}

.btn-descubrir:hover {
  /* box-shadow: 0px 6px 0px #c9812a;  */
  box-shadow: 7px 5px 56px -14px #c9812a;
}

.slogan_inicio {
  width: 100%;
  text-align: end;
  color: #f6fffe;
  font-size: 1.5rem;
  margin-top: -20px;
  margin-bottom: 70px;
  margin-right: 30px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll */
.main__action span {
  color: #f6fffe;
  text-decoration: none;
}

.main__action {
  position: absolute;
  bottom: 50px;
  right: 37.5%;
  width: 46px;
}

.main__action:hover .main__scroll-box {
  animation: scroll-down 3s infinite;
}

/* Animate scroll icon */
@keyframes scroll-down {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }

  35% {
    transform: translateY(1rem);
    opacity: 0;
  }

  70% {
    transform: translateY(-1rem);
    opacity: 0;
  }
}

/*  */

/* Animación de hojas */
.leaf-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 70%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
  animation: hideLeaves 10s forwards;
}

.leaf {
  position: absolute;
  width: 40px;
  height: 40px;
  opacity: 0;
  animation: leafFloat 8s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 20%));
}

.leaf:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;

  --leaf-rotate: 15deg;
}

.leaf:nth-child(2) {
  top: 30%;
  left: 80%;
  animation-delay: 1s;

  --leaf-rotate: -10deg;
}

.leaf:nth-child(3) {
  top: 60%;
  left: 20%;
  animation-delay: 2s;

  --leaf-rotate: 25deg;
}

.leaf:nth-child(4) {
  top: 40%;
  left: 60%;
  animation-delay: 3s;

  --leaf-rotate: -15deg;
}

.leaf:nth-child(5) {
  top: 70%;
  left: 50%;
  animation-delay: 4s;

  --leaf-rotate: 10deg;
}

@keyframes leafFloat {
  0% {
    opacity: 0;
    transform: translateY(20px) rotate(var(--leaf-rotate, 0deg));
  }

  10%,
  90% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-100px)
      rotate(calc(var(--leaf-rotate, 0deg) + 360deg));
  }
}

@keyframes hideLeaves {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Optimización para animaciones */
@media (prefers-reduced-motion: no-preference) {
  .leaf {
    animation: leafFloat 8s ease-in-out infinite !important;
  }
}

/* ------------------------------------------------------------------------------------ */
@media (width <= 1024px) {
  /* Ajustes para tablet */
  .logo-desc-container {
    flex: 0 1 55%;
  }

  .imagen_lado {
    flex: 0 1 40%;
  }

  .inicio_logo {
    width: 350px;
  }
}

@media (width <= 768px) {
  /* Estilos específicos para móvil */
  .content-inicio::before,
  .content-inicio::after {
    width: 100%;
    height: 50%;
  }

  .content-inicio::after {
    top: 50%;
  }

  .logo-desc-container,
  .imagen_lado {
    flex: 1 1 100%;
    padding-top: 1rem; /* Menos espacio en móvil */
  }

  .logo-desc-container {
    order: 1;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .inicio_logo {
    width: 280px;
    margin: 2rem auto 0; /* Centrado y con espacio */
    padding-top: 0;
  }

  .div_descripcion {
    max-width: 90%;
    margin: 0 auto;
    order: 3;
    text-align: center;
  }

  .imagen_lado {
    order: 2;
    margin: 1rem 0;
    padding-top: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
  }

  .slogan_inicio {
    order: 4;
    text-align: center;
    padding-right: 0;
    margin: 1.5rem 0;
    font-size: 1.3rem;
  }

  .btn-explorar {
    order: 5;

    /* margin: 1.5rem auto 0; / **/
    margin: 0 0 20px 0 auto; /* top-right-bottom-left */
  }
}

@media (width <= 480px) {
  /* Ajustes adicionales para móviles pequeños */
  .inicio_logo {
    width: 250px;
  }

  .div_descripcion {
    font-size: 1.1rem;
    max-width: 95%;
  }

  .slogan_inicio {
    font-size: 1.2rem;
  }
}
