body {
  margin: 0%;
  padding: 0%;
  overflow-x: hidden; /* Prevent horizontal scrolling on the entire page */
}
.carousel {
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  position: relative;
  background-color: rgb(0 0 0 / 50%);
}
.slider-wrapper {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}
/* old */
/* .item {
  min-width: 100vw;
  height: 800px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.item img {
  width: 100%;
  height: 800px;
  object-fit: cover;
  overflow: hidden;
} */

/* old2 */
.item {
  min-width: 100vw;
  height: 100vh;
  padding-right: 220px;
  box-sizing: border-box;
  position: relative;
  overflow: initial;
}

.imgcrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.0);
  transition: ease-in-out 6s;
}

.imgcrop.lighton {
  filter: brightness(1.0);
  transition: ease-in-out 0s;
}

.imgcrop.center_center_pc {
  object-position: center center;
}

.imgcrop.center_top_pc {
  object-position: center top;
}

.imgcrop.left_center_pc {
  object-position: left center;
}

.imgcrop.right_center_pc {
  object-position: right center;
}

.imgcrop.center_bottom_pc {
  object-position: center bottom;
}

.imgcrop.right_top_pc {
  object-position: right top;
}

.imgcrop.right_bottom_pc {
  object-position: right bottom;
}

.imgcrop.left_top_pc {
  object-position: left top;
}

.imgcrop.left_bottom_pc {
  object-position: left bottom;
}

.slider-content {
  position: absolute;
  top: 14%;
  left: 40%;
  transform: translateX(-50%);
  color: white;
  text-shadow: 0 5px 10px black;
  max-width: 1140px;
  z-index: 5;
}
.topic {
  color: coral;
  font-size: 25px;
  font-weight: 600;
  margin-top: 0px;
  margin-bottom: 10px;
}
.des {
  color: white;
  font-size: 22px;
  font-weight: bold;
  text-shadow: 1px solid black;
  margin-bottom: 10px;
  -webkit-text-stroke: 0.2px#898989;
  text-stroke: 0.2px#898989;
}
.buttons {
  position: absolute;
  bottom: 5%;
  right: 5%;
  margin-top: 30px;
  display: flex;
  gap: 10px;
  z-index: 5;
}
button {
    width: 12vw;
    min-width: 90px;
    max-width: 160px;
    height: 12vw;
    min-height: 90px;
    max-height: 160px;
    border-radius: 50%;
    border: none;
    background-color: aliceblue;
    color: black;
    letter-spacing: 3px;
    font-weight: bold;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.29);
    display: flex;
}
button:nth-child(2) {
  background-color: transparent;
  right: 5%;
  color: white;
  /* background-color: transparent; */
  background-color: #5b8bb3;
  border: 2px solid white;
  /* box-shadow: 2px 2px black; */
  /* text-shadow: 2px 2px black; */
}



/* Ensure links inside buttons have consistent styles */
button a {
  color: white; /* Text color of links set to white */
  text-decoration: none; /* Remove underline */
  font-weight: inherit; /* Inherit font-weight from button */
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

button:nth-child(2) a {
  color: white; /* Explicitly set for the second button */
}

button:hover {
  opacity: 0.9;
  transition: 0.3s;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
}

/* クリックできなくする */
.secret-portal-click-na {
  cursor: none;
  pointer-events: none;
}

.secret-portal {
  position: absolute;
  width: 100px;
  height: 100px;
  opacity: 0;
  visibility: hidden;
  transition: 4s;
  scale: 0.99;
  z-index: 1;
}

.secret-portal-default {
  opacity: 0;
  visibility: hidden;
  transition:  opacity 10s, visibility 10s;
}

.secret-portal-button {
  top: -20%;
  left: 20%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 10s, visibility 10s;
  z-index: -1;
}

/* 0 → 左下でラインダンス */
.secret-portal-default.secret-portal-0 {
  top: 85%;
  left: 5%;
  opacity: 1;
  visibility: visible;
  transition:  opacity 10s, visibility 10s;
  scale: 0.8;
}
.secret-portal-0::before {
  content: "";
  position: absolute;
  background-image: url(../images/consultation/IMG_4866_2.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  top: 0;
  left: -65%;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 10s, visibility 10s;
}
.secret-portal-0::after {
  content: "";
  position: absolute;
  background-image: url(../images/consultation/IMG_4866_2.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  top: 0;
  left: 65%;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 10s, visibility 10s;
}
.secret-portal-0 .secret-portal-dummy::after {
  content: "";
  position: absolute;
  background-image: url(../images/consultation/IMG_4866_2.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  top: 0;
  left: 130%;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 10s, visibility 10s;
}

.secret-portal-default.secret-portal-0::before {
  opacity: 1;
  visibility: visible;
  transition: opacity 10s, visibility 10s;
}

.secret-portal-default.secret-portal-0::after {
  opacity: 1;
  visibility: visible;
  transition: opacity 10s, visibility 10s;
}

.secret-portal-0 .secret-portal-dummy::after {
  opacity: 1;
  visibility: visible;
  transition: opacity 10s, visibility 10s;
}

/* 1 → ボタン上部に出現 */
.secret-portal-button.secret-portal-1 {
  top: -20%;
  left: 20%;
  opacity: 1;
  visibility: visible;
  transition: opacity 10s, visibility 10s;
  z-index: -1;
  scale: 1;
  pointer-events: none;
}

.secret-portal-button.secret-portal-1:hover {
  pointer-events: none;
}

/* 2 → 画面右から顔を出す */
.secret-portal-default.secret-portal-2 {
  top: 30%;
  right: -3%;
  transform: rotate(270deg);
  opacity: 1;
  visibility: visible;
  transition: opacity 10s, visibility 10s;
  scale: 1;
}

/* 3 → 画面上から逆さで顔を出す */
.secret-portal-default.secret-portal-3 {
  top: -5%;
  left: 30%;
  transform: rotate(165deg);
  opacity: 1;
  visibility: visible;
  transition: opacity 10s, visibility 10s;
  scale: 1;
}

/* 4 → 画面左下から大きく出現 */
.secret-portal-default.secret-portal-4 {
  top: 100%;
  left: 0%;
  opacity: 1;
  visibility: visible;
  transition: opacity 10s, visibility 10s;
  /* transform: rotate(-20deg); */
  scale: 5;
}

/* 5 → 画面中央に出現 */
.secret-portal-default.secret-portal-5 {
  top: 50%;
  right: 40%;
  opacity: 1;
  visibility: visible;
  transition: opacity 10s, visibility 10s;
  scale: 1;
}



.secret-portal-1:hover,
.secret-portal-4:hover,
.secret-portal-5:hover {
  transform: rotate(2deg);
}

.secret-portal-1:hover {
  z-index: -1;
  overflow: hidden;
}
.secret-portal-1 a:hover {
  z-index: -1;
  overflow: hidden;
}

.secret-portal-default.secret-portal-3:hover {
  top: -4.5%;
  transition: 0.3s;
}

.secret-portal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive adjustments for mobile devices */
@media (max-width:768px) {
  .item {
    min-width: 100vw;
    height: 400px;
    padding-right: 0;
    box-sizing: border-box;
    position: relative;
    overflow: initial;
  }

  .item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    overflow: hidden;
    /* object-position: initial; */
  }

  .imgcrop.center_center_sp {
    object-position: center center;
  }

  .imgcrop.center_top_sp {
    object-position: center top;
  }

  .imgcrop.left_center_sp {
    object-position: left center;
  }

  .imgcrop.right_center_sp {
    object-position: right center;
  }

  .imgcrop.center_bottom_sp {
    object-position: center bottom;
  }

  .imgcrop.right_top_sp {
    object-position: right top;
  }

  .imgcrop.right_bottom_sp {
    object-position: right bottom;
  }

  .imgcrop.left_top_sp {
    object-position: left top;
  }

  .imgcrop.left_bottom_sp {
    object-position: left bottom;
  }

  .topic {
    color: coral;
    font-size: 15px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .slider-content {
    top: 8%;
    left: 0;
    width: 91%;
    padding: 0 5%;
    transform: translateX(0);
    text-shadow: 0 5px 10px black;
}

  .des {
    /* visibility: hidden; */
    font-size: 14px;
  }
  
  .buttons {
    font-size: 10px;
  }

  button {
    padding: 0 5px;
    /* position: relative; */
  }
  .buttons:first-child {
    position: relative;
  }

  /* 0 → 左下でラインダンス */
  .secret-portal-default.secret-portal-0 {
    top: 75%;
    scale: 0.6;
  }

  /* 1 → ボタン上部に出現 */
  .secret-portal-button.secret-portal-1 {
    top: -44%;
    left: 8%;
  }

  .secret-portal-button {
    top: -44%;
    left: 8%;
  }

  /* 2 → 画面右から顔を出す */
  .secret-portal-default.secret-portal-2 {
    top:48%;
    right: -10%;
  }

  /* 3 → 画面上から逆さで顔を出す */
  .secret-portal-default.secret-portal-3 {
    top: -10%;
  }

  /* 4 → 画面左下から大きく出現 */
  .secret-portal-default.secret-portal-4 {
    top: 95%;
    scale: 4;
  }

  /* 5 → 画面中央に出現 */
  .secret-portal-default.secret-portal-5 {
    top: 55%;
    right: 40%;
    scale: 0.8;
  }
}
