/* --- 基本設定 --- */
:root {
    --main-color: #052666;
    --secondary-color: #cb2d21;
    --text-color: #444;
    --white-color: #ffffff;
    --light-gray-color: #f4f4f4;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* --- 変更後 --- */
body {
    font-family: "Montserrat", "Noto Sans JP", sans-serif;
    font-weight: 600;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    line-height: 1.8;
    /* bodyの背景はシンプルに */
    background-color: var(--main-color); 
}

/* bodyの背面に固定の背景レイヤーを追加 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* 画面全体の高さ */
    z-index: -1; /* コンテンツの背面に配置 */

    /* こちらに背景画像の指定を移動 */
    background-image: url('../images/background.webp');
    background-size: cover;
    background-position: center;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- ユーティリティクラス --- */
/* 余白 */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.section-padding { padding: 5rem 0; }

/* 文字 */
.fw-bold { font-weight: 800; color: #333; }
.fw-light { font-weight: 400; }
.fs-small { font-size: 0.9rem; }
.fs-medium { font-size: 1.1rem; }
.fs-large { font-size: 1.5rem; }
.text-center { text-align: center; }

/* ボタン */
.button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 1rem 3rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: transform 0.3s, background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}
.button:hover {
    transform: scale(1.05);
    background-color: #e04438;
}
.text-link a {
    color: var(--text-color);
    text-decoration: underline;
    margin: 0 1rem;
}
.text-link a:hover {
    text-decoration: none;
}


/* --- ヘッダー --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background-color: rgba(5, 38, 102, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color 0.3s;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-logo img {
    height: 40px;
}
.global-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}
.global-nav a {
    color: var(--white-color);
    text-decoration: none;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}
.global-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}
.global-nav a:hover::after {
    width: 100%;
}


/* --- 各セクション --- */
section {
    background-color: rgba(255, 255, 255, 0.85);
}
section:nth-of-type(even) {
    background-color: rgba(244, 244, 244, 0.9);
}

.section-title {
    font-size: 2.5rem;
    color: var(--main-color);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 900;
}

/* 2. メインビジュアル */
.main-visual {
    height: 850px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}
.main-visual-content {
    text-align: center;
}
.main-visual img {
    max-width: 95%; /* 画面幅に対する最大サイズ */
    width: 500px; /* ← 700pxからサイズを大きく変更 */
    height: auto;
    padding-top: 100px;
}

/* 3. 導入 */
.introduction {
    color: var(--main-color);
    text-align: center;
}
.introduction p {
    letter-spacing: 0.1em;
}

/* 4. 応募概要 */
.outline-box {
    background: var(--white-color);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.outline-box h3 {
    color: var(--main-color);
    font-size: 1.4rem;
}
.note-list {
    list-style-position: inside;
    font-size: 0.9rem;
    color: #666;
}

.judges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.judge-card {
    text-align: center;
}
.judge-card img {
    width: 150px;
    height: 150px;
    border-radius: 8px; /* ← この行を追加（角丸四角形） */
    object-fit: cover;
    /*box-shadow: 0 4px 10px rgba(0,0,0,0.1);*/
}

.awards-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.awards-table th, .awards-table td {
    border: 1px solid #ddd;
    padding: 1rem;
}
.awards-table th {
    background-color: var(--main-color);
    color: var(--white-color);
    text-align: center;
}

/* 5. 応募方法 */
.how-to {
    text-align: center;
}
.steps-container {
    display: flex;
    justify-content: center;
    align-items: stretch; /* ← centerからstretchに変更 */
    gap: 0.25rem;
}
.step-item {
    background: var(--white-color);
    /* border-radius: 50%; */ /* ← 削除 */
    border-radius: 10px; /* ← 追加 */
    /* width, height は削除 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* ← centerから変更 */
    align-items: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 3px solid var(--main-color);
    overflow: hidden; /* 画像の角を丸めるため */
    text-align: center;
    flex: 1; /* 均等幅にする */
}
.step-number {
    font-size: 1.3rem; /* 少し小さく調整 */
    font-weight: 700;
    color: var(--secondary-color);
}
.step-text {
    font-weight: 400;
    color: var(--main-color);
    margin-top: 0; /* ← 調整 */
    line-height: 1.4;
}
.step-arrow {
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23052666'%3E%3Cpath d='M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    align-self: center; /* ← この行を追加して矢印を中央揃えにする */
}
.step-image {
    width: 100%;
    object-fit: cover;
}

.step-content {
    padding: 1rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subsection-title {
    font-size: 1.8rem;
    color: var(--main-color);
    text-align: center;
    margin-bottom: 1.5rem;
}

.application-form-preview {
    max-width: 90%;
    width: 300px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
}


/* 6. 応募フォーム */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white-color);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--main-color);
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}
.form-group input[type="file"] {
    padding: 0.5rem;
}
.contact-form .button {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
}
/*----------応募フォームアコーディオン----------*/
 /*accordion start*/
 .accordion {
    margin: 1em auto;
    max-width: 120vw;
    }
    .toggle {
    display: none;
    }
    .option {
    position: relative;
    margin-bottom: 1em;
    }
    .title,
    .content {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: all 0.3s;
    color: #444;
    }
    .title {
    border: solid 1px #4D4D51;
      background-color: #D6D6D6;
    padding: 16px !important;
    display: block;
    color: #4D4D51;
    font-weight: bold;
    cursor: pointer;
    }
    .title::after,
    .title::before {
    content: "";
    position: absolute;
    right: 1.25em;
    top: 1.5em;
    width: 2px;
    height: 0.75em;
    background-color: #4D4D51;
    transition: all 0.3s;
    }
    .title::after {
    transform: rotate(90deg);
    }
    .content {
    max-height: 0;
    overflow: hidden;
    }
    .content p {
    margin: 0;
    padding: 0.5em 1em 1em;
    font-size: 0.9em;
    line-height: 1.5;
    }
    .toggle:checked + .title + .content {
    max-height: 700px;
    transition: all 1.5s;
    }
    .toggle:checked + .title::before {
    transform: rotate(90deg) !important;
}
/*accordion_end*/

/* 7. プロジェクト解説 */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
}
.project-image {
    width: 100%;
    border-radius: 10px;
}
.section-title-left {
    font-size: 2.2rem;
    color: var(--main-color);
    font-weight: 700;
    text-align: left;
}

/* 8. リンク */
.link-banner img {
    width: 100%;
    height: 100%; /* ← 追加 */
    object-fit: cover; /* ← 追加 */
    display: block;
    border-radius: 10px;
    transition: opacity 0.3s;
}
.link-banner:hover img {
    opacity: 0.8;
}
.link-banners-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* --- フッター --- */
.site-footer-bottom {
    background: var(--main-color);
    color: var(--white-color);
    padding: 2rem 0;
    text-align: center;
}
.footer-nav {
    margin-bottom: 1rem;
}
.footer-nav a {
    color: var(--white-color);
    text-decoration: none;
    margin: 0 1rem;
}
.footer-nav a:hover {
    text-decoration: underline;
}
.copyright {
    font-size: 0.8rem;
}

/* --- アニメーション --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    /* --- ユーティリティクラス --- */
    /* 余白 */
    .sp-mt-1 { margin-top: 1rem !important; }
    .sp-mt-2 { margin-top: 2rem !important; }
    .sp-mt-3 { margin-top: 3rem !important; }
    .sp-mb-1 { margin-bottom: 1rem !important; }
    .sp-mb-2 { margin-bottom: 2rem !important; }
    .sp-mb-3 { margin-bottom: 3rem !important; }

    /* 文字 */
    .sp-fs-small { font-size: 0.9rem !important; }
    .sp-fs-medium { font-size: 1.1rem !important; }
    .sp-fs-large { font-size: 1.5rem !important; }

    /*各セクション*/
    .section-padding { padding: 3rem 0; }
    .section-title { font-size: 1.8rem; margin-bottom: 2rem; }
    .fs-large { font-size: 1.2rem; }
    .fs-medium { font-size: 1rem; }

    .site-header .container { flex-direction: column; gap: 1rem;}
    .global-nav ul { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .global-nav a { font-size: 0.9rem; }
    
    .main-visual { min-height: 60vh; }
    .main-visual img {
        padding-top: 0;
    }
    
    main { padding-top: 100px; } /* 固定ヘッダー分の余白 */

    .judges-grid { grid-template-columns: 1fr; }

    .steps-container {
        flex-direction: column;
        gap: 2rem;
    }
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    .section-title-left {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .contact-form { padding: 2rem; }

    .steps-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        margin: -1rem 0; /* 矢印の上下マージン調整 */
    }

    .link-banners-container {
        grid-template-columns: 1fr; /* スマホでは縦並びにする */
        gap: 1.5rem;
    }
}