/* ==================================================
   【前半】PC版・基本の設定（デフォルト）
   ================================================== */

/* 共通・基本レイアウト */
.container {
    background-color: rgba(255, 255, 255, 0.8);
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

/* 左上の一文 */
.intro-text {
    text-align: left;
    font-size: 1.0rem;
    color: #555;
    margin-bottom: 20px;
    border-left: 4px solid #333;
    padding-left: 10px;
}

/* 列の間に入れる文章 */
.row-divider {
    text-align: left;
    font-size: 1.4rem;
    margin: 40px 0 15px;
    font-weight: bold;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

/* ボックスを並べる列の箱 */
.box-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

/* 白いボックス単体のデザイン */
.info-box {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    min-width: 200px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, border-color 0.2s;
}

/* リンクになった info-box の見た目をリセット */
a.info-box {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

/* ホバー時の反応 */
a.info-box:hover,
.info-box:hover {
    background-color: #f8fbff;
    border-color: #004488;
    transform: translateY(-5px);
}

a.info-box * {
    cursor: pointer;
}

/* 1列目のボックス専用の設定：幅を半分にする */
.info-box.special-box {
    flex: 0 0 40%;
    margin-right: auto;
}

/* ボックス内の要素 */
.info-box i {
    font-size: 2rem;
    color: #34495e;
    margin-bottom: 10px;
}

.info-box h3 {
    margin: 10px 0;
    font-size: 1.2rem;
}

.info-box p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* --- YouTubeセクションの基本設定 --- */
.youtube-section-outer {
    width: 100%;
    display: flex;
    justify-content: center;
    /* 横方向の中央揃え */
    align-items: center;
    padding: 20px 0 40px 0;
    background-color: transparent;
    clear: both;
    box-sizing: border-box;
}

.youtube-center-box {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    /* カード自体を中央に配置 */
}

.youtube-card {
    background-color: rgba(255, 255, 255, 0.95);
    width: 100%;
    /* 横幅を親要素一杯にしつつ max-width で制限 */
    max-width: 900px;
    /* お好みの最大幅に調整可能 */
    margin: 0 auto;
    /* 左右マージン自動で中央寄せ */
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    box-sizing: border-box;
}

.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 画像表示時のスタイル */
.video-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.2s;
}

.video-wrapper a:hover img {
    opacity: 0.85;
    /* ホバー時にうっすら透過 */
}

/* 動画埋め込み(iframe)切り替え時のスタイル */
.video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* 16:9の比率を維持 */
    border: none;
    display: block;
}

.youtube-info-text h3 {
    color: #ff0000;
    font-size: 24px;
    margin: 10px 0;
    font-weight: bold;
}

.youtube-info-text p {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.subscribe-button-wrap {
    display: inline-block;
    margin: 10px auto;
}

/* --- 質問セクションの基本設定 --- */
.btn-faq {
    background-color: #004488;
    color: white;
}

.btn-faq:hover {
    background-color: #003366;
    transform: translateY(-2px);
}

.btn-contact {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.btn-contact:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}


/* --------------------------------------------------
   PC専用の個別調整スタイル（画面幅601px以上）
   -------------------------------------------------- */
@media (min-width: 601px) {
    .question-card {
        padding: 30px;
        border-radius: 8px;
    }

    .question-icon {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .question-card p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 25px;
    }

    .question-buttons {
        display: flex;
        flex-direction: row;
        gap: 20px;
        justify-content: center;
        width: auto;
    }

    .question-buttons a {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 12px 25px;
        font-size: 16px;
        width: auto;
        min-width: 160px;
        gap: 8px;
        border-radius: 5px;
    }

    .question-buttons a i {
        font-size: 1rem;
    }
}

/* --- 横長スポンサーバナーの設定 --- */
.sponsor-banner {
    width: 100%;
    margin: 30px auto;
    text-align: center;
}

.sponsor-banner img {
    width: 100%;
    max-width: 1200px;
    /* バナーの最大幅（containerに合わせる） */
    height: auto;
    /* アスペクト比を維持 */
    display: block;
    margin: 0 auto;
    border-radius: 6px;
    /* 緩やかな角丸（不要なら削除してください） */
}

/* ==================================================
   【後半】スマホ版の設定（画面幅600px以下）
   ================================================== */
@media (max-width: 600px) {

    /* --- スマホ時の文字サイズ拡大設定 --- */
    .card h2,
    .card h3,
    .portal-card h2,
    .info-box h3 {
        font-size: 0.9rem;
        line-height: 1.4;
        margin: 0;
        width: 100%;
        white-space: normal;
        word-break: break-all;
    }

    .card p,
    .portal-card p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .btn-style,
    .card .btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    /* --- レイアウト調整 --- */
    .box-row {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 2%;
        width: 100%;
        margin-bottom: 15px;
        padding: 0;
    }

    .info-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        min-width: 0;
        max-width: 100%;
        min-height: 75px;
        padding: 8px 4px;
        box-sizing: border-box;
    }

    .info-box i {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }

    .info-box p {
        display: none;
    }

    .info-box.special-box {
        display: flex !important;
        flex-direction: row !important;
        /* 横並びにして横長にする */
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
        flex: 0 0 70% !important;
        /* 幅100%で配置 */
        max-width: 100% !important;
        min-height: auto !important;
        /* 高さを自動調整 */
        padding: 16px !important;
        /* 余白の確保 */
        gap: 15px;
        box-sizing: border-box;
    }

    .info-box.special-box i {
        font-size: 1.8rem !important;
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    .special-box-content {
        flex: 1;
    }

    .special-box-content h3 {
        font-size: 0.95rem !important;
        margin: 0 0 4px 0 !important;
    }

    .special-box-content p {
        display: block !important;
        /* display: none を打ち消して表示 */
        font-size: 0.75rem !important;
        color: #666;
        margin: 0;
        line-height: 1.4;
    }


    .info-box.photo-box {
        width: 100%;
        /* 幅いっぱいに広げる */
        flex: 0 0 50% !important;
        max-width: 100%;
        min-height: auto;
        /* 75px などの固定制限を解除 */
        padding: 16px 14px;
        /* しっかり余白を取って見やすくする */
    }
}

.info-box.photo-box i {
    font-size: 1.8rem;

    /* アイコンを少し調整 */
}

.photo-box-content h3 {
    font-size: 0.95rem;
}

.photo-box-content p {
    font-size: 0.75rem;
}

/* セクション別 幅調整 */
.row-divider:nth-of-type(1)+.box-row .info-box {
    flex: 0 0 49%;
}

.row-divider:nth-of-type(1)+.box-row .info-box p {
    display: block;
    font-size: 0.6rem;
    margin: 3px 0 0 0;
}

.row-divider:nth-of-type(2)+.box-row .info-box,
.row-divider:nth-of-type(3)+.box-row .info-box,
.row-divider:nth-of-type(4)+.box-row .info-box,
.box-row .info-box {
    flex: 0 0 32%;
}

/* 質問エリア・ボタン調整 */
.question-section {
    margin-bottom: 15px;
}

.question-card {
    padding: 15px 12px;
    border-radius: 8px;
}

.question-icon {
    font-size: 26px;
    margin-bottom: 8px;
}

.question-card p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

.question-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.question-buttons a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    font-size: 0.8rem;
    flex: 0 1 auto;
    width: 40%;
    max-width: 100px;
    min-height: 60px;
    gap: 6px;
    border-radius: 8px;
    box-sizing: border-box;
}

.question-buttons a i {
    font-size: 1.4rem;
    margin: 0;
}

.sponsor-banner {
    margin: 20px auto;
}


/* YouTubeチャンネルテキストリンク */
.youtube-info-text .youtube-channel-link {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.youtube-info-text .youtube-channel-link:hover {
    color: #ff0000;
    /* ホバー時にYouTubeカラー（赤）に変更 */
    text-decoration: underline;
}

.youtube-info-text .youtube-channel-link i {
    font-size: 0.85em;
    margin-left: 4px;
}


/* ==================================================
   記念品紹介セクション（全体の余白調整）
   ================================================== */
.goods-section {
    width: 100%;
    max-width: 1200px;
    /* 他のコンテンツの最大幅と統一 */
    margin: 0 auto 40px auto;
    padding: 0 15px;
    /* ★ 左右の余白を設定 */
    box-sizing: border-box;
}

/* 小見出し（参加記念品 / 販売記念品） */
.goods-group-title {
    font-size: 1.15rem;
    color: #004488;
    margin: 30px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #eef5ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.goods-group-title:first-of-type {
    margin-top: 0;
}

/* 記念品カードのグリッド配置（PCは3列） */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
    box-sizing: border-box;
}

/* 記念品カード単体のデザイン */
.goods-card {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.goods-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* 画像表示枠 */
.goods-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f9f9f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goods-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

/* 白TシャツやステッカーAなど画像全体を納める指定 */
.goods-image-wrapper.contain-img img {
    object-fit: contain;
}

.goods-card:hover .goods-image-wrapper img {
    transform: scale(1.05);
}

/* 記念品テキスト情報 */
.goods-info {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.goods-category {
    display: inline-block;
    font-size: 0.75rem;
    color: #004488;
    background-color: #eef5ff;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    font-weight: bold;
    align-self: center;
}

/* 参加賞バッジの特別カラー */
.goods-category.category-participate {
    background-color: #ffeef0;
    color: #d9383a;
}

.goods-info h3 {
    font-size: 1rem;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

/* 記念品紹介見出し専用の上の余白設定 */
.row-divider.goods-divider {
    margin-top: 70px;
    /* 既存の 40px から 70px に拡大（お好みの広さに調整可能です） */
}

/* --- スマホ表示時の調整 (600px以下) --- */
@media (max-width: 600px) {
    .goods-section {
        padding: 0 10px;
        /* スマホ時の左右余白 */
    }

    .goods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .goods-group-title {
        font-size: 1rem;
        margin: 20px 0 10px 0;
    }

    .goods-info {
        padding: 10px 8px;
    }

    .goods-category {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .goods-info h3 {
        font-size: 0.85rem;
    }
}