body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
}

/*záhlaví*/
.social {
  height: 40px;
}
/*Tlačítko pro přepínání dark mode*/
#dark-mode-toggle {
  height: 50px;
  width: 50px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  margin: auto auto auto 0;
  color: inherit;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

#dark-mode-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Mobilní menu: tlačítko styl jako link */
#dark-toggle-mobile {
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  width: 100%;
  text-align: right;
  margin-left: 10px;
}

/* Můžeš přidat hover efekt i tady */

#horní_lišta {
  display: flex;
  flex-direction: row-reverse;
  height: 80px;
  background-color: rgba(15, 13, 13, 0.993);
  font-style: normal;
  text-decoration: underline rgba(15, 13, 13, 0.993);
  color: #fff;
  position: fixed;
  top: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  z-index: 1000;
  width: 100%;
}
.logo_webu {
  margin-right: 20px;
  margin-left: 40px;
}
#dark-toggle-mobile {
  display: none;
}

.social_div {
  height: 120px;
  gap: 40px;
  margin-left: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.domů {
  float: right;
  margin-right: 40px;
  margin-top: 28px;
  color: #fff;
  text-decoration: none;
  font-size: 1.06rem;
}
#horní_lišta a:hover {
  font-weight: 700;
}
.rozcestí {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  font: bold 20px #000;
}
.rozcestí a {
  text-decoration: none;
  color: #000;
}
.rozcestí a:hover {
  color: #00008b;
}

.mobilni-menu {
  display: flex;
  position: relative;
  top: 15px;
}

#toggle-menu {
  display: none;
}

.menu-ikona {
  margin-right: 20px;
}

.odkazy-menu {
  display: none;
  flex-direction: column;
  background-color: #222;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 1000;
}

.odkazy-menu li {
  border-bottom: 1px solid #444;
  text-align: center;
  padding: 15px 0;
}

.odkazy-menu li a {
  color: white;
  text-decoration: none;
}

/* Tlačítko (3 čárky) */
.menu-ikona {
  font-size: 1.5rem;
  padding: 10px;
  cursor: pointer;
  display: none; /* Skryté na desktopu */
}

/* Checkbox ovládá viditelnost menu */
#toggle-menu:checked + .menu-ikona + .odkazy-menu {
  display: flex;
}

/*main*/
.btn-zpet {
  display: inline-block;
  padding: 0.5em 1em;
  background-color: #f0f0f0;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  margin: 15px;
  margin-top: 55px;
  transition: background-color 0.2s;
}

.btn-zpet:hover {
  background-color: #ddd;
  border-radius: 15px;
}

h1 {
  font-size: 2.5rem;
  color: #333;
  text-align: center;
  max-width: 90vw;
  margin: 0px auto 10px;
}

@media (max-width: 500px) {
  h1 {
    min-height: 2.5em; /* rezervace místa jen na mobilu */
  }
}

.date {
  color: #5f5f5f;
  font-size: 0.9rem;
  margin-bottom: 30px;
  text-align: center;
}
main img {
  width: 50vw;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0 auto;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
p {
  margin-bottom: 1.2em;
}
.tags {
  margin: 40px 0 20px 50px;
}
.tag {
  display: inline-block;
  background: #2d85c0;
  color: white;
  padding: 5px 10px;
  margin-right: 8px;
  border-radius: 15px;
  font-size: 0.85rem;
  cursor: default;
  user-select: none;
}

.text {
  font-size: 1.1rem;
  line-height: 1.6;
  padding: 20px;
  background-color: rgb(216, 216, 216);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  color: #333;
  width: 70%;
  display: block;
  margin: auto;
  margin-bottom: 50px;
}

/*zápatí*/
.záhlaví {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 30px;
  justify-content: center;
  align-items: start;
  padding: 70px 0 70px 0;
  height: fit-content;
  padding-bottom: 80px;
  font-size: 0.8rem;
}

.odkazy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.kontakty {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 10px;
  color: white;
}

footer {
  background-color: rgba(0, 0, 0, 0.904);
}

.text-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 60px;
  line-height: 1.5;
}

.text-footer span {
  text-align: center;
  color: white;
  margin-top: 10px;
}

.oddělení {
  display: none;
}

.kontakty span {
  margin-left: 15px;
  font-size: 0.875rem;
}

.záhlaví a,
.phone {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  font-size: 1rem;
}

.copyright {
  color: white;
  margin: 0;
  padding-bottom: 20px;
  text-align: center;
  font-size: 0.75rem;
}
.záhlaví a:hover {
  font-weight: bold;
}

.záhlaví p {
  color: white;
  font-size: 0.875rem;
  margin-top: 10px;
}

.mobilni-menu {
  display: flex;
  position: relative;
  top: 15px;
}

#toggle-menu {
  display: none;
}

.odkazy-menu {
  display: none;
  flex-direction: column;
  background-color: #222;
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  z-index: 1000;
  list-style: none;
  padding: 0;
}

.mobilni_logo {
  margin-left: 20px;
  display: none;
}

.odkazy-menu li {
  border-bottom: 1px solid #444;
  text-align: center;
  padding: 15px 0;
}

.odkazy-menu li a {
  color: white;
  text-decoration: none;
}

/* Tlačítko (3 čárky) */
.menu-ikona {
  font-size: 1.5rem;
  color: whitesmoke;
  margin-right: 20px;
  padding: 10px;
  cursor: pointer;
  display: none; /* Skryté na desktopu */
}

/* Checkbox ovládá viditelnost menu */
#toggle-menu:checked + .menu-ikona + .odkazy-menu {
  display: flex;
}

#copa_photo {
  padding-top: 10px;
}

@media screen and (max-width: 970px) {
  #horní_lišta,
  .rozcestí {
    display: none;
  }
  #dark-toggle-mobile {
    display: block;
  }
  .social_div {
    display: flex;
    flex-direction: row;
    gap: 40px;
    margin: 0;
  }

  h1 {
    font-size: 1.5rem;
    margin: 0 0 10px;
    color: #333;
    text-align: center;
    max-width: 90vw;
    margin: 70px auto;
    margin-bottom: 10px;
  }

  .text {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 10px;
    background-color: rgb(216, 216, 216);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #333;
    width: 80%;
    display: block;
    margin: auto;
    margin-bottom: 20px;
  }

  .tags {
    margin: 20px 0 10px 20px;
  }

  .img {
    max-width: 90vw;
    display: block;
    margin: 0 auto;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .btn-zpet {
    display: none;
  }

  /* Změny pro mobilní zobrazení */
  .seznam-kontakt a {
    font-size: 0.9rem;
  }
  .odkazy,
  .kontakty {
    margin: 0;
    text-align: center;
    align-items: center;
  }
  .kontakty {
    gap: 3px;
  }
  .mobilni_logo {
    display: block;
  }
  .oddělení {
    display: block;
    margin: 1rem auto;
    height: 1px;
    width: 20%;
    background-color: white;
  }

  .text-footer {
    margin-left: 0;
  }

  .text-footer span {
    width: 90%;
  }

  .kontakty img {
    width: 30px;
  }
  .kontakty h2 {
    margin: 0;
    margin-bottom: 7px;
  }
  .záhlaví {
    height: fit-content;
    padding-bottom: 0;
  }
  .záhlaví a,
  .záhlaví p,
  .kontakty p {
    font-size: 0.875rem;
  }
  .záhlaví h2 {
    font-size: 1.06rem;
  }
  .menu-ikona {
    display: block;
    color: whitesmoke;
  }
  .odkazy-menu {
    display: none;
  }
  .mobilni-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: rgba(15, 13, 13, 0.98);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
  }
  .záhlaví {
    grid-template-columns: 1fr; /* ze 4 sloupců na 1 */
    justify-content: center;
    align-content: center;
  }
}

#blog-proklik {
  padding: 2em 1em;
  border-top: 1px solid #ddd;
  max-width: 1200px;
  margin: 0 auto;
}

#blog-proklik h3 {
  margin-bottom: 1em;
  margin-left: 1em;
  font-size: 1.4em;
  color: white;
}

.blog-ctverce {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  justify-content: center;
}

.blog-ctverec {
  position: relative;
  flex: 1 1 30%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  min-width: 220px;
  max-width: 280px;
  transition: transform 0.2s ease;
}

.blog-ctverce .overlay {
  position: relative; /* pro overlay */
}

.blog-ctverce .overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
}

.blog-ctverec:hover {
  transform: scale(1.02);
}

.blog-ctverec .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1em;
}

.blog-ctverec h4 {
  margin: 0 0 0.3em;
  font-size: 1.1em;
  color: rgb(255, 255, 255);
  z-index: 1;
}

.blog-ctverec p {
  margin: 0;
  font-size: 0.9em;
  color: #ddd;
}

.zobrazit-vse {
  display: inline-block;
  margin-top: 2em;
  color: #ddd;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
  margin-left: 1em;
}

.zobrazit-vse::after {
  content: "→";
  margin-left: 0.5em;
  transition: margin-left 0.2s ease;
}

.zobrazit-vse:hover {
  color: #fff;
}

.zobrazit-vse:hover::after {
  margin-left: 0.7em;
}

@media screen and (max-width: 1000px) {
  #blog-proklik {
    padding: 0;
    border-top: none;
  }

  #blog-proklik h3 {
    text-align: center;
    margin-bottom: 1em;
  }

  .zobrazit-vse {
    display: block;
    text-align: center;
    margin: 1em auto;
  }

  .blog-ctverec {
    max-width: 50px;
  }
}

body.dark-mode {
  background-color: #3b3b3b;
  color: #e0e0e0;
}
body.dark-mode h1 {
  color: #e9e9e9;
}
body.dark-mode .date {
  color: #c2c2c2;
}
body.dark-mode p {
  background-color: #222;
  color: #d8d8d8;
}
body.dark-mode .btn-zpet {
  background-color: #3b3b3b;
  color: #e4e4e4;
}
body.dark-mode .btn-zpet:hover {
  background-color: #313131;
}
/* Položky v otevřeném menu */
.mobilni-menu .odkazy-menu {
  background-color: #121212; /* pro dark mode */
  margin-top: 10px;
}

/* Jednotlivé odkazy */
.mobilni-menu .odkazy-menu li a {
  color: #fff; /* bílý text pro tmavé pozadí */
  font-size: 1.1rem;
}

/* Oddělení mezi položkami */
.mobilni-menu .odkazy-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobilni-menu .odkazy-menu {
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.mobilni-menu .odkazy-menu {
  position: fixed;
  height: 360px;
  width: 100%; /* nebo 100% pokud chceš celé */
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(5px);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

/* Když je menu aktivní */
.mobilni-menu input[type="checkbox"]:checked ~ .odkazy-menu {
  transform: translateY(0);
}

/*3*/
.menu-ikona {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.menu-ikona span {
  display: block;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animace při otevření */
input[type="checkbox"]:checked + .menu-ikona span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

input[type="checkbox"]:checked + .menu-ikona span:nth-child(2) {
  opacity: 0;
}

input[type="checkbox"]:checked + .menu-ikona span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Efekt ikony při otevření */
.odkazy-menu li a i {
  margin-right: 8px;
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
  transform: scale(0.8);
  animation: iconPop 0.3s ease forwards;
  animation-delay: 0.2s;
}
