/* ═══════════════════════════════════════════════════════════════════════════
   Docs Module Stylesheet - ServiVecinos Chile
   Pure Flat Design, Gilmer Font, Non-Chunky Pale Typography (#1E293B, font-weight 600)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-body: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F1F5F9;
  --text-main: #1E293B;       /* Pale dark grey */
  --text-muted: #475569;      /* Smooth pale slate */
  --text-subtle: #64748B;
  --brand-green: #01B958;
  --brand-green-hover: #019647;
  --brand-green-light: #E8F8F0;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none !important;
}

body {
  background-color: var(--bg-body);
  font-family: 'Gilmer', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Header Google/Landing Style */
.docs-header {
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 68px;
  padding: 0 24px;
}

.docs-header-inner {
  max-width: 1360px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.docs-brand-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.docs-brand-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.docs-brand-badge {
  background: var(--brand-green-light);
  color: var(--brand-green-hover);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Header Search Input */
.docs-header-search {
  position: relative;
  width: 340px;
  flex-shrink: 1;
}

.docs-header-input {
  width: 100%;
  background: var(--bg-surface-alt);
  border-radius: 99px;
  padding: 9px 16px 9px 38px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: background-color 0.2s;
}

.docs-header-input:focus {
  background: #FFFFFF;
}

.docs-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.docs-header-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.docs-header-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.2s;
}

.docs-header-links a:hover {
  color: var(--brand-green-hover);
}

/* Main Layout */
.docs-layout {
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 24px 80px 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  flex: 1;
}

/* Sidebar Navigation */
.docs-sidebar {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  height: fit-content;
  position: sticky;
  top: 96px;
}

.docs-nav-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94A3B8;
  margin: 18px 0 8px 0;
}

.docs-nav-group-title:first-child {
  margin-top: 0;
}

.docs-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 3px;
  transition: all 0.2s;
}

.docs-nav-item:hover, .docs-nav-item.active {
  background: var(--brand-green-light);
  color: var(--brand-green-hover);
  font-weight: 600;
}

/* Article Content Area */
.docs-content {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 44px;
}

.docs-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 20px;
  font-weight: 500;
}

.docs-breadcrumbs a {
  color: var(--text-subtle);
  text-decoration: none;
}

.docs-breadcrumbs a:hover {
  color: var(--brand-green-hover);
}

.docs-article-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.docs-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-subtle);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.docs-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.docs-role-pill {
  background: var(--brand-green-light);
  color: var(--brand-green-hover);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 99px;
}

/* Action Buttons (Share & Copy) */
.docs-action-btn {
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.docs-action-btn:hover {
  background: var(--brand-green-light);
  color: var(--brand-green-hover);
}

.docs-cover-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  background: var(--bg-surface-alt);
}

.docs-body-text {
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
  font-weight: 400;
}

.docs-body-text h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-main);
  margin: 36px 0 14px 0;
  letter-spacing: -0.2px;
}

.docs-body-text h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  margin: 32px 0 12px 0;
  letter-spacing: -0.2px;
}

.docs-body-text h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 24px 0 10px 0;
}

.docs-body-text p {
  margin-bottom: 18px;
}

.docs-body-text ul, .docs-body-text ol {
  margin-bottom: 22px;
  padding-left: 22px;
}

.docs-body-text li {
  margin-bottom: 8px;
}

.docs-body-text hr {
  border: 0;
  border-top: 1px solid #E2E8F0;
  margin: 32px 0;
}

.docs-body-text code {
  background: var(--bg-surface-alt);
  color: #1E293B;
  font-family: monospace;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13.5px;
}

/* Feedback Box */
.docs-feedback-box {
  margin-top: 48px;
  padding: 24px 28px;
  background: var(--bg-body);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.docs-feedback-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
}

.docs-feedback-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.docs-feedback-btn {
  background: #FFFFFF;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 99px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.docs-feedback-btn:hover {
  background: var(--brand-green-light);
  color: var(--brand-green-hover);
}

/* Toast Notification */
.docs-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1E293B;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 2000;
  pointer-events: none;
}

.docs-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Cards Grid */
.docs-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.docs-card {
  background: var(--bg-body);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s;
}

.docs-card:hover {
  background: var(--brand-green-light);
}

.docs-card-title {
  font-size: 16.5px;
  font-weight: 600;
  margin: 10px 0 6px 0;
  color: var(--text-main);
  line-height: 1.4;
}

.docs-card-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

/* Footer */
.docs-footer {
  background: var(--bg-surface);
  padding: 36px 24px;
  margin-top: auto;
}

.docs-footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; padding: 20px 16px; }
  .docs-sidebar { position: relative; top: 0; }
  .docs-header-search { width: 180px; }
  .docs-content { padding: 24px; }
  .docs-article-title { font-size: 22px; }
}

/* Store download buttons & social icons styling (added for consistent layout) */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-sm, 8px);
  color: #fff !important;
  text-decoration: none !important;
  transition: background .15s;
  box-shadow: none !important;
}
.store-btn:hover { background: #fff !important; color: var(--text-main, #0F172A) !important; }
.store-btn:hover .store-btn__icon { color: var(--brand-green, #01B958) !important; }
.store-btn__icon { color: #fff !important; display: flex; align-items: center; flex-shrink: 0; }
.store-btn__icon svg { width: 18px !important; height: 18px !important; }
.store-btn__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.1;
}
.store-btn__sub { font-size: 8px; letter-spacing: 0.3px; opacity: 0.85; display: block; white-space: pre; }
.store-btn__label { font-size: 11px; font-weight: 700; margin-top: 1px; display: block; }

.store-btn--dark {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}
.store-btn--dark:hover {
  background: var(--brand-green, #01B958) !important;
  color: #ffffff !important;
  border-color: var(--brand-green, #01B958) !important;
}
.store-btn--dark:hover .store-btn__icon {
  color: #ffffff !important;
}

/* Social icons */
.footer__socials {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.footer__social {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-surface-alt, #F1F5F9);
  border: 1px solid transparent;
  color: var(--text-muted, #475569) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  box-shadow: none !important;
  text-decoration: none !important;
}
.footer__social:hover {
  background: var(--brand-green, #01B958);
  border-color: var(--brand-green, #01B958);
  color: #fff !important;
}
.footer__social svg { width: 13px !important; height: 13px !important; }
