body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: url('static/fondo.jpg') center center / cover no-repeat fixed;
  color: #333;
}

/* === NAVBAR GENERAL === */
.navbar {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(46, 0, 62, 0.5); /* color original semi-transparente */
  backdrop-filter: blur(8px); /* difumina el fondo */
  padding: 12px 20px;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}


.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar .logo img {
  width: 36px;
  height: 36px;
}

.navbar .logo span {
  font-weight: 500;
  font-size: 16px;
}

.navbar .nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.navbar .nav-links a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
  color: #9333ea;
}

/* === TOGGLE MENU (MÓVIL) === */
.menu-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  background: #9333ea;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: none;
}

/* Menú flotante tipo chat desde arriba derecha */
.floating-menu {
  position: fixed;
  top: 70px;
  right: 16px;
  background: #2e003e;
  border-radius: 16px;
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 99;
  animation: slideFade 0.3s ease forwards;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}

.floating-menu.show {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.floating-menu a {
  color: white;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.floating-menu a:hover {
  color: #9333ea;
}

@keyframes slideFade {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive: solo en móviles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .navbar .nav-links {
    display: none !important;
  }
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.85);
  color: #222;
  border: none;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
}

.btn:hover {
  background-color: #9333ea;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 0 20px 6px rgba(147, 51, 234, 0.6);
}

.hero {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.hero h1 {
  font-size: 2.5rem;
  color: white;
  font-weight: bold;
}

.hero .btn {
  padding: 12px 24px;
  background: #7c207c;
  color: white;
  border-radius: 25px;
  text-decoration: none;
  margin: 10px;
  display: inline-block;
}

.scroll-horizontal {
  overflow-x: auto;
  white-space: nowrap;
  padding: 40px 20px 30px 20px;
}

.scroll-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.scroll-item {
  flex: 0 0 36vw;
  max-width: 160px;
  min-width: 90px;
  aspect-ratio: 3/5;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0;
  box-shadow: 0 0 14px 4px #a855f7, 0 0 34px 14px #8f00ff99, 0 0 18px 3px #ea00d9a8;
  background: #140824;
}

.scroll-item:nth-child(1) { animation-delay: 0s; }
.scroll-item:nth-child(2) { animation-delay: 0.1s; }
.scroll-item:nth-child(3) { animation-delay: 0.2s; }
.scroll-item:nth-child(4) { animation-delay: 0.3s; }
.scroll-item:nth-child(5) { animation-delay: 0.4s; }
.scroll-item:nth-child(6) { animation-delay: 0.5s; }

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

.scroll-item img {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  z-index: 1;
}

.scroll-item:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px 12px rgba(168, 85, 247, 0.6);
}

.scroll-item:hover img {
  transform: scale(1.03);
}

.scroll-item button {
  position: absolute;
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  width: 62%;
  min-width: 50px;
  max-width: 100px;
  padding: 7px 0;
  background: rgba(235, 228, 234, 0.82);
  color: #18031d;
  border: none;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.81rem;
  cursor: pointer;
  box-shadow: 0 0 12px 3px #f7cfff, 0 2px 8px rgba(0,0,0,0.11);
  backdrop-filter: blur(2.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.scroll-item:hover button {
  transform: translateX(-50%) scale(1.1);
  background-color: #6406bd;
  color: white;
}

.scroll-container img {
  flex: 0 0 270px;
  height: 390px;
  object-fit: cover;
  border-radius: 12px;
  scroll-snap-align: start;
  transition: transform 0.3s ease;
}

.scroll-container img:hover {
  transform: scale(1.03);
}

@media (max-width: 1024px) {
  .scroll-container img {
    flex: 0 0 225px;
    height: 330px;
  }
}

@media (max-width: 600px) {
  .scroll-container img {
    flex: 0 0 195px;
    height: 285px;
  }
}

.tarjetas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 20px;
}

.tarjetas-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  background: #000;
}

.tarjetas-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.tarjetas-item:hover img {
  transform: scale(1.1);
}

/* Botón animado y centrado */
.tarjetas-item button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 75%;
  max-width: 240px;
  min-width: 80px;
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(255, 255, 255, 0.9);
  color: #222;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 10px 0;
  border-radius: 9999px;
  border: none;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tarjetas-item:hover button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
  pointer-events: auto;
  background: #9333ea;
  color: white;
  box-shadow: 0 0 24px rgba(147, 51, 234, 0.5);
}

/* Móvil: más chico, nunca se sale */
@media (max-width: 600px) {
  .tarjetas {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px;
  }
  .tarjetas-item button {
    width: 92%;
    max-width: 96vw;
    font-size: 0.97rem;
    padding: 9px 0;
    transform: translate(-50%, -50%) scale(0.96);
  }
  .tarjetas-item:hover button {
    transform: translate(-50%, -50%) scale(1.01);
  }
}



.cursos {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: stretch;
  padding: 16px 0 0 0;
}

.curso-item {
  flex: 0 0 170px;
  aspect-ratio: 1/1;
  border-radius: 16px;
  overflow: hidden;
  background: #0b0021;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px 2px #a855f7aa;
  position: relative;
}

.curso-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* SOLO EN ESCRITORIO: grid o filas normales */
@media (min-width: 700px) {
  .cursos {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 32px;
    justify-content: center;
  }
  .curso-item {
    flex: unset;
    min-width: 120;
    max-width: 220;
  }
}

/* SOLO EN MÓVIL: scroll horizontal de todas las tarjetas */
@media (max-width: 700px) {
  .cursos {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding: 0 4px 10px 4px;     scrollbar-width: thin;
    scrollbar-color: #a855f7 #2d003d;
  }
  .curso-item {
    flex: 0 0 72vw;
    max-width: 220px;
    min-width: 130px;
    aspect-ratio: 1/1;
    margin-right: 2px;
    border-radius: 15px;
  }
  .curso-item:last-child {
    margin-right: 12px;
  }
  .cursos::-webkit-scrollbar {
    height: 6px;
  }
  .cursos::-webkit-scrollbar-thumb {
    background: #a855f7;
    border-radius: 6px;
  }
  .cursos::-webkit-scrollbar-track {
    background: #2d003d;
  }
}


.logo-bounce {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  animation: boomIn 1s cubic-bezier(0.25, 1.5, 0.5, 1) forwards;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-bounce img {
  width: 36px;
  height: 36px;
}

.logo-bounce span {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: white;
}

/* Al hacer clic */
.logo-bounce:active {
  transform: scale(1.12);
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.6);
}

/* Animación de entrada estilo boom */
@keyframes boomIn {
  0% {
    opacity: 0;
    transform: scale(0.4) rotate(-8deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.08) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
.cursos360 {
  display: flex;
  flex-direction: row;
  gap: 3vw;
  padding: 18px 0 10px 0;
  justify-content: flex-start;
  overflow-x: auto;
  width: 100%;
  /* Padding horizontal para separar del borde */
  box-sizing: border-box;
  padding-left: 5vw;
  padding-right: 5vw;
  scrollbar-width: thin;
  scrollbar-color: #a855f7 #2d003d;
}

.flip-card {
  flex: 0 0 19vw;
  min-width: 110px;
  max-width: 170px;
  aspect-ratio: 1/1;
  perspective: 1200px;
  border-radius: 8px;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  position: relative;
  transition: transform 0.7s cubic-bezier(0.42,1.45,0.43,0.97);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner {
  transform: rotateY(180deg);
}

@media (hover: none) {
  .flip-card:active .flip-card-inner {
    transform: rotateY(180deg);
  }
}

.flip-card-front,
.flip-card-back {
  width: 100%; height: 100%;
  position: absolute; top: 0; left: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.flip-card-back {
  background: #9333ea;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  text-align: center;
  transform: rotateY(180deg);
  border-radius: 8px;
  box-shadow: 0 0 18px #5e0da999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.flip-card-back span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  height: 90%;
  font-size: clamp(0.7rem, 2.8vw, 1.1rem); /* 30% más pequeño */
  font-weight: 900;
  line-height: 1.1;
  word-break: break-word;
  padding: 5%;
  margin: auto;
  border-radius: 6px;
  background: rgba(0,0,0,0.04);
  box-sizing: border-box;
  white-space: normal;
}

/* Responsive móvil: tarjetas y bordes aún más chicos */
@media (max-width: 700px) {
  .cursos360 {
    gap: 2vw;
    padding: 10px 0 10px 0;
    padding-left: 3vw;
    padding-right: 3vw;
  }
  .flip-card {
    min-width: 17vw;
    max-width: 22vw;
    border-radius: 6px;
  }
  .flip-card-front,
  .flip-card-back,
  .flip-card-inner {
    border-radius: 6px;
  }
  .flip-card-back span {
    font-size: clamp(0.6rem, 2.7vw, 0.92rem); /* más chico en móvil */
    padding: 3%;
    border-radius: 5px;
  }
.whatsapp-fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 105px; /* Agrandado 50% desde 70px */
  height: 105px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  animation: fadeInScale 0.8s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-fixed:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0,0,0,0.5);
}

.whatsapp-fixed img {
  width: 105px;
  height: 105px;
}


/* Animación opcional */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

}