
/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

li {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ベース設定 */
.inner {
  max-width: 800px;
  width: 97%;
  margin: 0 auto;
}

.img-100 {
  width: 100%;
  height: auto;
}

/* ここから重要！ */

.hamidashi-layout-test {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.hamidashi-layout-test__child1 {
  width: 45%;
}
@media screen and (max-width: 799px) {
  .hamidashi-layout-test__child1 {
    width: 100%;
  }
}

.hamidashi-layout-test__child2 {
  margin-right: calc(50% - 50vw);
  width: calc(50vw - 50% + 50%);
}
@media screen and (max-width: 799px) {
   .hamidashi-layout-test__child2 {
    margin-top: 20px;
    margin-left: calc(50% - 50vw);
    width: 100vw;
  }
}


/* ２つ目設定 */
.hamidashi-layout-test + .hamidashi-layout-test {
  margin-top: 50px;
}

.hamidashi-layout-test:nth-child(even) {
  flex-direction: row-reverse;
}

.hamidashi-layout-test:nth-child(even) .hamidashi-layout-test__child2 {
  margin-right: 0;
  margin-left: calc(50% - 50vw);
}
@media screen and (max-width: 799px) {
  .hamidashi-layout-test:nth-child(even) .hamidashi-layout-test__child2 {
    margin-right: calc(50% - 50vw);
  }
}




.hamidashi-layout-test-sticky {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  position: relative;/* ここ重要！ */
}

.hamidashi-layout-test-sticky__child1 {
  width: 45%;
}
@media screen and (max-width: 799px) {
  .hamidashi-layout-test-sticky__child1 {
    width: 100%;
  }
}

.hamidashi-layout-test-sticky__child2 {
  margin-right: calc(50% - 50vw);
  width: calc(50vw - 50% + 50%);
}
@media screen and (max-width: 799px) {
   .hamidashi-layout-test-sticky__child2 {
    margin-top: 20px;
    margin-left: calc(50% - 50vw);
    width: 100vw;
  }
}

/* ここから重要！ */
.hamidashi-layout-test-sticky__txt {
  position: sticky;
  top: 40px;
  right: 0;
  padding-bottom: 40px;
}


/* ２つ目設定 */
.hamidashi-layout-test-sticky + .hamidashi-layout-test-sticky {
  margin-top: 50px;
}

.hamidashi-layout-test-sticky:nth-child(even) {
  flex-direction: row-reverse;
}

.hamidashi-layout-test-sticky:nth-child(even) .hamidashi-layout-test-sticky__child2 {
  margin-right: 0;
  margin-left: calc(50% - 50vw);
}
@media screen and (max-width: 799px) {
  .hamidashi-layout-test-sticky:nth-child(even) .hamidashi-layout-test-sticky__child2 {
    margin-right: calc(50% - 50vw);
  }
}

/* ここから重要！ */
.hamidashi-layout-test-sticky:nth-child(even) .hamidashi-layout-test-sticky__txt {
  right: auto;
  left: 0;
}


.hamidashi-layout-test-sticky-not {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  position: relative;/* ここ重要！ */
}

/* ここに指定すると効かない */
.hamidashi-layout-test-sticky-not__child1 {
  width: 45%;
  position: sticky;
  top: 40px;
  right: 0;
  padding-bottom: 40px;
}
@media screen and (max-width: 799px) {
  .hamidashi-layout-test-sticky-not__child1 {
    width: 100%;
  }
}

.hamidashi-layout-test-sticky-not__child2 {
  margin-right: calc(50% - 50vw);
  width: calc(50vw - 50% + 50%);
}
@media screen and (max-width: 799px) {
   .hamidashi-layout-test-sticky-not__child2 {
    margin-top: 20px;
    margin-left: calc(50% - 50vw);
    width: 100vw;
  }
}


/* ２つ目設定 */
.hamidashi-layout-test-sticky-not + .hamidashi-layout-test-sticky-not {
  margin-top: 50px;
}

.hamidashi-layout-test-sticky-not:nth-child(even) {
  flex-direction: row-reverse;
}

.hamidashi-layout-test-sticky-not:nth-child(even) .hamidashi-layout-test-sticky-not__child2 {
  margin-right: 0;
  margin-left: calc(50% - 50vw);
}
@media screen and (max-width: 799px) {
  .hamidashi-layout-test-sticky-not:nth-child(even) .hamidashi-layout-test-sticky-not__child2 {
    margin-right: calc(50% - 50vw);
  }
}

/* ここに指定すると効かない */
.hamidashi-layout-test-sticky-not:nth-child(even) .hamidashi-layout-test-sticky-not__child1 {
  right: auto;
  left: 0;
}