#home {
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* desktop: nombre + carrusel */
  align-items: center;
  margin: 0 auto;
  padding-top: 0;
  scroll-margin-top: 200px; /* altura del header */
}

#home > section {
  display: flex;
  align-items: center;
}

#home .name {
  justify-content: flex-start;
}

#home .name h1 {
  font-family: "AveriaLibre";
  font-size: 3.1vw;
}

/* ============================== parte del carrusel ==============================*/

#ellipse_animation {
  height: 100%;
  position: relative;
  min-height: 300px;
  display: inline-block;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

#ellipse_animation .logo_div {
  position: absolute;
  height: 100%;
  left: 13%;
  display: inline-flex;
  /* z-index: 1; */
}

#ellipse_animation .logo {
  max-width: 30vw;
  width: 100%;
  height: 100%;
  max-height: 10vw;
  min-width: 10vw;
  min-height: 10vw;
  filter: drop-shadow(1px 1px 0 white) drop-shadow(0 2px 0 white)
    drop-shadow(2px 0px 0 white) drop-shadow(-1px -1px 0 white);
  align-self: center;
  /* justify-self: center; */
  /* z-index: 1; */
}

#ellipse_animation .carrusel {
  width: 100%;
  height: 100%;
  position: absolute;
  justify-self: center;
  align-self: center;
  top: 20%;
  left: -45%;
  border-radius: 50%;
  z-index: 0;
}

#ellipse_animation .carrusel .items_logo {
  width: 6vw;
  height: 6vw;
  object-fit: contain;
  border-radius: 20px;
  transition: transform 0.3s ease;
}

/* Hover effect */
#ellipse_animation .carrusel img:hover {
  transform: scale(1.2);
  filter: drop-shadow(-1px -1px 0.3px var(--card-alt-bg))
    drop-shadow(0px 2px 0.3px var(--card-alt-bg))
    drop-shadow(1px 0px 0.3px var(--card-alt-bg))
    drop-shadow(1px 1px 0.3px var(--card-alt-bg));
  z-index: 3;
}

/* ======================== para pantallas pequeñas ======================== */
@media (max-width: 968px) {
  #home {
    grid-template-columns: 1fr; /* una sola columna */
    grid-template-rows: auto auto; /* primero nombre, luego carrusel */
    row-gap: 2rem;
    justify-items: center;
  }

  #home .name {
    order: 1;
    text-align: center;
  }

  #home .name h1 {
    font-size: 7vw; /* más grande en móvil */
  }

  #ellipse_animation {
    order: 2;
    width: 100%;
    min-height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #ellipse_animation .logo_div {
    align-self: center;
    justify-self: center;
    left: 45%;
    transform: translateX(-50%); /* centra el logo */
  }

  #ellipse_animation .logo {
    max-width: 40vw;
    max-height: 40vw;
    min-width: 26vw;
    min-height: 26vw;
  }

  #ellipse_animation .carrusel{
  left: -52%;
  }
    #ellipse_animation .carrusel .items_logo {
    width: 10vw;
    height: 10vw;
  }
}
