* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  ;
  overflow-x: hidden;
  max-width: 100%;
  background: #ebc99c;
}

section {
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-section {
  position: relative;
  width: 100%;
  height: 750px;
  background-image: url('pozadi.png');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 20px;
}

.map-wrapper {
  position: relative;
  flex: 1;
  height: 100%;
  margin-right: 20px;
}

.map-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.pin {
  width: 30px;
  height: 30px;
  background-color: red;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: absolute;
  left: 68%;
  top: 60%;
  animation: pulse 2s infinite;
  z-index: 2;
  position: absolute;
}

.character-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.speech-bubble {
  background: #ebc99c;
  border-radius: 15px;
  padding: 10px 15px;
  margin-bottom: 0px;
  max-width: 500px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  font-size: 15px;
}

.character-boy1 {
  width: 430px;
}

.character-boy2 {
  width: 430px;
}

.room-section {
  position: relative;
  width: 100%;
  height: 750px;
  background-image: url('pokoj.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.room-section .character-bubble {
  align-items: center;
}

.items-section {
  width: 100%;
  height: 750px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  background-image: url("Casopis_Vedem\ \(1\).jpg");
  background-color: rgba(255, 255, 255, 0.3);
}

.items-left {
  display: flex;
  padding-left: 40px;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.items-left img {
  max-width: 50%;
  height: 230px;
}

.items-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.character-boy3 {
  width: 375px;
}

.transport-section {
  position: relative;
  width: 100%;
  height: 750px;
  background-image: url('koleje.jpg');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.train {
  position: absolute;
  bottom: 0;
  left: -200px;
  height: 300px;
  animation: moveTrain 5s linear infinite;
}

.speech-wrapper {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.boy-image {
  width: 150px;
  margin-bottom: -50px;
  z-index: 3;
}

.speech-buble {
  background: #ebc99c;
  border-radius: 20px;
  padding: 20px 30px;
  max-width: 900px;
  font-size: 13px;
  z-index: 2;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}


@keyframes pulse {
  0% {
    transform: rotate(-45deg) scale(1);
    opacity: 1;
  }

  50% {
    transform: rotate(-45deg) scale(1.2);
    opacity: 0.7;
  }

  100% {
    transform: rotate(-45deg) scale(1);
    opacity: 1;
  }
}

@keyframes moveTrain {
  from {
    left: -100%;
  }

  to {
    left: 100%;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .character-boy1 {
    width: 380px;
  }

  .character-boy3 {
    width: 325px;
  }

  .character-boy2 {
    width: 380px;
  }

  .boy-image {
    width: 100px;
    margin-bottom: -50px;
    z-index: 3;
  }

  section {
    flex-direction: column;
  }

  .map-section,
  .room-section,
  .items-section {
    flex-direction: column;
    height: auto;
  }

  .map-wrapper,
  .character-bubble,
  .items-left,
  .items-right {
    width: 100%;
    margin: 0;
    font-size: 14px;
  }

  .speech-bubble,
  .speech-buble {
    font-size: 14px;
  }

  .speech-wrapper {
    left: 0%;
    transform: none;
  }

  .train {
    visibility: hidden;
    animation: none;
  }
}
@media (max-width: 400px) {
  .character-boy1 {
    width: 320px;
  }

  .character-boy3 {
    width: 265px;
  }

  .character-boy2 {
    width: 320px;
  }

  .boy-image {
    width: 80px;
    margin-bottom: -50px;
    z-index: 3;
  }
}