/* ===============================
   RESPONSIVE — LIMONIT
   core/static/css/responsive.css
   REEMPLAZA el archivo anterior completo
 ================================= */
/* ===============================
   RESPONSIVE
================================= */

@media (max-width: 768px) {

  .assistant-widget {
    width: var(--assistant-mobile-size);
    right: 15px;
  }

  .chat-widget {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 90px;
    top: auto;
    transform: none;
  }

  .assistant-bubble {
    display: none;
  }
}
/* ===============================
   BURBUJA ASISTENTE — Desktop
 ================================= */
.assistant-bubble {
  position: fixed;
  right: 340px;
  top: 50%;
  transform: translateY(-50%) scale(0.95);
  background: var(--bg-main, #fff);
  border: 1.5px solid rgba(37, 124, 66, 0.3);
  border-radius: 14px 14px 0 14px;
  padding: 0.65rem 1rem;
  font-family: 'Zalando Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
  max-width: 230px;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.assistant-widget:hover:not(.chat-active) + .assistant-bubble {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}

/* .visible eliminada por pedido de hover-only */

@keyframes bubbleDesktop {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.85);
  }

  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.assistant-bubble strong {
  background: var(--limonit-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* triángulo → derecha */
.assistant-bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 9px solid rgba(37, 124, 66, 0.3);
}

.theme-dark .assistant-bubble {
  background: var(--card-bg, #0c1117);
  border-color: rgba(224, 199, 7, 0.35);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.theme-dark .assistant-bubble::after {
  border-left-color: rgba(224, 199, 7, 0.35);
}

/* Reducir espacio en burbujas de chat */
.limon-emoji {
  margin: 0 1px !important;
  display: inline-block;
  vertical-align: middle;
}
.msg.bot div {
  line-height: 1.3 !important;
}

/* ===============================
   FORM — Fix Bootstrap azules
 ================================= */
#contact .btn.btn-primary,
#contact button[type="submit"] {
  background: var(--limonit-gradient) !important;
  background-size: 200% 200% !important;
  border: none !important;
  color: #000 !important;
  font-weight: 600 !important;
  padding: 0.75rem 2.5rem !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  transition: all 0.3s ease;
}

#contact .btn.btn-primary:hover,
#contact button[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(36, 159, 78, 0.3) !important;
  background-position: right center !important;
  color: var(--limonit-yellow) !important;
}

#contact .contact-direct a,
#contact .contact-direct i,
#contact .contact-direct .bi {
  color: var(--limonit-green) !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

#contact .contact-direct a:hover {
  color: var(--limonit-yellow) !important;
}

.theme-dark #contact .contact-direct a,
.theme-dark #contact .contact-direct i,
.theme-dark #contact .contact-direct .bi {
  color: var(--limonit-yellow) !important;
}

/* ===============================
   TABLET ≤ 1100px
 ================================= */
@media (max-width: 1100px) {
  .hero-inner {
    flex-direction: column;
    text-align: left; 
    align-items: flex-start;
  }

  .hero-content {
    max-width: 100%;
    flex: 1 1 100%;
  }

  .mockup {
    max-width: 70%; 
    flex: 1 1 100%;
    margin: 2rem auto 0;
  }

  .hero-buttons {
    justify-content: flex-start; 
    flex-wrap: wrap;
  }

  .hero ul {
    align-items: flex-start; 
  }

  /* Protección navbar */
  .nav-content {
    padding: 0 var(--page-gutter) !important;
  }

  /* Asistente baja a esquina */
  .assistant-widget {
    right: 1.5rem;
    top: auto;
    bottom: 1.5rem;
    transform: none;
  }

  .assistant-img {
    height: 280px !important;
    width: auto !important;
  }

  /* Burbuja */
  .assistant-bubble {
    right: 1.5rem;
    bottom: 195px;
    top: auto;
    transform: none;
    border-radius: 14px 14px 0 14px;
  }

  .assistant-widget:hover:not(.chat-active) + .assistant-bubble {
    opacity: 1;
    animation: bubbleBottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }

  @keyframes bubbleBottom {
    from {
      opacity: 0;
      transform: translateY(10px) scale(0.85);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  /* Triángulo abajo */
  .assistant-bubble::after {
    top: auto;
    right: 18px;
    bottom: -9px;
    transform: none;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 9px solid rgba(37, 124, 66, 0.3);
    border-bottom: none;
  }

  .theme-dark .assistant-bubble::after {
    border-top-color: rgba(224, 199, 7, 0.35);
    border-left-color: transparent;
  }

  .chat-widget {
    right: 1.5rem;
    top: auto;
    bottom: 200px;
    transform: none;
    width: 340px;
  }
}

/* ===============================
   MOBILE ≤ 768px
 ================================= */
@media (max-width: 768px) {

  /* Body offset */
  body {
    padding-top: 100px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1040 !important;
  }

  section {
    scroll-margin-top: 70px !important;
  }

  /* Navbar */
  .navbar {
    height: auto !important;
    min-height: 100px !important; 
    padding: 0.6rem 0 !important;
  }

  .nav-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 var(--page-gutter) !important;
    height: 70px !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
  }

  /* Logo navbar mobile — grande y legible */
  .navbar a {
    display: flex !important;
    align-items: center !important;
  }

  .navbar .logo {
    height: 70px !important; 
    max-height: 70px !important;
    width: auto !important;
    margin-left: 0.5rem !important;
  }


  /* Grupo mobile */
  .navbar-right-group {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
  }

  /* Solicitar en grupo mobile */
  .navbar-right-group .btn-primary-solicitar {
    font-size: 0.62rem !important; 
    padding: 0.35rem 0.5rem !important; 
  }

  /* Hamburguesa visible */
  .nav-toggle {
    display: flex !important;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
  }

  .nav-toggle span {
    width: 26px;
    height: 3px;
  }

  /* Panel menu */
  .nav-right {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: var(--bg-main, #fff) !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2rem !important;
    margin-left: 0 !important;
    z-index: 1050 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
    transition: opacity 0.25s ease, transform 0.25s ease !important;
    display: flex !important;
    overflow: hidden !important;
  }

  /* Fondo sutil en el panel */
  .nav-right::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/static/img/fondo/abstract-background-ew2loh8463ce0z64.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
  }

  .nav-right.open {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: all !important;
    transform: translateY(0) !important;
    position: fixed !important;
  }

  /* Links del menú fullscreen */
  .nav-links {
    position: relative !important;
    z-index: 1 !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.8rem !important;
    display: flex !important;
  }

  .nav-links a {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
  }

  /* Botón de asesoramiento visible en el menú fullscreen */
  .nav-right .btn-primary-solicitar {
    display: flex !important;
    padding: 0.8rem 1.5rem !important;
    font-size: 1rem !important;
    margin-top: 1rem;
    border-radius: 12px !important;
  }

  /* Theme btn dentro del panel */
  .nav-right .theme-btn {
    position: relative !important;
    z-index: 1 !important;
    font-size: 1.8rem !important;
    margin-left: 0 !important;
    display: block !important;
  }

  /* Heroes */
  .hero {
    padding: 2rem 1.25rem !important;
  }

  .hero-inner {
    flex-direction: column !important;
    text-align: left !important; 
    align-items: stretch !important; /* Estirar al ancho completo del body */
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .hero-content {
    max-width: 100% !important;
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  #asesoramiento .hero-inner {
    gap: 3rem;
  }

  #asesoramiento .hero-content.ms-auto {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .mockup {
    max-width: 80% !important; 
    flex: 1 1 100% !important;
    margin: 1rem auto 0 !important;
  }

  .hero h1, .hero h2 {
    font-size: clamp(1.35rem, 6vw, 1.85rem) !important;
    word-break: break-word !important; 
  }

  .card, .plan-card, .bento-item {
    margin-bottom: 2rem !important;
  }

  .hero p {
    font-size: 0.9rem !important;
  }

  /* Hero buttons */
  .hero-buttons {
    flex-direction: column !important;
    align-items: flex-start !important; 
    gap: 0.65rem !important;
    margin-top: 1.25rem !important;
  }

  .btn-primary-hero,
  .btn-secondary-hero {
    width: auto !important; 
    text-align: left !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.85rem !important;
    min-width: unset !important;
    white-space: normal !important;
  }

  .hero ul {
    align-items: flex-start !important;
    margin: 0.75rem auto !important;
    display: inline-flex !important;
    text-align: left !important;
  }

  /* --- Footer mobile --- */
  .footer {
    padding: 1.2rem 0 !important;
  }

  .footer-content {
    gap: 0.3rem !important;
  }

  .footer-content .logo,
  .footer .footer-logo {
    height: 90px !important;
    margin-left: 0 !important;
  }

  .footer-copy {
    font-size: 0.5rem !important;
  }

  /* Asistente */
  .assistant-widget {
    right: 1.2rem !important;
    bottom: 2rem !important; 
    top: auto !important;
    transform: none !important;
    z-index: 1020 !important;
  }

  .assistant-canvas {
    width: 114px !important; 
    height: 140px !important; 
  }

  .assistant-img {
    height: 180px !important; 
    width: auto !important;
  }

  .assistant-glow {
    inset: -14px !important;
  }


  /* Burbuja */
  .assistant-bubble {
    right: 1rem !important;
    bottom: 320px !important; 
    top: auto !important;
    left: auto !important;
    transform: none !important;
    max-width: 195px !important;
    font-size: 0.74rem !important;
    border-radius: 12px 12px 0 12px !important;
  }

  .assistant-bubble::after {
    top: auto !important;
    right: 14px !important;
    bottom: -9px !important;
    transform: none !important;
    border-left: 8px solid transparent !important;
    border-right: 8px solid transparent !important;
    border-top: 9px solid rgba(37, 124, 66, 0.3) !important;
    border-bottom: none !important;
  }

  .theme-dark .assistant-bubble::after {
    border-top-color: rgba(224, 199, 7, 0.35) !important;
    border-left-color: transparent !important;
  }

  /* Chat */
  .chat-widget {
    right: 0.75rem !important;
    left: 0.75rem !important;
    bottom: 280px !important; 
    top: auto !important;
    width: auto !important;
    max-height: 70vh !important;
    transform: none !important;
  }

  /* --- Planes Responsive --- */
  .plan-features-mobile {
    display: none; /* Oculto por defecto en mobile */
  }

  .plan-features-mobile.show {
    display: block;
    animation: slideDown 0.3s ease-out;
  }

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

  .btn-toggle-features {
    display: block !important;
    background: rgba(32,116,60,0.1);
    color: var(--limonit-green);
    border: 1px solid var(--limonit-green);
    padding: 0.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 600;
    font-size: 0.8rem;
  }
}

/* ===============================
   MOBILE PEQUEÑO ≤ 400px
 ================================= */
@media (max-width: 400px) {

  .navbar .logo,
  .navbar a .logo {
    height: 40px !important; 
  }

  .footer-content .logo,
  .footer .footer-logo {
    height: 72px !important;
  }

  .navbar-right-group .btn-primary-solicitar {
    font-size: 0.58rem !important;
    padding: 0.3rem 0.5rem !important;
  }
}