/* ==========================================================================
   AlgoHub SMC - Component Styles
   File: components.css (Buttons, Cards, Forms, UI Elements)
   ========================================================================== */

/* --- Buttons --- */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 0.875rem 2rem;
  transition: all var(--transition-normal);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--bg-dark);
  box-shadow: var(--glow-primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.6);
  color: var(--white);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(6, 182, 212, 0.05);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.btn-secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
  box-shadow: var(--glow-secondary);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}

/* --- Cards (Glassmorphism) --- */
.card-custom {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
  position: relative;
  height: 100%;
}

.card-custom::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  opacity: 0.5;
}

.card-custom:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-primary);
  border-color: var(--border-glow);
  background: var(--bg-surface-elevated);
}

/* Service Card Specifics */
.service-icon-box {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--secondary);
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
  transition: all var(--transition-normal);
}

.card-custom:hover .service-icon-box {
  background-color: var(--secondary);
  color: var(--white);
  transform: scale(1.05) rotate(5deg);
}

/* --- Forms --- */
.form-control, .form-select {
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--border-light);
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  font-family: var(--font-body);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
  color: var(--white);
  outline: none;
}

.form-label {
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* --- Accordions (FAQ) --- */
.accordion-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md) !important;
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--bg-surface);
}

.accordion-button {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--white);
  background: transparent;
  padding: 1.25rem 1.5rem;
  box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
  color: var(--primary);
  background-color: rgba(6, 182, 212, 0.05);
}

.accordion-body {
  color: var(--text-muted);
}

/* --- Badges / Chips --- */
.badge-soft {
  padding: 0.5em 0.8em;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.75em;
  font-family: var(--font-mono);
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-tech {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-weight: 500;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.badge-tech:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

/* --- Tables --- */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text-main);
}

.table-custom th {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  padding: 1rem;
  border-bottom: 2px solid var(--border-light);
}

.table-custom td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

/* --- Alerts --- */
.alert-custom {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  border-left: 4px solid transparent;
  background: var(--bg-surface);
}
.alert-info-custom {
  background: rgba(6, 182, 212, 0.05);
  border-left-color: var(--primary);
  color: var(--primary);
}

/* --- Floating WhatsApp Widget --- */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25D366; /* Official WhatsApp green */
  color: white !important;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
  color: white;
}

/* --- Modals --- */
.modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-xl);
}
.modal-header {
  border-bottom-color: var(--border);
}
.modal-footer {
  border-top-color: var(--border);
}

/* --- Pagination --- */
.pagination {
  gap: 0.5rem;
}
.page-link {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  transition: all var(--transition-fast);
}
.page-item.active .page-link {
  background-color: var(--secondary);
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
}
.page-link:hover {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--secondary);
  border-color: var(--secondary);
}

/* --- Breadcrumbs --- */
.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.breadcrumb-item a:hover {
  color: var(--secondary);
}
.breadcrumb-item.active {
  color: var(--text-main);
  font-weight: 500;
}

/* --- Tabs --- */
.nav-tabs {
  border-bottom: 2px solid var(--border);
  gap: 1rem;
}
.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 500;
  padding: 1rem 1.5rem;
  transition: all var(--transition-fast);
}
.nav-tabs .nav-link:hover {
  color: var(--secondary);
  border-bottom-color: rgba(37, 99, 235, 0.3);
}
.nav-tabs .nav-link.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
  background: transparent;
}

/* --- Pricing Cards --- */
.pricing-card {
  padding: 3rem;
  text-align: center;
}
.pricing-card .price {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}
.pricing-card.featured {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}
.pricing-card.featured .price {
  color: var(--white);
}
.pricing-card.featured .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}
