
/* (Global Styles & Layout) */

:root {
  --primary-color: #005fcc;
  --text-color: #333;
  --background-color: #fff;
  --light-gray-background: #f0f8ff;
  --border-color: #ddd;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Header */

.site-header {
  background-color: #000; /* jak kontrast za WCAG */
  color: #fff;
  padding: 1em;
  text-align: center;
  border-bottom: 4px solid #ccc;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
}

.logo-img {
  width: 128px;
  height: auto;
  max-width: 100%;
}

.logo-text h1 {
  font-size: 2rem;
  margin: 0;
  font-weight: 700;
}

.braille-text {
  font-family: 'Arial', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  margin-top: 0.2em;
  color: #aaa;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0 auto;
  max-width: 900px;
  padding: 1.5rem;
}

/* (Typography) */

h1, h2, h3 {
  line-height: 1.3;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.3em;
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.8rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
}

p {
  text-indent: 1.5em;
  text-align: left;
}

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 3em 0;
  padding: 0;
}

/* (Links & Interactive Elements) */

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a:hover {
  text-decoration: underline;
  color: #003d82; /* Malo tamnija nijansa za hover */
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  background-color: var(--light-gray-background);
  color: var(--text-color);
  border-radius: 2px;
}

/* Skip link za pristupačnost */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
  transition: top 0.3s ease-in-out;
}

.skip-link:focus {
  top: 0;
}

/* (Components) */

/* (Table of Contents - TOC) */

.toc {
  background-color: var(--light-gray-background);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.toc a {
  display: block;
  margin: 0.25rem 0;
}

/* Tabele */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  border: 1px solid var(--border-color);
}

thead {
  background-color: var(--text-color);
  color: var(--background-color);
}

th,
td {
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* specifične ćelije */

td:first-child {
  font-size: 1.5rem;
  text-align: center;
  line-height: 1.2;
  padding: 1rem;
  background-color: #fdf4dc;
  border-right: 2px solid #ccc;
  vertical-align: middle;
}

td:nth-child(2),
td:nth-child(3) {
  font-size: 1rem;
  color: var(--text-color);
}

td:nth-child(3) span[lang="en"] {
  font-style: italic;
  color: #555;
}

/* (Definition Lists) */

dl {
  margin-left: 1rem;
}

dt {
  font-weight: bold;
  margin-top: 1rem;
}

dd {
  margin-left: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
}

/* (Utility Classes) */

/* Težina fonta */

.normal {
  font-weight: normal;
}

.bold {
  font-weight: bold;
}

.bolder {
  font-weight: bolder;
}

/* Stil fonta */

.italic {
  font-style: italic;
}

/* Specijalne klase */

.spacing {
  word-spacing: 1.2em;
}

.eng-term {

  font-style: italic;
  color: var(--primary-color);
  font-weight: bold;
  padding: 0.1rem 0.2rem;
}

/* Skraćenice */

abbr[title] {
  text-decoration: underline dotted; /* Bolje od običnog underline za ovu svrhu */
  cursor: help;
}

/* (Media Queries) */

@media (max-width: 600px) {
  body {
    font-size: 1rem;
    padding: 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  p {
    text-align: left;
  }

  /* Prilagođavanje tabele za manje ekrane */
  
  th, td {
    padding: 8px 10px;
  }
  td:first-child {
    font-size: 1.2rem;
  }
}
