/* -------------------------------------
   ZÁKLADNÉ NASTAVENIA
------------------------------------- */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #fdfdfd;
  color: #222;
}

/* Obal – konzistentná šírka stránky */
body > header,
body > main,
body > footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* -------------------------------------
   HLAVIČKA
------------------------------------- */
header {
  background-color: #0057a3; /* tmavomodrý pás */
  color: #fff;
  padding: 1rem 0 2rem 0;
  position: relative;
  border-bottom: 3px solid #004080;
  min-height: 180px; /* aby sa text nepchal pod logo */
}

/* -------------------------------------
   ZÁKLADNÉ NASTAVENIE STRÁNKY
------------------------------------- */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #fdfdfd;
  color: #222;
}

body > header,
body > main,
body > footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* -------------------------------------
   HLAVIČKA
------------------------------------- */
header {
  background-color: #0057a3;
  color: #fff;
  padding: 1rem 0 2rem 0;
  position: relative; /* veľmi dôležité pre správne umiestnenie loga */
  border-bottom: 3px solid #004080;
  min-height: 180px;
}

/* -------------------------------------
   LOGO, DÁTUM A POČÍTADLO
------------------------------------- */
.top-right-block {
  position: absolute;
  top: 10px;
  right: 20px;
  text-align: right;
  color: #DDDDDD;
  font-family: Arial, sans-serif;
}

.top-right-block img {
  max-width: 180px;
  height: auto;
  display: inline-block;
  margin: 0 0 5px 0;
}

.top-right-block div {
  font-size: 0.9em;
}

/* -------------------------------------
   NAVIGÁCIA – PC verzia (vodorovné menu)
------------------------------------- */
nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style-type: none;
  padding: 0;
  margin: 1rem 0 0 0;
  gap: 1rem;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  padding-bottom: 4px;
  border: none;
}

nav a.active {
  border-bottom: 5px solid #ff66b2;
}

nav a:hover {
  border-bottom: 3px solid #ff66b2;
}

/* -------------------------------------
   PÄTIČKA
------------------------------------- */
footer {
  position: fixed;
  bottom: 0;
  right: 0;
  padding: 5px 10px;
  color: black;
  background: transparent;
  font-size: 0.9em;
  font-family: Arial, sans-serif;
  z-index: 1000;
}

/* -------------------------------------
   MOBILNÉ A TABLETOVÉ ZOBRAZENIE
------------------------------------- */

/* TABLETY (šírka do 768px) */
@media (max-width: 768px) {
  header {
    position: relative;
  }

  .top-right-block {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    text-align: right !important;
  }

  .top-right-block img {
    max-width: 100px !important;
    height: auto;
  }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  nav a {
    border-left: 4px solid transparent;
    padding: 6px 0;
  }

  nav a.active,
  nav a:hover {
    border-left: none;
    border-bottom: 3px solid #ff66b2;
  }

  header h1,
  main h2 {
    margin-top: 100px;
    text-align: left;
  }
}

/* MOBILY (šírka do 480px) */
@media (max-width: 480px) {
  .top-right-block img {
    max-width: 70px !important;
  }

  header h1,
  main h2 {
    margin-top: 80px;
  }

  nav ul {
    gap: 0.4rem;
  }

  nav a {
    font-size: 0.95em;
  }
}

/* -------------------------------------
   OPRAVY – len jeden aktívny prvok v menu
------------------------------------- */
nav a.active {
  border-bottom: 3px solid #ff66b2;
}

@media (max-width: 768px) {
  nav a.active {
    border-bottom: 3px solid #ff66b2 !important;
    border-left: none !important;
  }

  nav a:hover {
    border-bottom: 3px solid #ff66b2 !important;
    border-left: none !important;
  }

  nav a:not(.active):hover {
    border-bottom: 3px solid #ff66b2;
  }

  nav a.active:hover ~ a {
    border-bottom: none;
  }
}
