/* ---------------------------------- */
/* styl.css - kompletně přepsané */
/* ---------------------------------- */

/* Základní box-sizing pro všechny elementy */
* {
  box-sizing: border-box;
}

/* Body stránky */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #fdfdfd;
  color: #333;
}

/* Hlavní kontejner */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px; /* odsazení od levého a pravého okraje */
  box-sizing: border-box;
}

/* Všechny odstavce v containeru */
.container p {
  margin: 16px 0;
  padding: 0; /* padding řeší container */
  text-align: justify;  /* zarovnání do bloku */
}

/* Horizontální čáry */
.container hr {
  border: none;
  height: 1px;
  background: #171AAA;
  margin: 16px 0;
}

/* Nadpisy */
h1, h2, h3 {
  margin: 0.5em 0;
}

/* Styl pro samostatný menší tučný nadpis */
.titlepagelink {
  font-size: 1rem;       /* velikost nadpisu */
  font-weight: 700;        /* tučný */
  color: #2c3e50;          /* barva */
  margin-top: 1.8rem;         /* větší svislá mezera nad nadpisem */
  margin-bottom: 1.5rem;    /* mezera pod nadpisem */
  line-height: 1.2;        /* kompaktní řádkování */
  text-align: center;       /* horizontální vycentrování */
}

/* Styl pro centrovaný text */
.container p.center-paragraph {
  max-width: 700px;
  margin: 1.5rem auto;
  text-align: center;
}

header.main-header {
  text-align: center;
  margin-bottom: 2rem;
}

header.main-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

header.main-header p {
  font-size: 1.1rem;
  color: #555;
  text-align: center;
}


/* ---------------------------------- */
/* Obrázky */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Obrázky v řadě na titulce*/
.image-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Obrázky v řadě v hraničních kamenech jednoho panství */
.image-row-fixed {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0 16px;
}

/* Obrázky v řadě v hraničních kamenech jednoho panství */
.image-row-fixed img {
  height: 180px;
  width: auto;
  object-fit: cover;
}

/* Obrázky v řadě v hraničních kamenech jednoho panství pro mobil */
@media (max-width: 600px) {
  .image-row-fixed img {
    height: 130px;
  }
}

/* Obrázky v řadě v hraničních kamenech titulky */
.image-row-fixed-small {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0 16px;
}

/* Obrázky v řadě v hraničních kamenech titulky */
.image-row-fixed-small img {
  height: 120px;
  width: auto;
  object-fit: cover;
}

/* Obrázky v řadě v hraničních kamenech titulky pro mobil */
@media (max-width: 600px) {
  .image-row-fixed-small img {
    height: 130px;
  }
}

/* ---------------------------------- */
/* Header */
.header {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-title {
  text-align: center;
  font-family: Verdana, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: #171AAA;
  margin: 10px 0;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .header {
    display: flex;
    flex-direction: column;  /* nadpis nad spacerem/sloupci */
    align-items: center;     /* horizontální centrování */
    padding: 0 8px;          /* menší padding na mobilu */
  }

  .page-title {
    margin: 10px 0;
    text-align: center;
    font-size: 1.3rem;       /* případně zmenšit font pro mobil */
  }
}


/* ---------------------------------- */
/* Navigace */
nav, .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0 16px;
}

nav ul {
  display: flex;
  flex-direction: column; /* mobil */
  padding: 0;
  margin: 0;
  list-style: none;
}

nav li {
  margin: 0.25em 0;
}

/* Top navigation */
.top-nav {
  display: flex;
  justify-content: center;
  align-items: stretch; /* všechny tlačítka stejné výšky */
  gap: 0.5rem;
  margin-top: 15px;   /* malá mezera nad navigací */
}

.top-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  min-height: 40px;      /* základní výška na desktopu */
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1;
  gap: 6px;              /* mezera mezi ikonou a textem */
}

.top-nav a:hover {
  background-color: #2980b9;
}

.top-nav a.active {
  background-color: #1c5980;
  font-weight: bold;
}

/* ---------------------------------- */
/* DE vlaječka */
.lang-switch {
  display: flex;             /* blokový flex, ne inline-flex */
  align-items: center;       /* vertikální centrování */
  justify-content: center;   /* horizontální centrování textu a vlaječky */
  gap: 4px;                  /* mezera mezi vlaječkou a textem */
  padding: 4px 8px;
  border-radius: 4px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: bold;
  color: #171AAA;
  text-decoration: none;
  border: 1px solid #171AAA;
  background-color: #f9f9f9;
  line-height: 1;
}

.lang-switch img {
  height: 20px; /* větší a přehlednější vlaječka */
  width: auto;
  display: block;
}

.lang-switch:hover {
  background-color: #171AAA;
  color: white;
}

.lang-switch:hover img {
  filter: brightness(0) invert(1); /* vlaječka se zvýrazní při hover */
}

/* Responzivní menu pro mobil */
@media (max-width: 600px) {
  .top-nav ul {
    flex-direction: column;  /* tlačítka pod sebou */
    align-items: center;      /* NE stretch, aby tlačítka nezabírala celou šířku */
    gap: 0.5rem;
    padding: 0 8px;
  }

  .top-nav a {
    display: flex;
    align-items: center;      /* vertikální centrování obsahu */
    justify-content: center;  /* horizontální centrování textu a vlaječky */
    min-height: 50px !important;
    font-size: 1rem !important;
    padding: 12px 16px !important;
    gap: 6px;
  }

  /* speciálně DE vlaječka */
  .top-nav a.lang-switch {
    display: inline-flex;     /* jen tolik, kolik potřebuje */
    align-items: center;      /* udržet vlaječku a text ve stejné řadě */
    justify-content: center;
    gap: 4px;                 /* malá mezera mezi vlaječkou a DE */
  }

  .lang-switch img {
    flex-shrink: 0;           /* vlaječka se nevytahuje ani nepřesouvá */
    height: 20px;
    width: auto;
  }
}





/* ---------------------------------- */
/* Tabulky */


table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

th {
  background-color: #3498db;
  color: white;
  font-weight: 600;
}

tr:hover {
  background-color: #f1f9ff;
}


/* Přidat střídání barev řádků */
tbody tr:nth-child(even) {
  background-color: #f9f9f9; /* světlejší řádky */
}

tbody tr:nth-child(odd) {
  background-color: #ffffff; /* bílá, nebo tmavší */
}


.data-table img {
  height: 1.2em;
  margin-right: 0.4em;
  vertical-align: middle;
}

td.status {
  text-align: left;
  padding-left: 0.5em;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4em;
}

.status-item img { margin: 0; }

/* Responzivní design pro mobil */
 @media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
   th {
    display: none; /* skryjeme hlavičky pro mobil */
  }
    td {
    display: block;
    padding-left: 50%;
    position: relative;
  }
  td::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    padding-left: 1rem;
    font-weight: bold;
    white-space: nowrap;
  }
}


/* ---------------------------------- */
/* Page footer */
.page-footer {
  text-align: center;  /* centrování textu */
  margin: 0 auto;      /* zajistí centrování celého bloku, pokud je potřeba */
  padding: 16px 0;     /* volitelné vertikální odsazení */
}

.page-footer p {
  margin: 0.5em 0;     /* vertikální mezera mezi odstavci */
  text-align: center;  /* centrování textu */
}

/* ---------------------------------- */
/* Responsivní text */
@media (max-width: 600px) {
  body { font-size: 14px; }
  h1 { font-size: 1.5em; }
  h2 { font-size: 1.3em; }
  h3 { font-size: 1.1em; }

  .top-nav ul { flex-direction: column; align-items: center; }
}


/* ======================================
   Lepší čitelnost tabulky na mobilu
====================================== */
@media (max-width: 768px) {

  /* větší kontrast mezi řádky */
  tbody tr:nth-child(even) {
    background-color: #f3f6f8;   /* světle modrá */
  }

  tbody tr:nth-child(odd) {
    background-color: #ffffff;
  }

  /* každý záznam jako karta */
  tbody tr {
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  }

  /* oddělení jednotlivých buněk */
  td {
    border-bottom: 1px solid #dde6ee;
  }

  td:last-child {
    border-bottom: none;
  }
}

/* ======================================
   Základní TABLE – lepší čitelnost na mobilu
   (platí i pro tabulky bez class)
====================================== */
@media (max-width: 768px) {

  /* střídání řádků */
  table:not(.item-table) tbody tr:nth-child(even) {
    background-color: #f3f6f8;
  }

  table:not(.item-table) tbody tr:nth-child(odd) {
    background-color: #ffffff;
  }

  /* karta místo klasického řádku */
  table:not(.item-table) tbody tr {
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  }

  /* oddělení buněk */
  table:not(.item-table) td {
    border-bottom: 1px solid #dde6ee;
  }

  table:not(.item-table) td:last-child {
    border-bottom: none;
  }
}