@import url('fonts.css');

/* MuleSoft Hub - Article & Guide Stylesheet (2026 Edition) */

:root {
  --bg-page: #0B0F19;
  --bg-surface: #111726;
  --bg-card: #111726;
  --bg-card-hover: #161F33;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 242, 254, 0.35);
  
  --accent-cyan: #00F2FE;
  --accent-cyan-glow: rgba(0, 242, 254, 0.25);
  --accent-purple: #635BFF;
  --accent-indigo: #4FACFE;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, Monaco, monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.15);
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.026em;
  font-weight: 700;
}
h1 {
  letter-spacing: -0.034em;
}

/* Light Theme Variables */
[data-theme="light"],
body.light-theme {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --border-hover: rgba(0, 161, 224, 0.4);
  --text-main: #0f172a;
  --text-dim: #475569;
  --text-muted: #64748b;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 20px rgba(0, 161, 224, 0.1);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-hover: rgba(0, 161, 224, 0.4);
    --text-main: #0f172a;
    --text-dim: #475569;
    --text-muted: #64748b;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(0, 161, 224, 0.1);
  }
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Top Global Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .navbar,
body.light-theme .navbar {
  background: rgba(255, 255, 255, 0.92);
}

.nav-container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
  min-height: 44px;
}

.brand-logo {
  font-size: 1.3rem;
  line-height: 1;
}

.brand-text {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.badge-edition {
  display: inline-block;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.18), rgba(99, 91, 255, 0.22));
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* Layout Container */
.container.main-content-layout {
  max-width: 1050px;
  margin: 30px auto;
  padding: 0 20px;
}

/* Breadcrumbs */
.breadcrumb-trail {
  margin-bottom: 25px;
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb-trail a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-trail a:hover {
  text-decoration: underline;
}

/* Page Hero Header */
.page-hero-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 30px;
}

.module-badge {
  display: inline-block;
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.page-hero-header h1 {
  font-size: clamp(1.65rem, 3.5vw, 2.3rem);
  font-weight: 800;
  color: var(--text-main);
  margin: 12px 0 10px 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.page-hero-header p {
  color: var(--text-dim);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  max-width: 850px;
  line-height: 1.6;
  margin: 0;
}

/* FAQ Cards */
.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 24px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.faq-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.faq-header {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.faq-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.q-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 2px 9px;
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 254, 0.25);
  font-family: var(--font-mono);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-lead {
  background: rgba(99, 91, 255, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 91, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.q-read-time {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: auto;
}

.q-title {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin: 0;
  letter-spacing: -0.01em;
}

.faq-answer {
  padding: 20px 24px 24px 24px;
}

.answer-section {
  margin-top: 18px;
  line-height: 1.7;
  color: var(--text-main);
}

.answer-section:first-child {
  margin-top: 0;
}

.ans-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.ans-badge-script {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.ans-badge-code {
  background: rgba(79, 172, 254, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(79, 172, 254, 0.25);
}

/* Code Blocks */
pre {
  background: #050811;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0;
  position: relative;
}

[data-theme="light"] pre,
body.light-theme pre {
  background: #0f172a;
}

pre code {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  color: #e2e8f0;
  tab-size: 2;
  white-space: pre;
}

code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] code:not(pre code),
body.light-theme code:not(pre code) {
  background: #f1f5f9;
  color: #0284c7;
  border-color: #e2e8f0;
}

/* Tables */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 18px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dim);
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

/* Related Topics Section */
.related-topics-section {
  margin-top: 50px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.related-topics-section h3 {
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.related-topics-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.related-topics-section a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 44px;
  transition: all 0.2s ease;
}

.related-topics-section a:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateX(3px);
}

/* Footer */
footer {
  margin-top: 60px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
}

footer p {
  margin: 0;
}

/* Responsive Rules for Small Devices */
@media (max-width: 768px) {
  .container.main-content-layout {
    margin: 20px auto;
    padding: 0 14px;
  }
  
  .navbar {
    padding: 0;
  }
  
  .nav-container {
    padding: 0.6rem 1rem;
  }
  
  .brand-text {
    font-size: 1rem;
  }
  
  .badge-edition {
    display: none; /* Keep clean on small mobile */
  }
  
  .page-hero-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
  }
  
  .faq-header {
    padding: 16px 16px;
  }
  
  .faq-answer {
    padding: 14px 16px 18px 16px;
  }
  
  .q-read-time {
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
  }
  
  .related-topics-section {
    padding: 18px;
    margin-top: 36px;
  }
  
  .related-topics-section ul {
    grid-template-columns: 1fr;
  }
  
  pre {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
  }
}
