
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rubik&display=swap');

* {
    margin: 0;
    padding: 0;
}

a.title {
    color: #000;
    font-size: 150%;
    padding-top: 5px;
    height: 50%;
}

a.title:visited:hover {
    color: #000;
    text-decoration: none;
}

.rubik {
  font-family: "Rubik", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

header {
    position: fixed;
    margin: 10px auto;
    width: 95%;
    display: flex;
    background-color: rgba(255,255,255,0.5);
    top: 10px;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    height: auto;
    min-height: 80px;
    border-radius: 50px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    margin-left: 2.5%;
    z-index: 2;
}

footer{
    font-family: sans-serif;
    margin-top: 15px;
    width: 100%;
    text-align: center;
    display: grid;
    place-items: center;
    justify-content: center;
    align-items: center;
    height: 80px;
    background-color: #f5f5f5;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    align-items: center;
    /* ▼追記/修正: navをヘッダーの幅いっぱいに広げ、要素を両端に配置 */
    width: 100%; /* navがheaderの幅95%の中で最大になるように */
    justify-content: space-between; 
    padding: 0 20px; 
    box-sizing: border-box;
}

.banner {
    overflow: hidden;
    align-items: center;
    height: 100vh;
    width: 100vw;
    display: flex;
    padding: 0px;
    margin: 0px;
    image-rendering: pixelated;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
}

.banner_img {
    height: 100%;
	width: 100%;
    vertical-align: bottom;
	object-fit: cover;
}

/** width: calc(100vw + ( 100vh / 2.2 )); **/

/* 既存の html セレクタに追加・上書き */
html {
    scroll-behavior: smooth;
    background-image: repeating-linear-gradient(-45deg, white, white 20px, #f5f5f5 20px, #f5f5f5 40px);
}


main {
    font-family: "M PLUS 1", sans-serif;
}

.container {
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
    margin: auto;
    width: 80%;
    background-color: #fff;
    margin-top: 10px;
    margin-bottom: 10px;
}

.navi {
    display: flex;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    justify-content: center;
    align-items: left;
    background-color: #ffffff;
    height: 75px;
    width: 90%;
    margin: auto;
}


a.nav-item {
    color: #000;
    display: inline-flex;
    align-items: center; /* aタグ内のテキスト縦中央 */
    font-size: 14px;
    /* font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */
    font-family: "Rubik", sans-serif;
    height: auto; /* 高さ指定は外す */
    padding: 0 20px; /*上下パディングは0に*/
    margin: 0;
    text-decoration: none;
    letter-spacing: 5px;
    background-image: linear-gradient(#333, #333);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 0 20px;
    transition: all 0.3s;
}

a.nav-item:hover {
    color: #fff;
    background-position: center center;
    background-size: 100% 20px;
}

.dotimg {
    image-rendering: pixelated;
}

h1,h2,h3,p {
    color: #000;
    margin: 0px;
}
h1 {
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 35px;
    position: relative;
    border-bottom: dashed 4px #6594e0;
    width: 90%;
    left: 5%;
}

h2 {
    position: relative;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 25px;
    padding: 0.25em 0.5em;/*上下 左右の余白*/
    background: #eaf3ff;
    border-left: solid 5px #7db4e6;/*左線*/
    width: 80%;
    left: 8%;
}
h3 {
    position: relative;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 20px;
    width: 80%;
    left: 10%;
}
p {
    position: relative;
    font-size: 18px;
    line-height: 2;
    width: 80%;
    left: 10%;
}
a:not(.nav-item),a:visited:not(.nav-item) {
    color: #6594e0;
    text-decoration: none;
}
a:hover:not(.nav-item) {
    color: #7db4e6;
    text-decoration: underline;
}
em {
    font-weight: bold;
}

/**
quiz {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 18px;
    color: #000;
    position: relative;
}
**/

quiz {
    text-decoration: none;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 18px;
    color: #f5f5f5;
    background-color: #f5f5f5;
    position: relative;
    transition: color 1s, background-color 1s;
}

quiz::before {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 18px;
    font-weight: bold;
    background-color: #FFCEE0;
    color: #FFCEE0; /* 背景と文字同じで隠す */
    padding: 3px;
    content: "答え：" attr(ans);
    opacity: 1;
    transition: color 1s, background-color 1s;
    pointer-events: none;
}

quiz:focus::before,
quiz:active::before {
    color: #ff0000;
    background-color: transparent;
    content: "答え：" attr(ans);
}

quiz:focus,
quiz:active {
    color: #000;
    background-color: transparent;
}

h2 small {   
    font-size: 20px;
}

p small {   
    font-size: 10px;
}

sitelink {
    display: block;
    position: relative;
    margin: 10px auto;
    width: 84%; /* 画像の比率に合わせ調整 */
    padding: 45px 15px 15px 15px; /* 上部にヘッダー分の余白を確保 */
    border: 2px solid #3498db;
    border-radius: 5px;
    background-color: #fff;
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    font-size: 18px;
    word-break: break-all;
    box-sizing: border-box;
}

/* 青いヘッダー部分 */
sitelink::before {
    content: "外部リンク";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: #3498db;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    padding-left: 35px; /* アイコンのスペース */
    box-sizing: border-box;
    /* アイコン画像の設定 */
    background-image: url(./data/link.svg);
    background-size: 18px;
    background-repeat: no-repeat;
    background-position: 10px center;
}

/* 下部のURLテキスト部分 */
sitelink::after {
    content: attr(href);
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

hr{
    margin: 5px;
    border: dashed 2px #6594e0;
    width: 90%;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: 5%;
}

#hr{
    height: 70px;
}

.table_box{
  position: relative;
  text-align: center;
  left: 10%;
  overflow-y: auto;
  height: 370px;
  width: 80%;
  -webkit-overflow-scrolling: touch;
  border-radius: 15px;
}
.long {
    width: 500px;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}
th, td {
  vertical-align: middle;
  padding: 20px;
  color: #000;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}
th {
  background: #fff;
}
td {
  background: #fafafa;
}
.sticky {
  position: sticky;
  top: 0;
  left: 0;
  border-top: none;
  color: #5f5f5f;
}
.sticky::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #efefef;
  z-index: -1;
}

@keyframes grow-progress {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

#progress {
	position: fixed;
	right: 0; top: 0;
	width: 100%; height: 1em;
    background-color: rgba(89, 138, 217, 0.5);
    backdrop-filter: blur(15px);
	transform-origin: 0 50%;
	animation: grow-progress auto linear;
	animation-timeline: scroll();
    z-index: 1;
}

#header-spase {
    height: 120px;
}

.pagetop {
    height: 60px;
    width: 60px;
    position: fixed;
    right: 20px;
    bottom: 20px;
    background-color: rgba(255,255,255,0.1);
    border: solid 2px #f5f5f5;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
}

.pagetop__arrow {
    height: 10px;
    width: 10px;
    border-top: 3px solid #0a0a0a;
    border-right: 3px solid #0a0a0a;
    transform: translateY(20%) rotate(-45deg);
}

.flex {
    display: flex;
    flex-wrap: wrap;
}

.graph {
    margin: auto;
    max-width: 100%;
    display: block;
    min-width: 25%;
    justify-content: center;
    height: 250px;
}

mark {
    background-color: #ccf4ff;
    /**background-color: #99D9EA;**/
    font-weight: bold;
    padding: 3px;
    margin: 0 5px;
    border-radius: 5px;
}

.box-group{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-radius: 5px;
    justify-content: space-between;
    padding: 10px;
    margin: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    width: calc(100% - 40px);
    background-color: #fff;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
}
    
.contxt {
    position: relative;
    flex: 1;
    margin-right: 10px;
}

.conimg {
    flex: 0.5;
    max-height: 300px;
    object-fit: cover;
}

/*.box-content h2 {
    margin: 10px 0 10px -10px;
}*/

/** .box-content {
    padding: 5px;
    padding-left: 0px;
    padding-right: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 1px;
    margin-right: 1px;
    border-radius: 5px;
    min-width: 280px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
    --gap-size: 20px;
    max-width: calc((100% - (var(--gap-size) * var(--n))) / var(--n));
    background-color: #fff;
} **/

.model-link {
    align-items: center;
    display: flex;
}

.model-icon {
    width: 50px;
}

a .sitelink {
    content: attr(herf);
}

.linkbutton {
    image-rendering: auto;
    border: solid 2px #f5f5f5;
    position: relative;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 25px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
    background: #fff;
    width: 80%;
    left: 8%;
    text-align: center;
    align-items: center;
    justify-content: center;
    display: flex;
    padding: 5px 0;
}


.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 10;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.bar {
    display: flex;
    width: 100%;
    height: 3px;
    background-color: #333;
    margin: 0; 
    transition: 0.4s;
}

/* モバイル用メニューのスタイル */
.mobile-menu {
    display: none; /* デフォルトでは非表示 */
    position: fixed;
    top: 100px; /* headerの高さに応じて調整 */
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.1);
    z-index: 1;
    flex-direction: column;
    padding: 10px 0;
    text-align: center;
}

.mobile-nav-item {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: #333;
    font-size: 18px;
    border-bottom: 1px solid #eee;
}

.mobile-nav-item:hover {
    background-color: #f5f5f5;
}


@media (max-width: 900px) {
    nav {
        align-items: center; /* タイトルとハンバーガーを縦方向に中央揃え */
        width: 100%; /* navはheaderの幅全体を使用 */
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    /* ハンバーガーメニューを表示 */
    .hamburger {
        display: flex !important;
    }
    
    /* ヘッダーの幅と高さを調整 */
    header {
        height: auto;
    }
    
    a.title {
        font-size: 120%;
    }
    
    /* モバイルメニューの位置を調整 */
    .mobile-menu {
        font-family: "Rubik", sans-serif;
        position: absolute;
        top: 100px; /* navの高さに合わせる */
        width: calc(100% - 20px); 
        left: 10px; 
        border-radius: 10px; 
        padding-top: 5px;
        padding-bottom: -5px;
    }

    /* コンテンツがヘッダーの下に隠れないように調整 */
    #hr {
        height: 90px; /* 調整後のheaderの高さに合わせて変更 */
    }

    .hamburger.is-active .bar:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    .hamburger.is-active .bar:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }
    
    .box-group {
        flex-direction: column;
    }

    .contxt {
        margin-bottom: 10px;
        width: calc(100% - 40px);
    }

    .conimg {
        width: calc(100% - 40px);
    }
}

@media (max-width: 600px) {
    .banner {
        height: 50vh;
    }
}

@media (min-width: 900px) {
    .bar {
        display: none;
        margin: 0;
    }
}

/* JavaScriptで付与されるクラス */
.mobile-menu.is-active {
    display: flex;
}

.hamburger.is-active .bar:nth-child(2) {
    opacity: 0;
}

custommark {
    background-color: var(--bg, #ccc);
    padding: 3px;
    margin: 0 5px;
    border-radius: 5px;
    font-weight: bold;
}

ul {
    position: relative;
    width: 80%;
    left: calc(10% + 20px);
    font-size: 18px;
    line-height: 1.5;
}
