:root {
  --lila: #c6b7e2;
  --celeste: #bfe3ea;
  --coral: #f2a7a0;
  --texto: #3f3f3f;
  --blanco: #ffffff;
}

/* Animación de flotación */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--texto);
  background: linear-gradient(135deg, var(--lila), var(--celeste), var(--coral));

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
header {
  background: rgba(255,255,255,0.9);
  padding: 1rem 2rem;
}

nav {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.1);
}

nav strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  color: #6a5acd;
}

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--texto);
}

/* HERO */
.hero {
  text-align: center;
  padding: 5rem 2rem;
}

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
}

/* TEXTO CENTRAL */
.texto-central {
  max-width: 820px;
  margin: auto;
  padding: 3rem 2rem;
  text-align: center;
}

.logo-center {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.logo-body {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  animation: float 4s ease-in-out infinite;
}

.logo-body:hover {
  opacity: 1;
}

.texto-central p {
  line-height: 1.9;
  margin-bottom: 1.6rem;
}

.texto-central h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  color: #6a5acd;
}

.texto-central hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--lila), transparent);
  margin: 2.5rem 0;
}

/* BOTONES */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--coral);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 40px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

/* CTA */
.cta-central {
  margin-top: 3rem;
}

/* ACCESO A CURSOS */
.curso-content {
  width: 100%;
}

.acceso-codigo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.codigo-input {
  width: 100%;
  max-width: 250px;
  padding: 0.8rem;
  border: 2px solid var(--lila);
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  text-align: center;
  font-size: 0.95rem;
}

.codigo-input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 8px rgba(242, 167, 160, 0.3);
}

/* CARDS */
.contacto-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

.contacto-content {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: center;
  margin-bottom: 4rem;
}

.cards {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin: 0 auto;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card .btn {
  margin-top: auto;
}

/* UBICACIÓN */
.ubicacion-container {
  width: 100%;
  max-width: 900px;
  text-align: center;
}

.ubicacion-container h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: #6a5acd;
}

.ubicacion-container iframe {
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* FOOTER */
footer {
  margin: auto;
  text-align: center;
  padding: 1.5rem;
  background: rgba(255,255,255,0.6);
}

/* MOBILE */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .btn {
    width: 100%;
  }

  .contacto-container {
    padding: 1rem;
  }

  .ubicacion-container h2 {
    font-size: 1.8rem;
  }

  .ubicacion-container iframe {
    height: 300px !important;
  }

/* ===== FIX DEFINITIVO: centrar botones Comprar ===== */
.cards .card a.btn,
.cards .card button.btn {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
}

/* CHAT WIDGET BOT */
.chat-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 999;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chat-toggle.active {
  background: var(--lila);
}

.chat-widget {
  position: fixed;
  bottom: 80px;
  right: 2rem;
  width: 350px;
  max-height: 0;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
}

.chat-widget.open {
  max-height: 550px;
  overflow-y: auto;
}

.chat-header {
  background: linear-gradient(135deg, var(--lila), var(--celeste));
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Cormorant Garamond", serif;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bot-message,
.user-message {
  display: flex;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot-message p,
.user-message p {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  max-width: 85%;
  word-wrap: break-word;
  font-size: 0.95rem;
  line-height: 1.4;
}

.bot-message p {
  background: var(--celeste);
  color: var(--texto);
  border-radius: 12px 12px 12px 0;
}

.user-message {
  justify-content: flex-end;
}

.user-message p {
  background: var(--coral);
  color: white;
  border-radius: 12px 12px 0 12px;
}

.chat-options {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-top: 1px solid #f0f0f0;
}

.option-btn {
  padding: 0.9rem 1rem;
  background: var(--blanco);
  border: 2px solid var(--lila);
  border-radius: 12px;
  color: var(--texto);
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: "Inter", sans-serif;
}

.option-btn:hover {
  background: var(--lila);
  color: white;
  transform: translateY(-2px);
}

.action-btn {
  align-self: flex-end;
  padding: 0.8rem 1.5rem;
  background: var(--coral);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: #f09490;
  transform: translateY(-2px);
}

/* MOBILE */
@media (max-width: 768px) {
  .chat-toggle {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
  }

  .chat-widget {
    width: calc(100% - 2rem);
    right: 1rem;
    bottom: 70px;
    max-width: 320px;
  }

  .chat-widget.open {
    max-height: 500px;
  }

  .chat-messages {
    max-height: 250px;
  }

  .bot-message p,
  .user-message p {
    font-size: 0.9rem;
  }

  .option-btn {
    font-size: 0.85rem;
    padding: 0.8rem 0.9rem;
  }
}
