/* ===== リセット ===== */
html, body {
    font-family: sans-serif;
    width: 100%;
    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; /* ビューポートの高さに合わせる */
}


/* ===== ヘッダー一部 ===== */
.p-fv{
    width: 100%;
    height: 500px;
    background-image: url(../img/summer_robocon.JPG);
    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;
}


/* ===== メインコンテンツ ===== */

.main {
    background-color: white;
    font-family: "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* ダークグレーの文字色 */
}

/* ===== 協賛企業様一覧 ===== */

.sp-summary{
    width: 90%;
    margin: 20px auto;
    margin-bottom: 100px;
}

.sp-container{
    width: 70%;
    height: auto;
    margin: 25px auto;
    margin-bottom: 100px;
    padding: 1% 20px;
    text-align: center;
}

.sp-intro{
    margin: 50px 0;
    font-size: larger;
}

.spon-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.spon-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #E8E8E8;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 45%;
    aspect-ratio: 16/13;
    margin: 20px auto;
    padding: 2%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.spon-logo {
    width: 100%;
    max-height: auto;
    object-fit: contain;
    margin-bottom: 15px;
}

.spon-name {
    font-size: 1.7rem;
    font-weight: bold;
    margin: 10px auto;
    color: #000000; /* 濃い青文字 */
}

.spon-tag {
    display: inline-block;
    background-color: #dff9ff;
    color: #004080; /* 濃い青文字 */
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 1rem;
    margin: 10px 0;
    text-decoration: none; /* リンクの下線を消す */
    transition: background-color 0.3s, color 0.3s;
}

/* ロゴと名前のリンクスタイル */
.spon-card h3 a {
    text-decoration: none; /* リンクの下線を削除 */
    color: inherit; /* 親要素の色を継承 */
    transition: color 0.3s;
    position: relative; /* ::afterの基準 */
    display: inline-block; /* 下線が文字幅になるように */
}

.spon-card h3 a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: currentColor; /* 現在の文字色を下線色に */
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.spon-card h3 a:hover {
    color: #007bff; /* ホバー時に色を変更 */
}

.spon-card h3 a:hover::after {
    transform: scaleX(1);
}

.spon-logo-link {
    display: block; /* ブロック要素にしてロゴ全体をリンクにする */
    margin-bottom: 15px;
}

/* 詳細ボタンスタイル */
.spon-detail-btn {
    background-color: #ffffff;
    width: fit-content;
    height: 3rem;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: larger;
    font-weight: bold;
    justify-content: center;
    transition: background-color 0.3s;
    position: relative; /* ::afterの基準 */
    overflow: hidden; /* 下線がボタンからはみ出さないように */
}

.spon-detail-btn::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: #23c989; /* ボタンの文字色と合わせて白に */
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.spon-detail-btn:hover::after {
    transform: scaleX(1);
}

.spon-detail-btn:hover {
    color: #23c989;
}

/* ===== ホバー効果 ===== */
.spon-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
    transition: box-shadow 0.3s, transform 0.3s;
}


/* ===== 個人協賛者様一覧 ===== */

.sp-individual{
    width: 70%;
    height: auto;
    margin: 0 auto;
    text-align: center;
}

.indiv-list{
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.indiv{
    width: fit-content;
    padding: 1%;
}

.individual-name{
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 10px;
    color: #000000; /* 濃い青文字 */
}

.sp-plot{
    width: 100%;
    height: auto;
    margin: 50px auto;
    text-align: center;
}


/* ===== 小画面対応 ===== */
@media (max-width: 1200px) {
    .sp-container{
        width: 100%;
        margin: 20px auto;
        padding: 0 15px;
    }
    
}

/* ===== 小画面対応 =====*/
@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) {

    .sp-summary{
        width: 95%;
        margin: 10px auto;
        margin-bottom: 50px;
    }

    .sp-container{
        width: 95%;
        margin: 15px auto;
        padding: 0 10px;
    }

    .spon-list{
        flex-direction: column;
        height: auto;
        width: 100%;
        margin-bottom: 20px;
    }

    .spon-card {
        width: 99%;
        aspect-ratio: 17/7;
    }

    .spon-logo{
        width: 90%;
        max-height: auto;
    }
        header .upper {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer_plot{
        grid-template-columns: 1fr;  /* 1列にする */
        gap: 20px;
    }
}
