/* Croatian Language Typography */
body {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #212529;
}

/* Better Croatian character rendering */
* {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings with Croatian academic style */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.2rem;
  color: #1f4e79;
}

h2 {
  font-size: 1.8rem;
  color: #1f4e79;
}

h3 {
  font-size: 1.5rem;
  color: #495057;
}

/* Code blocks with Croatian comments support */
pre {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  font-family: "Source Code Pro", "Consolas", "Monaco", monospace;
  font-size: 0.875rem;
  line-height: 1.4;
}

code {
  background-color: #f1f3f4;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: "Source Code Pro", "Consolas", "Monaco", monospace;
  font-size: 0.875em;
  color: #e83e8c;
}

pre code {
  background-color: transparent;
  padding: 0;
  color: #495057;
}

/* Tables for Croatian economic data */
table {
  border-collapse: collapse;
  margin: 1.5rem 0;
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

th {
  background-color: #e7f1ff;
  font-weight: 600;
  color: #1f4e79;
}

tr:hover {
  background-color: #f8f9fa;
}

/* Croatian quotation marks and blockquotes */
blockquote {
  border-left: 4px solid #007bff;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #495057;
  position: relative;
}

blockquote::before {
  content: '"';
  font-size: 3rem;
  color: #007bff;
  position: absolute;
  left: -0.5rem;
  top: -1rem;
  opacity: 0.3;
}

/* Links with Croatian academic style */
a {
  color: #1f4e79;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s ease;
}

a:hover {
  border-bottom-color: #1f4e79;
}

/* Lists for Croatian content */
ul, ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* Navigation sidebar improvements */
.sidebar-navigation .sidebar-item {
  margin-bottom: 0.25rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}

.sidebar-navigation .sidebar-item:hover {
  background-color: #e7f1ff;
}

/* Figure and image styling */
img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.figure {
  text-align: center;
  margin: 2rem 0;
}

.figure-caption {
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Croatian academic callout boxes */
.callout-note {
  background-color: #e7f3ff;
  border-left: 4px solid #0dcaf0;
}

.callout-tip {
  background-color: #e8f5e8;
  border-left: 4px solid #198754;
}

.callout-warning {
  background-color: #fff8e1;
  border-left: 4px solid #ffc107;
}

.callout-important {
  background-color: #ffe6e6;
  border-left: 4px solid #dc3545;
}

/* Print styles for PDF output */
@media print {
  body {
    font-size: 11pt;
    line-height: 1.4;
    color: #000;
  }

  h1 {
    page-break-before: always;
    font-size: 18pt;
  }

  h2 {
    font-size: 16pt;
    page-break-after: avoid;
  }

  .code-block, pre {
    page-break-inside: avoid;
    background-color: #f5f5f5 !important;
  }

  .plotly, .figure {
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  table {
    font-size: 0.875rem;
  }

  pre {
    font-size: 0.75rem;
    overflow-x: scroll;
  }
}