/* =============================================
   LAVIJU DOKUMENTACIJA — Styles
   Blue pastel monochrome theme
   ============================================= */

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --primary: #4A7FD4;
  --primary-dark: #3565B0;
  --primary-light: #8FBAE8;
  --primary-ultralight: #E8F0FA;
  --bg: #F4F7FC;
  --surface: #FFFFFF;
  --text: #1A2B4A;
  --text-secondary: #4A6285;
  --text-tertiary: #8A9BB5;
  --border: #D8E2EF;
  --border-light: #E8EFF8;
  --teal: #5BA3B5;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(26,43,74,0.06);
  --shadow-md: 0 4px 12px rgba(26,43,74,0.08);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }

/* =============================================
   HEADER
   ============================================= */
.docs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.docs-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  transition: opacity 0.2s;
}

.docs-header__logo:hover { opacity: 0.8; }

.docs-header__logo-icon {
  width: 32px;
  height: 32px;
}

.docs-header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.docs-header__nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  padding: 4px 0;
}

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

.docs-header__nav a.active {
  color: var(--primary);
  font-weight: 600;
}

.docs-header__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.docs-header__menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* =============================================
   LAYOUT
   ============================================= */
.docs-layout {
  display: flex;
  padding-top: 64px;
  min-height: 100vh;
}

/* =============================================
   SIDEBAR
   ============================================= */
.docs-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
  padding: 24px 0;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.docs-sidebar__nav {
  padding: 0 16px;
}

.docs-sidebar__section {
  margin-bottom: 28px;
}

.docs-sidebar__section h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 12px;
  margin-bottom: 6px;
}

.docs-sidebar__section a {
  display: block;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.docs-sidebar__section a:hover {
  background: var(--primary-ultralight);
  color: var(--primary);
}

.docs-sidebar__section a.active {
  background: var(--primary-ultralight);
  color: var(--primary);
  font-weight: 600;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.docs-main {
  flex: 1;
  margin-left: 280px;
  padding: 40px;
  max-width: 100%;
  min-width: 0;
}

.docs-content {
  max-width: 800px;
  margin: 0 auto;
}

/* =============================================
   BREADCRUMB
   ============================================= */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.docs-breadcrumb a {
  color: var(--primary);
  transition: color 0.2s;
}

.docs-breadcrumb a:hover { color: var(--primary-dark); }

.docs-breadcrumb__sep { color: var(--border); }

/* =============================================
   LAST UPDATED
   ============================================= */
.docs-updated {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
.docs-content h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}

.docs-content .docs-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.5;
}

.docs-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
}

.docs-content h2:first-of-type {
  margin-top: 0;
}

.docs-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}

.docs-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 8px;
}

.docs-content p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.docs-content li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
}

.docs-content li strong {
  color: var(--text);
}

.docs-content strong {
  color: var(--text);
  font-weight: 600;
}

.docs-content code {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 13px;
  background: var(--primary-ultralight);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

.docs-content a {
  color: var(--primary);
  font-weight: 500;
  transition: color 0.2s;
}

.docs-content a:hover { color: var(--primary-dark); }

.docs-content hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 40px 0;
}

/* =============================================
   CALLOUT BOXES
   ============================================= */
.docs-callout {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.7;
}

.docs-callout p {
  font-size: 14px;
  margin-bottom: 8px;
}

.docs-callout p:last-child { margin-bottom: 0; }

.docs-callout--info {
  background: var(--primary-ultralight);
  border-left: 4px solid var(--primary);
  color: var(--primary-dark);
}

.docs-callout--warning {
  background: #FFF8E6;
  border-left: 4px solid #F5A623;
  color: #8B6914;
}

.docs-callout--success {
  background: #E8F5EC;
  border-left: 4px solid #5BA37B;
  color: #2D5A3D;
}

.docs-callout--danger {
  background: #FEE8E8;
  border-left: 4px solid #D45A5A;
  color: #8B2020;
}

.docs-callout__title {
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}

/* =============================================
   CARDS GRID (Hub page)
   ============================================= */
.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.docs-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.docs-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}

.docs-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.docs-card__icon--blue {
  background: var(--primary-ultralight);
  color: var(--primary);
}

.docs-card__icon--teal {
  background: #E6F3F7;
  color: var(--teal);
}

.docs-card__icon--green {
  background: #E8F5EC;
  color: #5BA37B;
}

.docs-card__icon--orange {
  background: #FFF8E6;
  color: #D4943A;
}

.docs-card__icon--purple {
  background: #EDF0F7;
  color: #6B7EB8;
}

.docs-card__icon--red {
  background: #FEE8E8;
  color: #D45A5A;
}

.docs-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.docs-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =============================================
   TABLES
   ============================================= */
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.docs-content th {
  text-align: left;
  padding: 12px 16px;
  background: var(--primary-ultralight);
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
}

.docs-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
}

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

.docs-content tr:nth-child(even) td {
  background: rgba(244,247,252,0.5);
}

/* Table wrapper for mobile scroll */
.docs-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
}

.docs-table-wrap table { margin: 0; }

/* =============================================
   NUMBERED STEPS
   ============================================= */
.docs-steps {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
  margin: 24px 0;
}

.docs-steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 52px;
  margin-bottom: 28px;
  min-height: 32px;
}

.docs-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docs-steps li strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

/* =============================================
   FAQ ACCORDION
   ============================================= */
.docs-faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow 0.2s;
}

.docs-faq-item:hover { box-shadow: var(--shadow-sm); }

.docs-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  transition: background 0.2s;
  gap: 12px;
}

.docs-faq-question:hover { background: var(--primary-ultralight); }

.docs-faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  transition: transform 0.3s ease;
}

.docs-faq-item.open .docs-faq-chevron {
  transform: rotate(180deg);
}

.docs-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
}

.docs-faq-item.open .docs-faq-answer {
  max-height: 600px;
  padding: 0 20px 16px;
}

.docs-faq-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* =============================================
   BADGES
   ============================================= */
.docs-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: middle;
}

.docs-badge--blue { background: var(--primary-ultralight); color: var(--primary); }
.docs-badge--green { background: #E8F5EC; color: #5BA37B; }
.docs-badge--orange { background: #FFF8E6; color: #D4943A; }
.docs-badge--red { background: #FEE8E8; color: #D45A5A; }
.docs-badge--teal { background: #E6F3F7; color: var(--teal); }

/* =============================================
   VERSION / CHANGELOG
   ============================================= */
.docs-version {
  border-left: 3px solid var(--primary);
  padding-left: 20px;
  margin: 32px 0;
}

.docs-version__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.docs-version__tag {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.docs-version__date {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* =============================================
   FOOTER
   ============================================= */
.docs-footer {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: 12px;
}

.docs-footer a {
  color: var(--primary);
  font-weight: 500;
  transition: color 0.2s;
}

.docs-footer a:hover { color: var(--primary-dark); }

/* =============================================
   MOBILE OVERLAY
   ============================================= */
.docs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,43,74,0.25);
  backdrop-filter: blur(2px);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s;
}

.docs-overlay.visible {
  display: block;
  opacity: 1;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .docs-main {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .docs-header__nav { display: none; }
  .docs-header__menu-btn { display: flex; }

  .docs-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 90;
    width: 280px;
    box-shadow: none;
  }

  .docs-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(26,43,74,0.12);
  }

  .docs-main {
    margin-left: 0;
    padding: 24px 16px;
  }

  .docs-content h1 { font-size: 28px; }
  .docs-content h2 { font-size: 20px; margin-top: 36px; }
  .docs-content h3 { font-size: 16px; }
  .docs-content .docs-subtitle { font-size: 16px; }

  .docs-cards { grid-template-columns: 1fr; }

  .docs-footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .docs-header { padding: 0 16px; }
  .docs-main { padding: 20px 12px; }
  .docs-content h1 { font-size: 24px; }
  
  .docs-steps li { padding-left: 44px; }
  .docs-steps li::before { width: 28px; height: 28px; font-size: 12px; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
  .docs-header,
  .docs-sidebar,
  .docs-overlay,
  .docs-header__menu-btn { display: none !important; }
  .docs-main { margin-left: 0; padding: 0; }
  .docs-content { max-width: 100%; }
  body { background: white; }
}
