
/* --- Globální box-sizing pro všechny elementy --- */
* {
  box-sizing: border-box;
}

/* === FONTY === */
@font-face {
  font-family: "Technika";
  src: url("fonts/Technika-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Technika";
  src: url("fonts/Technika-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

/* === ZÁKLADNÍ STYL === */
/*body {
  font-family: "Open Sans", Arial, sans-serif;
  background-color: #f5f9ff;
  color: #222;
  margin: 0;
  padding: 20px;
}*/

body {
  background-color: #f5f9ff;  /*  #f0f0f0 světle šedé pozadí celé stránky */
  margin: 0;
  padding: 0;
  font-family: "Open Sans", Arial, sans-serif;
}

.page-container {
  /* display: flex;                  *//* 🔹 Aktivuje flexbox */
  /* justify-content: space-between; *//* 🔹 Oddělí hlavní obsah a sidebar */
  /* align-items: flex-start;        *//* 🔹 Zarovná horní okraje */
  /* gap: 30px;                      *//* 🔹 Mezera mezi sloupci */
  max-width: 1200px;  /* maximální šířka hlavního obsahu */
  margin: 0 auto;     /* centrování obsahu */
  padding: 20px;      /* odsazení obsahu od okrajů */
  background-color: #ffffff; /* bílý hlavní obsah */
  box-sizing: border-box;
}

/* --- NADPISY --- */
h1 {
  font-family: "Technika", "Open Sans", sans-serif;
  color: #0065BD;
  margin-top:0;
  letter-spacing:0.5px;
}
h2, h3, h4 {
  font-family: "Open Sans", Arial, sans-serif;
  color: #0065BD;
  margin-top: 0;
  letter-spacing: 0.3px;
}
p.subtitle { font-size:1.15em; color:#333; margin-bottom:0.8em; max-width:800px; }
p.credit { font-size:1em; color:#444; margin-bottom:1.8em; max-width:800px; }
p.credit a { color:#0065BD; font-weight:bold; text-decoration:none; }
p.credit a:hover { text-decoration:underline; }


/* === DVOU SLOUPCOVÝ LAYOUT === */
.container {
  display: flex;
  gap: 30px;
  flex-wrap: nowrap;       /* zabrání posunutí sidebaru pod main-column */
  align-items: flex-start;
}

/* Levý hlavní sloupec */
.main-column {
  flex: 1 1 0;
  min-width: 0;            /* klíčové: tabulky a inputy se nepřetáhnou přes sidebar */
}

/* Pravý sloupec (sidebar) */
.sidebar {
  flex: 0 0 250px;         /* pevná šířka, neškálovatelná */
  max-width: 250px;
  background-color: #f5f9ff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  max-width: 250px;
}
.sidebar .logos {
  display: flex;
  gap: 10px; /* mezera mezi logy */
  align-items: flex-start; /* zarovnání nahoru */
}

.sidebar .logos img {
  width: 50%;    /* každé logo zabere polovinu šířky sidebaru */
  height: auto;  /* zachování poměru stran */
  object-fit: contain; /* zajistí, že se celé logo vejde do boxu, zachová poměr */
}

.sidebar-note {
    font-size: 1rem;   /* menší písmo */
    line-height: 1.3;     /* lepší čitelnost */
}

@media (max-width: 900px) {
  .container { flex-direction: column; }
  .sidebar { max-width: 100%; margin-top: 20px; }
}

/* === OBECNÉ SEKCE === */
.main-column section {
  width: 100%;       /* zabírá 100 % šířky sloupce */
  max-width: 100%;   /* nepřetáhne sloupec */
  margin-bottom: 30px;
  padding: 20px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* === TABULKY === */
.main-column table { display:block; overflow-x:auto; 
	border-collapse: collapse;
  width: 100%;       /* zabírá 100 % šířky sloupce */
  max-width: 100%;   /* nepřetáhne sloupec */
  overflow-x: auto;
  box-sizing: border-box;
  margin-bottom: 10px;
}
th, td { border:1px solid #ccc; padding:8px 10px; text-align:left; }
th { background-color:#eaf3fc; font-weight:bold; }


/* === FORMULÁŘE A VSTUPY === */
.main-column select, .main-column input {
  padding: 8px;
  width: 50%;       /* zabírá 100 % šířky sloupce */
  max-width: 50%;   /* nepřetáhne sloupec */
  box-sizing: border-box;
  margin-bottom: 10px;
  font-size: 14px;
  text-align:right;
  border: 1px solid #bbb;
  border-radius: 5px;
  transition: border-color 0.3s;
}
.main-column select:focus, .main-column input:focus {
  border-color: #0065BD;
  outline: none;
}

.main-column textarea {
  width: 100%;       /* zabírá 100 % šířky sloupce */
  max-width: 100%;   /* nepřetáhne sloupec */
  margin-bottom: 10px;
  box-sizing: border-box; /* padding a border se počítají do šířky */
}

.header-figure {
  text-align: center;  /* centrování obrázku a titulku */
  margin: 15px 0 30px; /* mezera nad a pod obrázkem */
  display: block;
}

.header-figure img {
  max-width: 75%;
  height: auto;       /* zachování poměru stran */
  display: block;
  margin-left: auto;
    margin-right: auto;
}

.header-figure figcaption {
  font-size: 0.95em;
  color: #555;
  margin-top: 5px;
}

.count-info {
  font-size: 0.9em;
  color: #555;
  margin-top: -8px;
  margin-bottom: 10px;
  font-style: italic;
}

/* === TLAČÍTKA === */
button {
  background-color: #0065BD;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
button:hover {
  background-color: #004b8d;
}
button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* === ODKAZY === */
a {
  color: #0065BD;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* === FIELDSET (pro přidávání dat) === */
fieldset {
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 15px;
}
legend {
  font-weight: bold;
  color: #0065BD;
}

/* === OVLÁDACÍ PANEL DOLE === */
.controls {
  text-align: center;
  margin-top: 40px;
}
.controls button {
  margin: 0 10px;
}

/* === ZOBRAZENÍ KOMPOZIC === */
.composition-card { border: 1px solid #ccc; padding: 10px; margin-bottom: 10px; border-radius: 5px; }
  select, button { margin-top: 5px; margin-bottom: 15px; }
  table th, table td { padding: 5px; text-align: center; }
  

/* --- Oprava široké tabulky specimenů --- */
.specimens-table{
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;    /* 🔹 umožní horizontální scroll místo roztažení */
  box-sizing: border-box;
}

.specimens-table table {
  width: 100%;
  border-collapse: collapse;
}

.specimens-table th, .main-column specimens-table td {
  padding: 8px;
  border: 1px solid #ccc;
  text-align: center;
  white-space: nowrap; /* 🔹 zabrání lámání textu, ale drží úzké buňky */
}
  
/* === FORMULÁŘ ADD NEW DATA === */
.add-data-form {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 600px;
}

.add-data-form .form-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.add-data-form label {
  width: 250px;               /* stejné zarovnání všech popisků */
  text-align: right;          /* popisek vpravo od sloupce */
  font-weight: 600;
  color: #003366;
}

.add-data-form input[type="number"],
.add-data-form input[type="text"],
.add-data-form select {
  flex: 1;
  max-width: 250px;
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 5px;
  font-size: 14px;
  text-align: right;
  transition: border-color 0.3s;
}

.add-data-form input:focus {
  border-color: #0065BD;
  outline: none;
}

/* Zabránění záporným hodnotám (pouze kladné) */
.add-data-form input[type="number"]::-webkit-outer-spin-button,
.add-data-form input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
}

.add-data-form input[type="number"] {
  -moz-appearance: textfield;
}

.add-data-form button {
  align-self: flex-start;
  background-color: #0065BD;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-data-form button:hover {
  background-color: #004b8d;
}

/* Sekce specimens */
.specimen-section {
  border-top: 0px solid #ccc;
  padding-top: 15px;
}

.specimen-block {
  margin-top: 10px;
  padding: 12px 15px;
  border-radius: 8px;
}

  

/* === ZÁLOŽKY === */
 .tab-container {
  width: 100%;
  margin-top: 20px;
  display: block; /* 🔹 zajistí, že se záložky chovají jako blok, ne flex */
  flex-direction: column;
}

.tab-content {
  display: none;
  width: 100%; /* 🔹 roztáhne obsah pod tlačítky */
}

.tab-content.active {
  display: block;
}

.tab-buttons button {
  background-color: #f5f9ff;
  color: #0065BD;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 1000;
  border-bottom: 3px solid transparent;
  transition: 0.2s;
}

.tab-buttons button:hover {
  background-color: #f5f9ff;
}

.tab-buttons button.active {
  border-bottom: 3px solid #007BFF;
  background-color: #f5f9ff;
}

.filter-buttons {
  margin: 10px 0 20px;
}

#resetFiltersBtn {
  display: inline-block;
  background-color: #0065BD; /* světlejší modrá */
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin: 6px 0;
}

#resetFiltersBtn:hover {
  background-color: #004B8D;  /* univerzitní modrá při hoveru */
}

#saveCompositionBtn {
    align-self: flex-end;
}

.composition-btn {
  display: inline-block;
  background-color: #0065BD; /* světlejší modrá */
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin: 6px 0;
}

.composition-btn:hover {
  background-color: #004B8D;  /* univerzitní modrá při hoveru */
}

.composition-btn:active {
  transform: scale(0.98);
}

.invalid-flash {
  border-color: #e74c3c !important;
  box-shadow: 0 0 6px rgba(231, 76, 60, 0.8);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}


.preview-modal {
  background: rgba(0, 0, 0, 0.6);
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
}

.preview-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 80%;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.preview-buttons {
  text-align: right;
  margin-top: 15px;
}
.preview-buttons button {
  margin-left: 10px;
}

.form-buttons {
    display: flex;
    justify-content: flex-end; /* obě tlačítka doprava */
    gap: 12px;                 /* mezera mezi tlačítky */
    margin-top: 20px;
}

.site-footer {
  text-align: center;
  font-size: 14px;
  
  padding: 20px 0;
  margin-top: 10px;
  background-color: #f5f9ff; /* stejné jako okraje stránky */
  
}
