/* ==========================================================================
   Trayecto Tecnológico — Minimal Custom Styles
   Only what Tailwind can't handle: glass, textures, gradients, animations,
   form validation, FAQ accordion, and accessibility polish.
   ========================================================================== */

/* ==========================================================================
   BASE RESET
   ========================================================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background-color: #0f1419;
  color: #f0f2f5;
}

:focus-visible {
  outline: 2px solid #00F0FF;
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background-color: rgba(0, 240, 255, 0.2);
  color: #f0f2f5;
}

/* ==========================================================================
   GLASS CARD
   ========================================================================== */
.glass-card {
  background: rgba(26, 31, 38, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(0, 240, 255, 0.2);
}

/* ==========================================================================
   BRUSHED METAL BACKGROUND
   ========================================================================== */
.brushed-metal {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 240, 255, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 107, 0, 0.03) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(0, 240, 255, 0.02) 0%, transparent 50%),
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      rgba(255, 255, 255, 0.008) 1px,
      transparent 2px,
      transparent 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      rgba(255, 255, 255, 0.003) 1px,
      transparent 2px,
      transparent 6px
    );
}

/* ==========================================================================
   SCANLINE ANIMATION
   ========================================================================== */
.scanline {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100vh);
  }
}

/* ==========================================================================
   KINETIC TEXT GRADIENT
   ========================================================================== */
.kinetic-text-gradient {
  background: linear-gradient(135deg, #00F0FF 0%, #FF6B00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   GLOW ORANGE BUTTON (3D Effect)
   ========================================================================== */
.glow-orange-btn {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 0px #cc5600, 0 10px 30px rgba(255, 107, 0, 0.3);
  transform: translateY(0);
}

.glow-orange-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0px #cc5600, 0 15px 40px rgba(255, 107, 0, 0.4);
}

.glow-orange-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0px 0px #cc5600, 0 5px 20px rgba(255, 107, 0, 0.2);
}

.glow-orange-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.glow-orange-btn:hover::after {
  opacity: 1;
}

/* ==========================================================================
   MATERIAL SYMBOLS - Font Variation Settings
   ========================================================================== */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  vertical-align: middle;
}

/* ==========================================================================
   CUSTOM RANGE SLIDER (ROI Calculator)
   ========================================================================== */
.roi-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #1e242c;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #00F0FF;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  transition: transform 0.2s ease;
}

.roi-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.roi-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #00F0FF;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.roi-slider::-moz-range-track {
  height: 6px;
  background: #1e242c;
  border-radius: 3px;
}

/* Style the filled portion for webkit */
.roi-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
}

/* ==========================================================================
   CHATBOT
   ========================================================================== */
.chatbot-container {
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.chatbot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
  background: rgba(15, 20, 25, 0.6);
}

.chatbot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(255, 107, 0, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-header-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: #e4e8ec;
}

.chatbot-header-info p {
  font-size: 12px;
  color: #6b7280;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.2);
  border-radius: 2px;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  animation: msgIn 0.3s ease-out both;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble.bot {
  align-self: flex-start;
  background: rgba(30, 35, 50, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.08);
  color: #e4e8ec;
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(255, 107, 0, 0.08));
  border: 1px solid rgba(0, 240, 255, 0.12);
  color: #e4e8ec;
  border-bottom-right-radius: 4px;
}

.chat-bubble .typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.chat-bubble .typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b7280;
  animation: typingBounce 1.4s ease-in-out infinite both;
}

.chat-bubble .typing-dots span:nth-child(1) { animation-delay: 0s; }
.chat-bubble .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble .typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.chat-suggestion-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(0, 240, 255, 0.15);
  color: #9ca3af;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.chat-suggestion-btn:hover {
  border-color: rgba(0, 240, 255, 0.4);
  color: #e4e8ec;
  background: rgba(0, 240, 255, 0.05);
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid rgba(0, 240, 255, 0.06);
  background: rgba(15, 20, 25, 0.4);
}

.chat-input-area input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e4e8ec;
  font-size: 14px;
  font-family: inherit;
}

.chat-input-area input::placeholder {
  color: #6b7280;
}

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #00F0FF, #FF6B00);
  color: #0f1419;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   FORM VALIDATION STATES
   ========================================================================== */
.form-group.has-error input,
.form-group.has-error textarea {
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2) !important;
}

.form-group.has-error .error-msg {
  display: block;
}

.form-group.has-error .material-symbols-outlined:first-child {
  color: rgba(239, 68, 68, 0.7) !important;
}

.error-msg {
  display: none;
}

/* ==========================================================================
   SUCCESS CARD OVERLAY
   ========================================================================== */
.success-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.success-card {
  transform: scale(0.95);
}

/* ==========================================================================
   HEADER SCROLLED STATE
   ========================================================================== */
#main-header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   MOBILE MENU OPEN STATE
   ========================================================================== */
#mobile-menu-drawer.open {
  right: 0 !important;
}

/* ==========================================================================
   NAV LINK ACTIVE STATE
   ========================================================================== */
.nav-link.active {
  color: #f0f2f5;
}

.nav-link.active::after {
  width: 100%;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00F0FF, #FF6B00);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESPONSIVE TWEAKS
   ========================================================================== */
@media (max-width: 640px) {
  .kinetic-text-gradient {
    background-size: 200% 100%;
  }
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scanline {
    display: none;
  }

  html {
    scroll-behavior: auto;
  }
}
