/* ===== リセット ===== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
} 
/* ページ全体の余白をなくす */
* {
    box-sizing: border-box;
}

/* スプラッシュ画面 */
#splash {
    opacity: 0;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #589eff; 
    display: flex;
    justify-content: center;
    align-items: center;
   z-index: 9999;  /*最前面に  */
}
#splash.show {
    opacity: 1;
}

.splash-text {
    font-size: 6vw;
    color: #333;
    opacity: 0;
    animation: fadeInOut 3s ease forwards;
}

 /* フェードイン→表示→フェードアウト  */
@keyframes fadeInOut {
    0%   { opacity: 0; transform: translateY(20px); }
    20%  { opacity: 1; transform: translateY(0); }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* 本サイトは最初非表示にしておく  */
#main-content {
    opacity: 1;
    transition: opacity 1s ease;
}
#main-content.show {
    opacity: 1;
    display: block;
}

#main-content{
    flex: 1;
    display: flex;
    position: relative;
    flex-direction: column;
    min-height: 100vh; /* ビューポートの高さに合わせる */
}


/* ===== 本文 ===== */

#screen {
  flex: 1; /* ここが本文エリア */
    display: flex;
    flex-direction: column;
}

/* ===== ヘッダー一部 ===== */
.p-fv{
    width: 100%;
    height: 500px;
    background-image: url(../img/yusei2_sumrobo.webp);
    background-color:rgba(255, 255, 255, 0);
    background-blend-mode:lighten;
    position: relative;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    align-items: center;
    justify-content: center;
}

.p-fv::before {
    content: "";
    width: 100%;
    height: 85%;
    background-color: rgba(0, 0, 0, .5);
    position: absolute;
    top: 75px;
    left: 0;
}


.group-intro {
    max-width: 1500px;
    width: 90%;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    line-height: 1.6;
}

.group-plot{
    max-width: 1150px;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: 25px;
    color: #00299a;
    margin-bottom: 50px;
}

.wtandimg{
    height: 70px;
    width: auto;
    display: flex;
    justify-content: center;
    padding-top: 10px;
    margin-left: 10px;
    margin-bottom: 15px;
}

.wtitle{
    height: 57px;
    width: auto;
    display: flex;
    padding-top: 10px;
    margin-left: 10px;
    margin-bottom: 15px;
}

.ctitle {
    font-size: 31px;
    margin-top: 3px;
}

.group-text{
    width: 1200px;
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
}

.group-main {
    max-width: 1500px;
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}


.group-text p {
    margin-bottom: 15px;
    text-align: justify; /* 両端揃え */
}


.group-text-title {
    position: relative;
    display: block;   
    cursor: pointer;
    font-weight: bold;
    background-color: #9eedffa0;
    padding: 10px; 
}


.group-text-title:hover,
.group-text-title:focus {
    background-color: #9eedff;
}


.group-text-title span {
    position: relative;
    display: inline-block; /* ←文字幅だけ下線 */
}


.group-text-title span::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: #333;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.group-text-title:hover span::after {
    transform: scaleX(1) ease-in-out;
}


.mechanism, .circuit {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    line-height: 1.6;
    border: 2px solid #004080; /* 濃いブルーの枠線 */
    border-radius: 8px; /* 角を丸く */
    background-color: #58ffa344; /* 明るい背景色 */
}

.mechanism {
    background-image: url("../img/bgi2.png");
    background-size: cover;   /* 画像を縦横比を保ったまま拡大縮小して全体にフィット */
    background-position: center; /* 中央に配置 */
    background-repeat: no-repeat; /* 繰り返さない */
}

.circuit {
    background-image: url("../img/bgi3.png");
    background-size: cover;   /* 画像を縦横比を保ったまま拡大縮小して全体にフィット */
    background-position: center; /* 中央に配置 */
    background-repeat: no-repeat; /* 繰り返さない */
}

.mechanism-img, .circuit-img {
    height: 200px;
    object-fit: cover; /* 画像のアスペクト比を維持 */
    text-align: center; /* 中央に配置 */
    border-radius: 8px; /* 角を丸く */
}

.group-mechanism, .group-circuit {
    justify-content: space-around; /* 均等配置 */
    margin-left: auto;
    margin-right: auto;
    display: flex;
    margin-top: 30px;
}


.mechanism h2 .ctitle, .circuit h2 .ctitle{
    font-size: 1.5rem;
    color: #004080; /* 濃いブルーの文字色 */
    margin-bottom: 10px;
    font-size: 31px;
    margin-top: 3px;
}

.gtitle{
    font-size: larger;
    font-family: "Helvetica Neue", Arial, sans-serif;
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
}

.mtitle{
    font-size: 1.5rem;
    color: #004080; /* 濃いブルーの文字色 */
    margin-bottom: 10px;
    font-size: 27px;
    margin-top: 3px;
}

.li1{
    width: 45%;
    margin: 0 auto;
    text-align: center;
    font-size: large;
    font-weight: bold;
}

.CAD{
    width: 90%;
    height: auto;
    border-radius: 8px; /* 角を丸く */
}

.manufac{
    width: 90%;
    height: auto;
    border-radius: 8px; /* 角を丸く */
}

/* ===== 活動内容 ===== */

.group-act {
    max-width: 1500px;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
}

.wtitle2{
    justify-content: center;
    display: flex;
    height: 70px;
    margin: 30px 0;
    width: auto;
    position: relative;
    display: flex;
    line-height: 1;
}

.wtitle2 p {
    font-size: clamp(50px, 6vw, 70px);
    font-weight: bold;
    vertical-align: middle;
    margin-top: 0;
}

.robocon{
    width: 100%;
    margin-top:50px;
    padding-top: 15px;
    padding-bottom: 100px;
    background-color: rgb(211, 255, 240);
    box-shadow: 1px 3px 6px rgba(0, 0, 0, 0.22);

}

.cfes{
    width: 100%;
    padding-top: 15px;
    padding-bottom: 100px;
    background-color: #ffeab5;
    box-shadow: 1px 3px 6px rgba(0, 0, 0, 0.22);

}

.act-plot-1, .act-plot-2{
    width: fit-content;
    margin-left: 25px;
    margin-right: auto;
    font-size: 25px;
    color: #168ec5;
    margin-bottom: 50px;
}

.about{
    display: flex;
    justify-content: space-around; /* カード間に均等なスペース */
    flex-wrap: wrap; /* 画面幅が狭い場合に折り返す */
    gap: 20px; /* カード間の隙間 */
}


.li2{
    width: 30%;
    padding: 1%;
    margin: 0 auto;
    border-radius: 8px; /* 角を丸く */
    text-align: center;
    line-height: 2.4;
}

.gact{
    width: 100%;
    height: auto;
}

/* ===== スマホ対応 ===== */
@media (max-width: 1100px){
    .act-plot-1{
        font-size: 5cqw;
    }

    .act-plot-2{
        font-size: 3.5cqw;
    }

    .li2{
        width: 40%;
        margin: 30px 0;
        margin: 0 auto;
    }

    .li2 p{
        font-size: large;
    }
}

/* ===== 小画面対応 =====*/
@media (max-width: 1000px) {
    .footer_content{
        flex-direction: column;
    }

    .footer_plot{
        grid-auto-flow: row;
        grid-template-columns: repeat(2, 1fr);  /* 2カラム */
        justify-items: center;
        gap: 30px 40px; 
    }
    
}

@media (max-width: 768px) {
    .group-mechanism{
        flex-direction: column;
    }
    .group-circuit{
        flex-direction: column;
        margin: 0 auto;
    }
    .li1{
        width: 85%;
        margin: 30px 0;
        margin-left: auto;
        margin-right: auto;
    }

    .li2 p{
        font-size: x-small;
        margin: 0 auto;
    }
    .footer_plot{
        grid-template-columns: 1fr;  /* 1列にする */
        gap: 20px;
    }
}

@media (max-width: 500px){
    .group-plot{
        font-size: clamp(18px, 5vw, 25px);
        width: 90%;
    }
}

@media (max-width: 400px){
    .wtitle2 p{
        font-size: clamp(40px, 8vw, 50px);
    }
}