/* ============================================
   Raziskovalna uspešnost - Dodatni stili
   ============================================ */

/* ----- Splošno ----- */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


/* Obojestransko poravnavanje besedila v glavni vsebini */
main.column-body p {
  text-align: justify;
}

/* ----- Navigacija ----- */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 700;
}

.nav-link {
  transition: all 0.3s ease;
}

.nav-link:hover {
  transform: translateY(-2px);
}

/* ----- Kartice na domači strani ----- */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
  font-weight: 600;
}

.card-footer {
  background: transparent;
  border-top: none;
}

/* ----- Gumbi ----- */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: scale(1.02);
}

.btn-lg {
  padding: 12px 24px;
}

/* ----- Value boxes ----- */
.value-box {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

/* ----- Sidebar - levi meni ----- */
.sidebar {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border-right: 1px solid #dee2e6;
}

.sidebar .sidebar-title {
  font-weight: 700;
  color: #1e3a5f;
  font-size: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #1e3a5f;
}

.sidebar .sidebar-item {
  border-radius: 6px;
  margin: 2px 0;
  transition: all 0.2s ease;
}

.sidebar .sidebar-item:hover {
  background-color: rgba(30, 58, 95, 0.1);
}

.sidebar .sidebar-item.active {
  background-color: #1e3a5f;
  color: white;
}

.sidebar .sidebar-item a {
  padding: 8px 12px;
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ========================================
   RAZMIKI MED BESEDILOM IN TABELAMI
   ======================================== */

/* Splošni razmiki za odstavke */
p {
  margin-bottom: 1rem;
}

/* Razmik med besedilom in tabelo (DT + reactable) */
p + .cell-output-display,
p + .dataTables_wrapper,
p + .reactable {
  margin-top: 1.5rem;
}

/* Razmik med tabelo in naslednjih besedilom */
.cell-output-display + p,
.dataTables_wrapper + p,
.reactable + p {
  margin-top: 1.5rem;
}

/* Razmik za vse tabele */
table, 
.dataTables_wrapper, 
.reactable,
.cell-output-display table {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

/* ========================================
   TABELE - DT (DataTables)
   ======================================== */

.dataTables_wrapper {
  font-size: 0.95rem;
}

.dataTables_filter input {
  border-radius: 6px;
  border: 1px solid #ced4da;
  padding: 6px 12px;
}

table.dataTable thead th {
  background-color: #3660a0;
  color: white;
  font-weight: 600;
}

table.dataTable tbody tr:hover {
  background-color: rgba(54, 96, 160, 0.05) !important;
}

/* ========================================
   TABELE - reactable
   ======================================== */

/* Privzeta barva za reactable header */
.reactable .rt-thead {
  background-color: #3660a0 !important;
  color: white !important;
}

.reactable .rt-th {
  background-color: #3660a0 !important;
  color: white !important;
  font-weight: normal;
  border-bottom: 2px solid #2a4d80;
}

/* Hover efekt za vrstice */
.reactable .rt-tbody .rt-tr:hover {
  background-color: rgba(54, 96, 160, 0.08) !important;
}

/* Izmenične barve vrstic */
.reactable .rt-tbody .rt-tr-striped {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Padding za celice */
.reactable .rt-td {
  padding: 10px 8px;
}

/* Pagination gumbi */
.reactable .rt-pagination button {
  border-radius: 6px;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.reactable .rt-pagination button:hover:not(:disabled) {
  background-color: #3660a0;
  color: white;
  border-color: #3660a0;
}

/* Search input */
.reactable .rt-search input {
  border-radius: 6px;
  border: 1px solid #ced4da;
  padding: 6px 12px;
}

/* Rob pod tabelo */
.reactable .rt-table {
  border-bottom: 2px solid #dee2e6;
}



/* ========================================
   CALLOUTS
   ======================================== */

.callout {
  border-radius: 8px;
  border-left-width: 4px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.callout-note {
  background-color: rgba(23, 162, 184, 0.1);
  border-left-color: #17a2b8;
}

.callout-tip {
  background-color: rgba(40, 167, 69, 0.1);
  border-left-color: #28a745;
}

/* ========================================
   GRAFI (plotly)
   ======================================== */

.plotly {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

/* ========================================
   TOC (kazalo na desni)
   ======================================== */

.toc-actions {
  margin-bottom: 1rem;
}

nav[role="doc-toc"] {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

nav[role="doc-toc"] a {
  color: #495057;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav[role="doc-toc"] a:hover {
  color: #1e3a5f;
}

nav[role="doc-toc"] .active {
  color: #1e3a5f;
  font-weight: 600;
}

/* ========================================
   NASLOVI
   ======================================== */

h1, h2, h3 {
  color: #1e3a5f;
}

h1 {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

h2 {
  border-bottom: 2px solid #1e3a5f;
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* ========================================
   NOGA
   ======================================== */

.page-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #dee2e6;
}

/* ========================================
   LAYOUT - Centiranje vsebine
   ======================================== */

/* Centriraj celotno postavitev na sredino zaslona */
.page-columns {
  max-width: 1400px;  /* SPREMENJENO: prej 1400px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;  /* SPREMENJENO: prej 2rem */
  padding-right: 1.5rem;  /* SPREMENJENO: prej 2rem */
}

/* Zagotovi, da je vse lepo porazdeljeno */
.sidebar-navigation {
  flex-shrink: 0;
}

/* Dodaj prostor med sidebar-jem in vsebino */
main.column-body {
  padding-left: 3rem;  
  padding-right: 3rem;   /* SPREMENJENO: prej 2rem */
}

/* NOV DODATEK - doda se za main.column-body */
/* Dodaj razmik tudi za TOC (kazalo na desni) */
.margin-sidebar {
  padding-left: 2rem;
}

/* ========================================
   RESPONZIVNOST 
   ======================================== */

/* Za širše zaslone */
@media (min-width: 1400px) {
  .page-columns {
    max-width: 1600px;  /* Povečano iz 1600px */
  }
  
  main.column-body {
    padding-right: 4rem;  /* Še več prostora na velikih zaslonih */
  }
}


/* ========================================
   ANIMACIJE
   ======================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card, .value-box, .callout {
  animation: fadeIn 0.5s ease-out;
}

/* ========================================
   IKONE IN DROBNARIJE
   ======================================== */

/* Ikone v meniju */
.bi {
  margin-right: 0.5rem;
}

/* Select/dropdown */
.form-select {
  border-radius: 8px;
  border: 2px solid #dee2e6;
  padding: 10px 15px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-select:focus {
  border-color: #1e3a5f;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.2);
}

/* Opombe pod tabelami (kurziva) */
p em, p i {
  font-size: 0.9em;
  color: #666;
  margin-top: 0.5rem;
  font-style: italic;
}



/* ========================================
   HIGHCHARTER GRAFI
   ======================================== */

/* Container za highcharter grafe */
.highchart, .highcharts-container {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Odstrani prazen prostor pod hw_grid */
.html-widget-static-bound {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Grid layout za grafe */
.hw-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.hw-grid-item {
  height: 350px;
  margin: 0;
  padding: 0;
}

/* Htmlwidget ne sme dodajati margine */
.htmlwidget {
  margin: 0 !important;
}

/* Highcharts container */
div[id^="htmlwidget-"] {
  margin: 0 !important;
  padding: 0 !important;
}


/* V styles.css */
.callout-tip .callout-title {
  display: none;
}