@charset "utf-8";

body {
    max-width: 1000px;
    margin: 0 auto;
}

h2{
  font-size: 2.5em;
}

main {
    display: flex;
    position:relative;
    margin-top: 50px;
    margin-bottom: 50px;
    margin-left: auto;
    margin-right: auto;
    max-height: 750px;
}

.main-block {
    position: relative;
}

.main-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.main-titleblock{
  position: relative;
}

img.jellyfish_img {
  height: 50px;
  width: 50px;;
}

.main-section{
    overflow: auto;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 8px; /* inputとボタンの間隔 */
  max-width: 400px;
  margin: 20px auto;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-button {
  padding: 8px 16px;
  font-size: 16px;
  background-color: #0078D4;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.search-button:hover {
  background-color: #005a9e;
}

.pre-block {
    position: absolute;
    z-index: 999;
    width: 100%;
}

.pre-item {
    text-align: center;
    border: 1px solid black;
    border-radius: 8px;
}

.pre-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.pre-item:has(.pre-active){
  border-radius: 8px 8px 0 0;
}

.pre-button {
    color:black;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #00bcd4, #2196f3);
    opacity: 0.3;
    border-radius: 8px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pre-button:hover {
    cursor: pointer;
    opacity: 1;
}

.pre-button.pre-active{
    opacity: 1;
    border-radius: 8px 8px 0 0;
}

.pre-button.pre-active + .pre-content{
    max-height: 1000px;
}

.pre-content{
    background-color: lightcyan;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-radius: 0;
}

.pre-content div{
    padding: 10px;
    border-top: 0.1px black inset;
}

.pre-content div:hover{
    cursor: pointer;
    background-color: deepskyblue;
}

.prefect-text {
    margin-right: 16px;
}

span.text-box {
    color: blue;
    border-bottom: 1px solid blue;
}

.ad-block {
    background-color: black;
    width: 150px;
    height: 100%;
}

.img-block {
    width:100%;
}

.map-block {
    width: 100%;
    position: relative;
    opacity: 0.2;
}

.map-japan {
    width: 100%;
}

.map-pin {
    width: 20px;
    position: absolute;
}

.map-pin:hover {
    cursor: pointer;
    background-color: grey;
}

.tomodal_contents {
  display: none;
}

.modal-overlay , .modal-overlay-privacy {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	max-width:1000px;
	height: 100%;
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 1002;
	background-color: rgba(0,0,0,0.5);
}

.openModalBtn-privacy {
  width: 140px;
  font-size: 14px;
  padding: 5px;
  color: #0077cc;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s ease;
}

.openModalBtn-privacy:hover {
  color: #005fa3;
}

.modal , .modal-privacy {
	background: white;
	padding: 10px 10px 20px 10px;
	border-radius: 8px;
	position: relative;
	width: 50%;
	max-width: 90%;
	max-height:70%;
	overflow: auto;
}

.modal p {
	margin-left:16px;
}

.modal-header , .modal-header-privacy {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid gray;
    margin-bottom: 10px;
}

.modal-title , .modal-title-privacy {
	font-size: 24px;
    font-weight: bold;
}

.close-btn ,.close-btn-privacy {
	cursor: pointer;
	font-weight: bold;
	font-size: 32px;
	border:none;
	background:none;
}

.about-tab {
    position: absolute;
    top: 0;
    right: 180px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform: translateX(180px);
    transition: transform 0.3s ease;
    z-index: 1001;
    border-radius: 5px;
}

.tab-header {
    background-color: #87CEFA;
    color: white;
    padding: 5px;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    font-size: 12px;
    border-radius: 5px;
}

.tab-header:hover {
    background-color: #17CEFA;
}

#tab-content {
  padding: 15px;
  display: none;
}

/* .about-tab.open {
  transform: translateY(0);
} */

.about-tab.open #tab-content {
  display: block;
}

.about-tab.open .tab-header {
  background-color: #17CEFA;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  display: none;
  z-index: 1000;
}

.mapLink_ios, .mapLink_other {
  display: none;
}

.info {
  margin-top: 30px;
  font-size: 14px;
}

@media screen and (max-width: 500px) {
  /* スマートフォン向けのスタイル */
  h2{
    font-size: 1.5em;
  }

  main {
    display: block;
    margin-top: 0;
    margin-bottom: 0;
    max-height: initial;
  }

  .main-section {
      overflow: initial;
  }

  .search-container {
  margin: 20px 5px;
  }

  .ad-block {
    width: 100%;
    height: 150px;
  }

  #overlay {
  position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 1000px;
    height: 100%;
    display: none;
    align-items: center;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.5);
}

  .pre-button:hover {
    opacity: 0.3;
  }

  .pre-button.pre-active{
    opacity: 1;
  }

  .prefect-text{
    margin-right: 0;
  }

  .pre-content div span{
    display: block;
  }

  span.text-box {
    border-bottom: none;
  }

  span.text-box span{
    text-decoration: underline;
  }
  
  .modal , .modal-privacy {
	width: 90%;
  }

  .about-tab.open {
    width:90%;
  }

  .img-block {
    display: none;
    position: absolute;   /* ← 背景化 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 0;
  }

  .map-block {
    opacity: 0.2;
  }

  .pre-block {
    position: relative;   /* 通常フロー */
    z-index: 1;           /* 地図より上 */
  }

  .pre-block {
    position: relative;
    overflow: hidden;
  }

  .pre-block::before {
    content: "";
    position: absolute;
    inset: 0;

    background-image: url("../img/map-japan.png");
    background-repeat: no-repeat;
    background-size: contain;

    opacity: 0.15;   /* ← ここで薄さを調整 */
    z-index: 0;
    pointer-events: none;
  }

  .ad-section-one {
    display: none;
  }
}

@media screen and (max-width: 500px) {

  /* 背景グレー */
  .modal-overlay,
  .modal-overlay-privacy {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background-color: rgba(0,0,0,0.5); /* ← 明示的に指定 */
    z-index: 3000; /* ← 背景 */
    display: none;
  }

  /* モーダル本体 */
  .modal,
  .modal-privacy {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-height: calc(var(--vh) * 80);
    overflow: auto;
    z-index: 3001; /* ← 必ず overlay より上 */
  }

}

@media screen and (max-width: 500px) {
  .modal,.modal-privacy {
    animation: modalFadeIn 0.25s ease;
  }

  @keyframes modalFadeIn {
    from {
      opacity: 0;
      transform: translate(-50%, -45%);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }
}
