/* docs.css — Estilos para el Portal de Documentación */

:root {
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  
  --border-color: #e2e8f0;
  
  /* Paleta FinOps Hub */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  
  --success: #10b981;
  --success-light: #d1fae5;
  --success-text: #065f46;
  
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --warning-text: #92400e;
  
  --code-bg: #0f172a;
  --code-header-bg: #1e293b;
  --code-text: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for navbar */
}

body {
  background-color: var(--bg-secondary);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-main);
}

.logo svg {
  color: var(--primary);
}

.logo-badge {
  font-size: 11px;
  font-weight: 600;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: 4px;
  vertical-align: middle;
}

.search-bar {
  position: relative;
  width: 380px;
  display: flex;
  align-items: center;
}

.search-bar svg {
  position: absolute;
  left: 12px;
  color: var(--text-light);
}

.search-bar input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  font-family: var(--font-body);
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.search-bar input:focus {
  border-color: var(--primary);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-btn {
  background-color: var(--primary);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.nav-btn:hover {
  background-color: var(--primary-hover);
}

/* Page Layout */
.main-container {
  display: flex;
  max-width: 1400px;
  margin: 64px auto 0;
  min-height: calc(100vh - 124px);
}

/* Sidebar Navigation */
.sidebar {
  width: 280px;
  position: fixed;
  top: 64px;
  bottom: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  padding: 32px 16px 32px 24px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-group h3 {
  font-family: var(--font-title);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 600;
}

.sidebar-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: block;
  padding: 6px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  color: var(--primary);
  background-color: var(--bg-secondary);
}

.sidebar-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
  font-weight: 600;
}

/* Main Content Area */
.content {
  margin-left: 280px;
  flex-1: 1;
  padding: 40px 48px 80px;
  max-width: 860px;
}

.doc-section {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.doc-section:last-of-type {
  border-bottom: none;
}

.doc-section h1 {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
}

.doc-section h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 28px;
  margin-bottom: 12px;
}

.doc-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.doc-section p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.doc-section ul {
  list-style-type: none;
  margin-bottom: 20px;
}

.doc-section ul li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.doc-section ul li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--primary);
  font-weight: bold;
}

/* Grid pre-requisites */
.requirements-grid {
  display: grid;
  grid-template-cols: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.req-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.req-card h4 {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 8px;
}

.req-card p {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Alerts */
.alert-info, .alert-warning {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 24px 0;
  font-size: 14.5px;
}

.alert-info {
  background-color: var(--primary-light);
  border-left: 4px solid var(--primary);
  color: #3730a3;
}

.alert-warning {
  background-color: var(--warning-light);
  border-left: 4px solid var(--warning);
  color: var(--warning-text);
}

/* Code Blocks */
.code-block {
  background-color: var(--code-bg);
  border-radius: 8px;
  overflow: hidden;
  margin: 20px 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.code-header {
  background-color: var(--code-header-bg);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.code-header span {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  font-family: var(--font-body);
}

.copy-btn {
  background-color: transparent;
  border: 1px solid #475569;
  border-radius: 4px;
  color: #94a3b8;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background-color: #334155;
  color: #ffffff;
}

.code-block pre {
  padding: 16px;
  overflow-x: auto;
}

.code-block code {
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
  font-size: 13px;
  color: var(--code-text);
  line-height: 1.5;
}

/* Interactive steps list */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 32px 0;
}

.step-item {
  display: flex;
  gap: 16px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  shrink: 0;
}

.step-item h4 {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.step-item p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Footer */
.footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}

/* Search highlighting styling */
.highlight {
  background-color: #fef08a;
  color: #000000;
  padding: 2px 0;
  border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .sidebar {
    display: none; /* Can implement slide-in menu if requested */
  }
  .content {
    margin-left: 0;
    padding: 32px 24px;
  }
  .search-bar {
    width: 260px;
  }
}

@media (max-width: 640px) {
  .nav-container {
    padding: 0 16px;
  }
  .search-bar {
    display: none; /* Hide on mobile */
  }
}
