/* ==========================================================
   linkdir - Modern Design System & Custom Stylesheet
   Built on Bootstrap 5 with modern UI aesthetics
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Modern Brand Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-active: #1e40af;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  /* Slate Neutral System */
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  
  /* Semantic Tokens */
  --body-bg: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.09), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
}

/* Base Setup */
body {
  font-family: var(--font-sans);
  color: var(--slate-700);
  background-color: var(--body-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--slate-900);
  font-weight: 700;
  letter-spacing: -0.025em;
}

p {
  color: var(--slate-600);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* ==========================================================
   ATTRACTIVE BUTTONS (Modern, clean, tactile, yet not fancy)
   ========================================================== */

.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

/* Primary Button */
.btn-primary {
  background-color: var(--primary);
  border: 1px solid var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--primary-hover);
  border-color: var(--primary-active);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-color: var(--primary-active);
  transform: translateY(0);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

/* Outline Primary Button */
.btn-outline-primary {
  background-color: #ffffff;
  border: 1px solid var(--slate-300);
  color: var(--primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-primary:active {
  transform: translateY(0);
}

/* Outline Secondary / Subtle Button */
.btn-outline-secondary {
  background-color: #ffffff;
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
  background-color: var(--slate-50);
  border-color: var(--slate-300);
  color: var(--slate-900);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

/* Light / Neutral Button */
.btn-light {
  background-color: #ffffff;
  border: 1px solid var(--slate-200);
  color: var(--slate-800);
}

.btn-light:hover {
  background-color: var(--slate-50);
  border-color: var(--slate-300);
  color: var(--slate-900);
}

/* Dark Button */
.btn-dark {
  background-color: var(--slate-900);
  border: 1px solid var(--slate-950);
  color: #ffffff;
}

.btn-dark:hover {
  background-color: var(--slate-800);
  border-color: var(--slate-900);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Button Sizing */
.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Contact Action Buttons (Full width / prominent) */
.btn-contact-action {
  min-height: 44px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

/* ==========================================================
   MODERN NAVBAR
   ========================================================== */

.modern-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
  transition: all 0.2s ease;
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--slate-900) !important;
  font-size: 1.25rem;
}

.brand-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  font-size: 1.05rem;
}

.brand-badge {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  text-transform: uppercase;
  background-color: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
}

.navbar-nav .nav-link {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--slate-600);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--slate-900);
  background-color: var(--slate-100);
}

.navbar-nav .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

/* ==========================================================
   MODERN CARDS
   ========================================================== */

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Business Card Component */
.business-card {
  background-color: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.business-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--slate-300);
}

.business-logo-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
}

.business-logo-thumb-large {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
}

.business-logo-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: var(--slate-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  border: 1px solid var(--slate-200);
}

.business-logo-placeholder-lg {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: var(--slate-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  border: 1px solid var(--slate-200);
}

/* Category Pill Card */
.category-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  text-decoration: none;
  color: var(--slate-800);
  box-shadow: var(--shadow-xs);
}

.category-card:hover {
  border-color: var(--primary-border);
  background-color: #ffffff;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.category-icon {
  font-size: 1.5rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--primary-light);
  transition: transform 0.2s ease;
}

.category-card:hover .category-icon {
  transform: scale(1.08);
}

/* ==========================================================
   SEARCH HERO (Modern, Clean, High Contrast)
   ========================================================== */

.search-hero {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--slate-200);
  padding: 3.5rem 0 3rem 0;
  position: relative;
}

.search-hero-box {
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
}

.search-hero-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), var(--shadow-md);
}

/* Form Controls */
.form-control,
.form-select {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--slate-900);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: 0;
}

.form-control::placeholder {
  color: var(--slate-400);
}

.form-label {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--slate-700);
  margin-bottom: 0.35rem;
}

/* ==========================================================
   STATUS BADGES
   ========================================================== */

.badge-status-approved {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-weight: 600;
  border-radius: 6px;
}

.badge-status-pending {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 600;
  border-radius: 6px;
}

.badge-status-rejected {
  background-color: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
  font-weight: 600;
  border-radius: 6px;
}

.badge-status-suspended {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  border-radius: 6px;
}

/* Star Rating */
.star-rating {
  color: #f59e0b;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Tables */
.table {
  color: var(--slate-700);
}

.table th {
  font-weight: 600;
  color: var(--slate-600);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  background-color: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

.table td {
  vertical-align: middle;
  border-bottom: 1px solid var(--slate-200);
}

/* HTMX Loading Indicator */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request.htmx-indicator {
  display: inline-block;
}
