* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Satoshi", sans-serif;
  scroll-behavior: smooth;
}
html,
body,
section,
footer {
  overflow-x: hidden;
}
body {
  background: rgb(255, 248, 240);
  background: -moz-linear-gradient(
    338deg,
    rgba(255, 248, 240, 1) 0%,
    rgba(200, 245, 255, 1) 47%,
    rgba(255, 200, 170, 1) 100%
  );
  background: -webkit-linear-gradient(
    338deg,
    rgba(255, 248, 240, 1) 0%,
    rgba(200, 245, 255, 1) 47%,
    rgba(255, 200, 170, 1) 100%
  );
  background: linear-gradient(
    338deg,
    rgba(255, 248, 240, 1) 0%,
    rgba(200, 245, 255, 1) 47%,
    rgba(255, 200, 170, 1) 100%
  );
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  min-height: 100vh;
}

nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  margin: 2rem;
}

.homeButton {
  border: 1px solid black;
  padding: 0.6rem 1.1rem;
  border-radius: 21px;
  color: black;
  text-decoration: none;
  transition: 0.2s ease;
  margin: 0.5rem;
}

.links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  margin: 2rem;
}

.homeButton:hover {
  background: black;
  color: white;
}

main {
  padding: 0 4vw;
}
main h1 {
  font-size: 2.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

main h2 {
  display:none;
}

.flex {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.custom-dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-btn {
  background: #f9f9f9;
  border: 1px solid #ccc;
  padding: 8px 24px;
  border-radius: 21px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.15rem;
}
.arrow {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid #333;
  border-bottom: 2px solid #333;
  transform: rotate(45deg);
  margin-left: auto;
  transition: transform 0.2s;
}

.arrow.open {
  transform: rotate(-135deg); 
}

.dropdown-list {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  margin-top: 4px;
  list-style: none;
  padding: 5px;
  width: 100%;
  border-radius: 21px;
  overflow: hidden;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dropdown-list li {
  padding: 8px 12px;
  cursor: pointer;
}
.dropdown-list li:hover {
  background: #eee;
}
.dropdown-list li.active {
  font-weight: bold;
}
.hidden {
  display: none;
}

.udalosti {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}
.month {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.udalost {
  width: 700px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  background: white;
  border: 1px solid #ececec;
  min-height: 100px;
  border-radius: 21px;
  margin-bottom: 3rem;
}
.datum {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #e55423;
  margin-left: 2rem;
  padding-right: 1rem;
  border-right: 1px solid #ececec;
}
.cisloDatum {
  font-size: 1.5rem;
  font-weight: 600;
}
.den {
  font-size: 1.1rem;
  font-weight: 600;
}
.title {
  font-size: 1.15rem;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  line-height: 1.2;
}
.subtitle {
  font-size: 0.9rem;
  word-break: keep-all;      
  overflow-wrap: normal;       
  white-space: normal;
  max-width: 75%;
}
.textualContent {
  display: flex;
}
.text {
  margin-left: 1rem;
  max-width: 90%;
  word-break: keep-all;
}
.udalost:not(.has-images) {
  min-height: 100px;
}

.image, .image-single {
  position: relative;
  width: 190px;
  height: 98px;
  cursor: pointer;
  border-radius: 21px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  object-fit: cover;
  z-index: 0;
}
.image:hover, .image-single:hover {
  z-index: 9;
}

.year {
  margin-block: 1rem;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: none;
}
.overlay-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  flex-direction: column;
}
#selected-image {
  width: 50%;
  height: 65%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  margin-bottom: 2rem;
  border-radius: 1rem;
}
.overlay-settings {
  background: none;
}
#overlay-link {
  color: black;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  border-radius: 21px;
  border: 0px;
  font-size: 1rem;
  background: #d1f3dc;
  margin-right: 1rem;
  border: 1px solid black;
  font-weight: 600;
  transition: opacity 0.2s ease-in;
}
#close-overlay {
  color: black;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  border-radius: 21px;
  border: 0px;
  font-size: 1rem;
  cursor: pointer;
  background: #e9ddfd;
  border: 1px solid black;
  font-weight: 600;
  transition: opacity 0.2s ease-in;
}
#close-overlay:hover,
#overlay-link:hover {
  opacity: 0.8;
}
.overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

/* Visible state with animation */
.overlay.show {
  display: flex;
  opacity: 1;
  pointer-events: all;
}
@media (max-width: 750px) {
  .homeButton {
    display: block;
	margin: 0;
  }
	
  .other {
    display: none;
  }
}
@media (max-width: 730px) {
  .udalost {
    width: 500px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    height: 300px;
    overflow: hidden;
  }
  .textualContent {
    margin-top: 1rem;
    margin-bottom: 1rem;
    margin-left: 2rem;
  }
  .datum {
    margin-left: 0rem;
  }
  .image-wrapper {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  .image-single, .image {
    width: 100%;
    position: static;
    height: 220px;
    border-radius: 21px;
    display: block;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }
	
  .udalost:not(.has-images) {
    height: 150px;
	display: flex;
	justify-content: center;
  }
	
  #selected-image {
    width: 70%;
  }
}
@media (max-width: 536px) {
  .udalost {
    width: 400px;
  }
  .title {
    font-size: 1.2rem;
  }
  #selected-image {
    width: 80%;
  }
}

@media (max-width: 450px) {
  .logo img {
    width: 150px;
  }
  
  .links {
	 margin-left: auto;
  }
	
  .homeButton {
	transform: scale(0.9)
  }
	

  .udalost {
    width: 300px;
    height: 300px;
  }
  #rok {
    width: 100px;
  }
  .datum {
    margin-left: 0.5rem;
  }
  .title {
    font-size: 1.2rem;
  }
  #selected-image {
    height: 40%;
  }
}
@media (max-width: 350px) {

  .udalost {
    transform: scale(0.9);
  }
}
