
:root{--bg:#0f1216;--surface:#141922;--text:#e9eef6;--muted:#aab4c3;--primary:#21a607;--primary-2:#2acd0a;--ring:rgba(33,166,7,.3)}
*{box-sizing:border-box}html,body{margin:0;padding:0;font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
.container{width:min(1100px,96%);margin:0 auto}.flex{display:flex}.between{justify-content:space-between}.center{align-items:center}
.site-header{border-bottom:1px solid #232b36;background:rgba(20,25,34,.8);backdrop-filter:blur(6px);position:sticky;top:0;z-index:20}
.site-header .container{padding:14px 0}.logo{font-weight:800}.menu a{color:var(--muted);margin-left:18px;text-decoration:none}.menu a:hover{color:var(--text)}
.site-footer{border-top:1px solid #232b36;padding:30px 0;margin-top:60px;color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px}
.card{background:var(--surface);border:1px solid #232b36;border-radius:16px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.25);transition:transform .18s ease,box-shadow .18s}
.card:hover{transform:translateY(-4px);box-shadow:0 14px 40px rgba(0,0,0,.36)}.card img{width:100%;height:120px;object-fit:cover;display:block}
.projects-grid .card img{height:auto}
.card .pad{padding:14px}.badge{display:inline-block;padding:4px 10px;border-radius:999px;border:1px solid #2b333f;color:var(--muted);font-size:12px;margin-right:6px}
.title{font-size:18px;font-weight:700;margin:8px 0 6px}.row{display:flex;gap:10px;margin-top:8px;flex-wrap:wrap}
.btn{display:inline-flex;gap:8px;justify-content:center;align-items:center;padding:10px 12px;border-radius:12px;border:1px solid #2b333f;background:#151a23;color:var(--text);text-decoration:none;cursor:pointer;box-shadow:0 0 0 0 var(--ring);transition:box-shadow .25s,border-color .2s,transform .05s}
.btn:hover{border-color:#364355}.btn:active{transform:translateY(1px)}.btn.primary{background:linear-gradient(180deg,var(--primary),var(--primary-2));color:#061305;border-color:transparent}
.btn.primary:hover{box-shadow:0 0 0 6px var(--ring)}.input,select,textarea{width:100%;padding:10px 12px;background:#0f131b;border:1px solid #2b333f;border-radius:12px;color:var(--text)}
label{font-size:13px;color:var(--muted);margin-bottom:6px;display:block}.form-row{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}
.col-6{grid-column:span 6}.col-4{grid-column:span 4}.col-12{grid-column:span 12}.section{margin:26px 0}
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:40;background:rgba(0,0,0,.6)}
.modal.open{display:flex}.modal-card{width:min(820px,96vw);background:var(--surface);border:1px solid #2b333f;border-radius:16px;overflow:hidden}
.modal-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #243041}
.modal-body{padding:18px 16px 22px}.tabs{display:flex;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.tab{padding:8px 10px;border-radius:10px;background:#0f131b;border:1px solid #2b333f;cursor:pointer;color:var(--muted);font-size:13px}
.tab.active{color:#061305;background:linear-gradient(180deg,var(--primary),var(--primary-2));border-color:transparent}
.modal-foot{border-top:1px solid #243041;padding:14px 16px;display:flex;justify-content:flex-end;gap:10px}
/* === CHATBOT WIDGET MEJORADO === */
/* Mantiene todas tus variables CSS y compatibilidad completa */

.chatbot-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
}

/* Botón toggle mejorado */
.chatbot-toggle {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border: none;
  color: #061305;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(33, 166, 7, .45);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Efecto shimmer en el botón */
.chatbot-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.chatbot-toggle:hover::before {
  left: 100%;
}

.chatbot-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(33, 166, 7, .6);
}

.chatbot-toggle:active {
  transform: scale(0.95);
}

/* Efecto de pulsación para llamar atención */
@keyframes chatbot-pulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 6px 22px rgba(33, 166, 7, .45);
  }
  50% { 
    transform: scale(1.05); 
    box-shadow: 0 8px 28px rgba(33, 166, 7, .6);
  }
}

.chatbot-toggle.pulse {
  animation: chatbot-pulse 2s ease-in-out infinite;
}

/* Panel mejorado */
.chatbot-panel {
  width: 340px;
  background: var(--surface);
  border: 1px solid #2b333f;
  border-radius: 16px;
  position: absolute;
  bottom: 66px;
  right: 0;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
  backdrop-filter: blur(10px);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mostrar panel con animación */
.chatbot-panel:not(.hidden) {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.chatbot-panel.hidden {
  display: none;
}

/* Header mejorado */
.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px;
  border-bottom: 1px solid #243041;
  background: linear-gradient(135deg, var(--surface) 0%, #1a2028 100%);
  position: relative;
  overflow: hidden;
}

/* Efecto shimmer en header */
.chatbot-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(33, 166, 7, 0.1), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.chatbot-header strong {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  z-index: 1;
  position: relative;
}

/* Botón cerrar mejorado */
.chatbot-header .x {
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1;
  position: relative;
}

.chatbot-header .x:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  transform: rotate(90deg);
}

/* Body mejorado */
.chatbot-body {
  padding: 20px 16px;
  background: linear-gradient(145deg, var(--surface) 0%, #151b23 100%);
}

.chatbot-body > p {
  margin: 0 0 16px 0;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

/* Contenedor de acciones mejorado */
.chatbot-actions {
  display: grid;
  gap: 12px;
}

/* Botones de acción completamente rediseñados */
.chatbot-actions button {
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f131b 0%, #1a202a 100%);
  color: var(--text);
  border: 1px solid #2b333f;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  animation: buttonSlideIn 0.6s ease-out forwards;
}

/* Retraso escalonado para cada botón */
.chatbot-actions button:nth-child(1) { animation-delay: 0.4s; }
.chatbot-actions button:nth-child(2) { animation-delay: 0.6s; }
.chatbot-actions button:nth-child(3) { animation-delay: 0.8s; }
.chatbot-actions button:nth-child(4) { animation-delay: 1s; }

/* Efecto shimmer en botones */
.chatbot-actions button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(33, 166, 7, 0.1), transparent);
  transition: left 0.6s;
}

.chatbot-actions button:hover::before {
  left: 100%;
}

/* Hover mejorado para botones */
.chatbot-actions button:hover {
  border-color: #3a4657;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #1a202a 0%, #232936 100%);
}

.chatbot-actions button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Botón especial para WhatsApp */
.chatbot-actions button.whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  border-color: transparent;
}

.chatbot-actions button.whatsapp:hover {
  background: linear-gradient(135deg, #20ba5a 0%, #0f7a6c 100%);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Iconos en botones */
.chatbot-action-icon {
  margin-right: 10px;
  font-size: 16px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.chatbot-actions button:hover .chatbot-action-icon {
  transform: scale(1.2);
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive mejorado */
@media (max-width: 480px) {
  .chatbot-widget {
    right: 12px;
    bottom: 12px;
  }
  
  .chatbot-toggle {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
  
  .chatbot-panel {
    width: calc(100vw - 24px);
    max-width: 320px;
    bottom: 64px;
  }
  
  .chatbot-header {
    padding: 14px;
  }
  
  .chatbot-body {
    padding: 16px;
  }
  
  .chatbot-actions button {
    padding: 12px 14px;
    font-size: 13px;
  }
}

/* === COMPATIBILIDAD CON TEMA CLARO === */
.theme-light .chatbot-panel {
  border-color: #e7ecf3;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.theme-light .chatbot-header {
  background: linear-gradient(135deg, var(--surface) 0%, #f3f6fb 100%);
}

.theme-light .chatbot-body {
  background: linear-gradient(145deg, var(--surface) 0%, #f8fafc 100%);
}

.theme-light .chatbot-actions button {
  background: linear-gradient(135deg, #f3f6fb 0%, #e7ecf3 100%);
  border-color: #e1e7f0;
}

.theme-light .chatbot-actions button:hover {
  background: linear-gradient(135deg, #e7ecf3 0%, #dde3ea 100%);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}


