/* 基本スタイル */
:root {
    --primary-color: #4a6fb5;
    --secondary-color: #f39237;
    --accent-color: #de4c8a;
    --background-color: #f9f9f9;
    --text-color: #333;
    --light-gray: #e0e0e0;
    --box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 0;
    margin: 0;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
/* ヘッダー */
.container header {
    text-align: center;
    margin-bottom: 15px;
}
.header-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}
.container h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
}
/* 目次スタイル */
.toc-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
    border-left: 5px solid var(--secondary-color);
}
.toc-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.toc-title .emoji {
    margin-right: 10px;
}
/* 目次は独自にリセット */
.toc-container .toc-list,
.toc-container .sub-toc-list {
  margin: 0;
  padding: 0;
}
.toc-list {
    list-style-type: none !important;
}
.toc-list li {
    margin-bottom: 12px !important;
    padding-left: 20px;
    position: relative;
}
.toc-list li:before {
    content: "▶";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    /* font-size: 0.8rem; */
}
.toc-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.toc-list a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}
.sub-toc-list {
    list-style-type: none !important;
    margin-top: 8px;
    margin-left: 15px;
}
.sub-toc-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}
/* セクション共通 */
.container section {
    margin-bottom: 60px;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}
.container h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}
h2 .emoji {
    margin-left: 10px;
    font-size: 1.6rem;
}
.container h3 {
    font-size: 1.4rem !important;
    color: var(--accent-color);
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
}
h3 .emoji {
    margin-right: 10px;
    font-size: 1.4rem;
}
.container p {
    margin-bottom: 20px !important;
    font-size: 1.1rem !important;
}
.highlight-box {
    background-color: #f0f7ff;
    border-left: 5px solid var(--primary-color);
    padding: 15px;
    margin: 25px 0;
    border-radius: 5px;
}
.highlight-box strong {
    color: var(--primary-color);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 5px;
}
.highlight-box .emoji {
    font-size: 1.5rem;
    margin-right: 10px;
    vertical-align: middle;
}
/* 画像スタイル */
.content-image {
    width: 100%;
    border-radius: var(--border-radius);
    margin: 20px 0;
    box-shadow: var(--box-shadow);
}
/* 警告ボックス */
.warning-box {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin: 25px 0 100px 0;
    border-radius: 5px;
}
.warning-box strong {
    color: #ffc107;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 5px;
}
.warning-box .emoji {
    font-size: 1.5rem;
    margin-right: 10px;
    vertical-align: middle;
}

/* 商標タイプカード（元テーブルをカード形式に変更） */
/* カード全体 */
.trademark-type-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trademark-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}
  
  /* グリッドレイアウト */
.trademark-types-container {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}


/* ヘッダー（タイトル＋例示テキスト） */
.trademark-type-header {
    display: flex;
    flex-direction: column; /* 縦並び */
    align-items: flex-start; /* タイトルは左揃え */
    margin-bottom: 0;        /* 例示テキストの margin で画像との間隔制御 */
}
.trademark-type-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;      /* タイトルと例示テキストの間隔 */
}
  
/* 例示テキスト */
.trademark-type-example {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: center;
    align-self: center;      /* ヘッダー内で左右中央 */
    margin: 0 0 10px;        /* 画像との間隔 */
}
  
/* 画像 */
.trademark-type-image-container {
    text-align: center;
    margin-top: 0;           /* ヘッダーとの重複余白を削除 */
}
.trademark-type-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    object-fit: contain;
}

.image-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.multi-image {
    width: 100px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.trademark-type-caption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/* 全カード共通：ヘッダーを縦並びに */
.trademark-types-container .trademark-type-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* タイトルは左揃え */
    gap: 0;                   /* 要素間の余白は例示テキスト側でコントロール */
    margin-bottom: 0;         /* 画像との間は例示テキストの margin-bottom で */
}
  
/* 例示テキストをフロー上に戻し、中央寄せ＆画像直前に配置 */
.trademark-types-container .trademark-type-example {
    position: static;         /* 絶対位置指定をリセット */
    transform: none;          /* もし以前の transform があればリセット */
    align-self: center;       /* 親 flex コンテナ内で左右中央 */
    margin: 0 0 10px;         /* 画像との間隔を下余白で確保 */
    font-weight: 500;
    color: var(--text-color);
}

/* YouTube埋め込み用 */
.video-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.video-container iframe {
    width: 100%;
    height: 225px;
    border-radius: 8px;
}

/* カードギャラリー - 1行で表示 */
.card-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0 70px 0;
}

.card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.card-img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    margin-right: 35px;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
    padding-left: 10px;
}

.card-title {
    font-weight: bold;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: inline-block;
    line-height: 1.3;
}

.card-content p {
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
    line-height: 1.6;
    color: var(--text-color);
}

/* カードギャラリー */
.trademark-rows {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 3px 0;
}
.trademark-row {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}
.trademark-row:hover {
    transform: translateY(-5px);
}
.trademark-info {
    margin-bottom: 15px;
}
.trademark-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.trademark-images-container {
    overflow: hidden; /* はみ出し防止 */
    width: 100%;
}

.trademark-images {
    display: flex;         /* 横並びに */
    flex-wrap: nowrap;     /* 改行させない */
    justify-content: space-between; /* 均等に配置 */
    gap: 3px;             /* 各画像の間隔 */
    width: 100%;
}
.trademark-img {
    height: 140px !important;
    flex: 1;
    min-width: 0;
    object-fit: contain;
    border-radius: 8px;
}

@media (min-width: 769px) and (max-width: 1024px) {
    
    .trademark-img {
        height: 120px !important; /* 高さを少し小さく */
        max-width: calc(33.333% - 2px); /* 幅を制限 */
    }
}

@media (max-width: 834px) {

    .p-entry__inner--narrow {
        width: 90% !important;
    }

}

@media (max-width: 820px) {

    .p-entry__inner--narrow {
        width: 95% !important;
    }

}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    /* .l-inner {
        width: 100% !important;
    } */

    .container {
        padding: 5px;
    }
    
    .container h1 {
        font-size: 2rem;
    }
    
    .container h2 {
        font-size: 1.5rem;
    }
    
    .container h3 {
        font-size: 1.3rem;
    }
    
    .container section {
        padding: 30px 7px 7px 7px;
    }

    /* 商標タイプカードのモバイル対応 */
    .trademark-type-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .trademark-type-title {
        min-width: unset;
        width: 100%;
        text-align: center;
    }

    .trademark-type-example {
        min-width: unset;
        width: 100%;
    }
    
    .trademark-images {
        flex-direction: column;   /* 縦方向に積む */
        gap: 10px;                /* 画像間の余白 */    
    }
    
    .trademark-img {
        width: 100%;              /* 幅いっぱいに広げる */
        max-width: none;          /* PC用の max-width 制限を解除 */
        height: auto;    
        flex: none;
    }
    
    /* カードレスポンシブ対応 */
    .card {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding: 25px;
        flex: 0 0 100%;
    }

    .card-gallery {
        justify-content: center;
    }
    
    .card-img {
        margin-right: 0;
        margin-bottom: 20px;
        width: 200px;
        height: 200px;
    }
    
    .card-content {
        padding-left: 0;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
}

@media (max-width: 320px) {

    /* 横スクロール原因を追う */
    /* * { outline: 1px solid rgba(255,0,0,0.3) !important; } */

    .l-footer__logo img {
        width: 290px !important;
        height: 85px !important;
    }
}

/* 区切り線 */
.container hr {
    border: none;
    height: 2px;
    background-image: linear-gradient(to right, transparent, var(--secondary-color), transparent);
    margin: 40px 0;
}
/* リスト（main  内だけに適用） */
main ul,
main ol {
    margin: 20px 0;
}
main ul li,
main ol li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}
/* 次のステップボタン */
.next-steps {
    background-color: #f0f7ff;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 30px;
    text-align: center;
}
.container .button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}
.container .button:hover {
    background-color: var(--accent-color);
}
.container .button .emoji {
    margin-left: 8px;
}

/* アニメーション用クラス */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 記事メタ情報のコンテナ */
.article-meta {
    display: flex;
    align-items: center;
    justify-content: right;
    gap: 24px;
    margin-top: 16px 0;
    padding-top: 12px 0;
    font-size: 0.85rem;
    color: #6c757d;
}

/* 各メタ項目 */
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}

/* 作成日のスタイル */
.created-date::before {
    content: "✨";
    font-size: 0.9rem;
}

/* 更新日のスタイル */
.updated-date::before {
    content: "🔄";
    font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 414px) {
    .article-meta {
        gap: 10px;
        font-size: 0.8rem;
    }

    .meta-item {
        gap: 1px;
    }
}


@media (max-width: 320px) {
    .article-meta {
        gap: 8px;
        font-size: 0.7rem !important;
    }
}
