/* ============================================================
   HOME — Ciudadano (tema claro: arena, teal, coral)
   ============================================================ */

@keyframes home-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

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

.page-enter {
  animation: fadeInUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.welcome-section {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.welcome-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 500px at 0% 0%, rgba(20, 184, 166, 0.12), transparent 55%),
    radial-gradient(800px 400px at 100% 30%, rgba(224, 122, 95, 0.1), transparent 50%),
    linear-gradient(180deg, #faf7f2 0%, #f3efe8 45%, #ebe6df 100%);
}

.welcome-section::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(204, 251, 241, 0.35) 0%, transparent 45%);
  pointer-events: none;
}

.home-hero-grid {
  position: relative;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  color: #3d4f54;
  border: 1px solid rgba(13, 148, 136, 0.2);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.35rem;
  box-shadow: 0 4px 20px rgba(58, 79, 82, 0.06);
}

.welcome-badge i {
  color: #0d9488;
}

/* Títulos: gris pizarra cálido, NUNCA negro ni azul marino */
.welcome-title {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  color: #3d4f54;
  margin-bottom: 1.25rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.welcome-title .highlight {
  display: inline;
  color: #0a5c52;
  font-weight: 800;
}

.welcome-description {
  font-size: 1.06rem;
  color: #445559;
  margin-bottom: 2rem;
  line-height: 1.75;
  max-width: 34rem;
}

.welcome-actions .btn-primary.btn-lg {
  border: none;
  border-radius: var(--municipal-radius-md);
  padding: 1rem 2.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 55%, #0f766e 100%);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35);
}

.welcome-actions .btn-primary.btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.4);
}

.welcome-stats {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  border: 1px solid rgba(229, 224, 216, 0.9);
  min-width: 120px;
}

.stat-number {
  display: block;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.78rem;
  color: #556b69;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.welcome-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.chatbot-preview {
  max-width: 400px;
  width: 100%;
  animation: home-float 6s ease-in-out infinite;
  filter: drop-shadow(0 24px 48px rgba(58, 79, 82, 0.12));
}

.welcome-section .chat-window {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9) inset,
    0 20px 40px -12px rgba(58, 79, 82, 0.12);
  overflow: hidden;
  border: 1px solid rgba(229, 224, 216, 0.95);
}

.welcome-section .chat-header {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #ccfbf1 100%);
  color: #115e59;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(13, 148, 136, 0.15);
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.88rem;
}

.welcome-section .status-dot {
  width: 9px;
  height: 9px;
  background: linear-gradient(180deg, #34d399, #10b981);
  border-radius: 50%;
  animation: pulse-dot 2.2s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.15); opacity: 0.85; }
}

.chat-messages {
  padding: 1.35rem;
  max-height: 300px;
  overflow-y: auto;
  background: linear-gradient(180deg, #faf8f5 0%, #f3f1ec 100%);
}

.welcome-section .message {
  display: flex;
  margin-bottom: 1rem;
  align-items: flex-end;
  gap: 0.55rem;
}

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

.welcome-section .message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: white;
  flex-shrink: 0;
}

.bot-message  .message-avatar {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.user-message .message-avatar {
  background: linear-gradient(135deg, #94a3a8, #64748b);
}

.welcome-section .message-content {
  background: #fff;
  padding: 0.65rem 0.95rem;
  border-radius: 16px;
  max-width: 248px;
  font-size: 0.84rem;
  line-height: 1.55;
  box-shadow: 0 2px 12px rgba(58, 79, 82, 0.06);
  border: 1px solid rgba(229, 224, 216, 0.9);
  color: #3d4f54;
}

.user-message .message-content {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  color: #fff;
  border: none;
  border-bottom-right-radius: 5px;
}

.bot-message .message-content {
  border-bottom-left-radius: 5px;
}

@media (max-width: 992px) {
  .welcome-description { max-width: none; }
}

@media (max-width: 768px) {
  .welcome-section { min-height: auto; padding: 2.25rem 0 3rem; }
  .welcome-title { text-align: center; }
  .welcome-description { text-align: center; margin-left: auto; margin-right: auto; }
  .welcome-actions { text-align: center; }
  .welcome-actions .btn { width: 100%; max-width: 320px; }
  .welcome-stats { justify-content: center; }
  .chatbot-preview { margin-top: 2rem; max-width: 340px; }
}

@media (max-width: 576px) {
  .welcome-badge { font-size: 0.72rem; }
  .stat-number { font-size: 1.4rem; }
}
