:root{
  --brand: #0d6efd;
  --ink: #111827;
  --muted: #6b7280;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --border: rgba(0,0,0,.08);
  --shadow: 0 12px 30px rgba(0,0,0,.08);
}

body{
  color: var(--ink);
  background: var(--surface-2);
}

/* Secciones suaves */
.section-soft{
  background: linear-gradient(180deg, rgba(13,110,253,.06), rgba(255,255,255,0));
}

/* HERO moderno */
.hero-modern{
  padding: 3.5rem 0 2.5rem;
}

.hero-badge{
  background: rgba(255,255,255,.8) !important;
}

.hero-title{
  letter-spacing: -0.02em;
}

.hero-media{
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: #e9eefc;
  min-height: 320px;
}

.hero-media img{
  width: 100%;
  height: auto;
  display: block;
}

.hero-media-overlay{
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 400px at 20% 10%, rgba(13,110,253,.22), rgba(255,255,255,0));
  pointer-events: none;
}

/* Stats */
.stat{
  background: rgba(255,255,255,.85);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: .9rem 1rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.stat-number{
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.2;
}

.stat-label{
  color: var(--muted);
  font-size: .9rem;
}

/* Feature cards */
.feature-card{
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
}

.card.ia-fixed-height:hover {
  transform: none !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
}


.icon-chip{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(13,110,253,.10);
  border: 1px solid rgba(13,110,253,.15);
  font-size: 1.25rem;
}

/* Check list */
.check{
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(13,110,253,.12);
  color: #0d6efd;
  font-weight: 700;
  flex: 0 0 24px;
}

/* Impact card */
.impact-card{
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.mini-card{
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: .9rem 1rem;
  background: rgba(255,255,255,.9);
}

.mini-title{
  font-weight: 700;
  margin-bottom: .15rem;
}

.mini-text{
  color: var(--muted);
  font-size: .95rem;
}

/* CTA banner */
.cta-banner{
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: rgba(255,255,255,.85);
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
  padding: 1.5rem 1.5rem;
}

/* Responsive */
@media (max-width: 576px){
  .hero-modern{padding-top: 2.5rem;}
  .hero-title{font-size: 2rem;}
  .mobile-hidden{display: none; }
}

.navbar-toggler {
  border: 1px solid rgba(0,0,0,.15);
}

.navbar-light .navbar-toggler-icon{
  opacity: .9;
}

.feature-card{
  transition: transform .15s ease, box-shadow .15s ease;
}

.feature-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
}

.project-card{
  border-radius: 1.25rem;
  overflow: hidden;
}

.project-media{
  height: 100%;
  min-height: 320px;
  background: #e9eefc;
}

.project-media img{
  object-fit: cover;
  height: 100%;
}

.team-card{
  position: relative;
  overflow: hidden;
}

.team-role{
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: rgba(17,24,39,.75);
  background: rgba(13,110,253,.10);
  border: 1px solid rgba(13,110,253,.15);
  padding: .35rem .55rem;
  border-radius: 999px;
  margin-bottom: .75rem;
}

.form-control, .form-select{
  border: 1px solid rgba(0,0,0,.10);
}

.form-control:focus, .form-select:focus{
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
  border-color: rgba(13,110,253,.45);
}

/* Desactivar hover en las tarjetas de la página de contacto */
.page-contacto .feature-card{
  transition: none;
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
}

.page-contacto .feature-card:hover{
  transform: none;
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
}

/* Botones de redes sociales*/
.social-buttons .btn{
  color: #fff;
  border: none;
  font-weight: 500;
}

/* Facebook */
.btn-facebook{
  background-color: #1877f2;
}
.btn-facebook:hover{
  background-color: #145dbf;
}

/* X (Twitter) */
.btn-x{
  background-color: #000000;
}
.btn-x:hover{
  background-color: #1a1a1a;
}

/* LinkedIn */
.btn-linkedin{
  background-color: #0a66c2;
}
.btn-linkedin:hover{
  background-color: #084d94;
}

/* Instagram (gradiente característico) */
.btn-instagram{
  background: radial-gradient(
    circle at 30% 30%,
    #feda75,
    #fa7e1e,
    #d62976,
    #962fbf,
    #4f5bd5
  );
}
.btn-instagram:hover{
  filter: brightness(.9);
}

/* WhatsApp */
.btn-whatsapp{
  background-color: #25D366;
  color: #fff;
  border: none;
  font-weight: 500;
}

.btn-whatsapp:hover{
  background-color: #1ebe5d;
  color: #fff;
}

.hp-field{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.integration-placeholder{
  border: 2px dashed rgba(0,0,0,.12);
  border-radius: 1.25rem;
  padding: 4rem 1.5rem;
  background: rgba(255,255,255,.7);
}

/*ASTRONAUTA*/

/* Tarjeta espacial */
.space-card{
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  min-height: 500px;
  border: 1px solid rgba(0,0,0,.08);

  /* Fondo espacio */
  background-image: url("../img/espacio.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Profundidad */
  box-shadow: 0 14px 34px rgba(0,0,0,.12);
}

/* Astronauta flotando */
.space-astronaut{
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  width: min(320px, 70%);
  height: auto;
  filter: drop-shadow(0 18px 22px rgba(0,0,0,.35));
  animation: floaty 5.5s ease-in-out infinite;
  pointer-events: none;
}

/* Brillo suave */
.space-glow{
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.22), rgba(255,255,255,0) 60%);
  mix-blend-mode: screen;
  opacity: .8;
  pointer-events: none;
}

/* Estrellas extra */
.space-stars{
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(255,255,255,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 35%, rgba(255,255,255,.7) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 70%, rgba(255,255,255,.6) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 75%, rgba(255,255,255,.8) 0 1px, transparent 2px);
  opacity: .35;
  animation: twinkle 6.5s ease-in-out infinite;
  pointer-events: none;
}

/* Animaciones */
@keyframes floaty{
  0%, 100% { transform: translate(-50%, -50%) translateY(0) rotate(-1.5deg); }
  50%      { transform: translate(-50%, -50%) translateY(-14px) rotate(1.5deg); }
}

@keyframes twinkle{
  0%, 100% { opacity: .25; }
  50%      { opacity: .45; }
}

/* Ajustes en móvil */
@media (max-width: 576px){
  .space-card{
  min-height: 100%;
}
  .space-astronaut{ width: min(260px, 78%); top: 58%; }
}

/* Chat */
.chat-box{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,.7);
  overflow-y: auto;
  max-height: 600px;
}

.chat-msg{
  max-width: 92%;
  padding: .7rem .85rem;
  border-radius: 1rem;
  margin-bottom: .6rem;
  line-height: 1.35;
}

.chat-msg.bot{
  background: rgba(13,110,253,.10);
  border: 1px solid rgba(13,110,253,.15);
}

.chat-msg.user{
  margin-left: auto;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.08);
}

.chat-typing{
  font-size: .9rem;
  color: rgba(0,0,0,.55);
}

/* Altura fija para chat */
.ia-fixed-height{
  height: 600px;
}

/* Ajuste en móvil */
@media (max-width: 576px){
  .ia-fixed-height{
    height: 640px;
  }
}

@media (max-width: 576px){

  /* Chat más compacto en móvil */
  .space-card.ia-fixed-height{
    height: 320px;
  }
}

/* Resaltado sutil mientras se reproduce la voz (TTS) */
.chat-msg.bot.is-speaking{
  outline: 2px solid rgba(13,110,253,.25);
  outline-offset: 2px;
}

.chat-images{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin: .5rem 0 1rem;
}

.chat-image-card img{
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.08);
  display: block;
}

.chat-image-meta{
  font-size: .75rem;
  color: rgba(0,0,0,.55);
  margin-top: .25rem;
}

@media (max-width: 576px){
  .chat-images{ grid-template-columns: 1fr; }
  .chat-image-card img{ height: 180px; }
}
