main{
    margin-top: 0;
    background-color: #f4f4f4;
}

.sp-br{
    display: none;
}

h2.sec-title {
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

h1.sec-title {
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}
section:nth-of-type(odd) {
    background-color: #f4f4f4;
}

/* 制作実績セクション全体（親要素） */
.works {
    position: relative; 
    padding: 150px 0 100px;
    margin-top: 30px; 
}
/* メディアクエリでPC用の大きな余白を確保  */
@media screen and (min-width: 769px) {
    .works {
        /* ヘッダーの高さ + パンくずの高さ分を確保 (例: 90px + 40px) */
        margin-top: 50px; /* PCでの上部マージンを調整 */
    }
}

@media screen and (min-width: 1025px) {
    .works {
        /* ヘッダーの高さ + パンくずの高さ分を確保 (例: 120px + 60px) */
        margin-top: 80px; 
    }
}

.sec-title {
    position: absolute; 
    z-index: 2; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
}

@media screen and (min-width: 1025px) {
    h2.sec-title {
        margin-bottom: 30px;
    }
    .works-detail-title {
        font-size: 2.5em !important;
    }
}

.works-bg-text {
    position: fixed; 
    right: -200px; 
    top: 200px; 
    font-family: sans-serif;
    font-size: 10em;
    font-weight: bold;
    color: #ffffff;
    opacity: 1; 
    letter-spacing: -0.05em;
    z-index: -1;
    pointer-events: none;
    transform-origin: 100% 100%; 
    transform: rotate(90deg); /* 90度反時計回りに回転 */
}

/* -------------------------------------- */
/* 💻 PC環境での横並びレイアウト (Flexbox) */
/* -------------------------------------- */
.works-list {
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 40px 9%; /* 上下40px、左右4%の隙間 */
    
    max-width: 1200px; 
    margin: 40px auto 0;
    padding: 20px;
}

/* 個々の制作事例アイテム */
.work-item {
    width: 40%; 
    position: relative;
}

.works-list .work-item:nth-of-type(even) {
    margin-top: 120px; 
}
.works-list .work-item:nth-of-type(odd) {
    margin-top: 0;
}

.work-caption {
    background-color: #3d933f;
    width: 80%;
    color: #ffffff;
    padding: 10px;
    /* 画像の上に移動させる設定 */
    margin-top: -30px; /* 負の値で上に移動（画像に食い込ませる量）。*/
    position: relative; /* z-indexが効くようにする */
    z-index: 2; /* 画像より高い重ね順にする */
}

.works-list img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.61, 1, 0.88, 1);
    transform-origin: left center;
}

.works-list img:hover {
    transform: scale(1.1);
    opacity: 0.6; /* 40%の透明度 */
}

/* ダミー要素のスタイル (右に要素がない場合) */
.work-item-spacer {
    /* 最後のアイテムの幅（40%）と同じ幅を設定 */
    width: 40%; 
    /* 見えないようにするが、スペースは確保する */
    visibility: hidden;
    /* 交互配置のずらしの影響を受けないように margin-top: 0; を適用 */
    margin-top: 0 !important; 
}


/* 詳細ページcss↓*/

.page-content {
    max-width: 1200px; /* PCでの最大幅 */
    margin: 0 auto;
    padding: 0 20px 30px;
    text-align: center;
}

.works-detail-title {
    text-align: center;
    position: relative;
    display: inline-block;
    margin: 30px 0;
    font-size: 2.3em; /* サイズを調整 */
    padding: 0 30px;
}

/* 疑似要素の共通設定 */
.works-detail-title::before, 
.works-detail-title::after { 
    content:'';
    /* 線の長さと高さ（サイズは調整してください） */
    width: 20px; 
    height: 30px; 
    position: absolute;
    display: inline-block;
}

/*  左上と右下の角 */
.works-detail-title::before {
    /* L字の線 */
    border-left: solid 1px #dc1c9a; 
    border-top: solid 1px #dc1c9a;
    /* 位置 */
    top: 0;
    left: 0;
}

/*  右上と左下の角  */
.works-detail-title::after {
    /* L字の線 */
    border-right: solid 1px #dc1c9a;
    border-bottom: solid 1px #dc1c9a;
    /* 位置 */
    bottom: 0;
    right: 0;
}

.works-detail{
    max-width: 1200px; /* 親要素に合わせて max-width に変更 */
    margin: 0 auto; /* 中央寄せを維持 */
}

/* -------------------------------------- */
/* detail-visualのFlex設定  */
/* -------------------------------------- */
.detail-visual {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px; 
    margin: 50px auto;
    padding: 0 20px;
}

/*  visual-itemのサイズ調整 */

/* 複数の画像がある場合のデフォルト（Flexアイテムの幅） */
.detail-visual .visual-item {
    display: block; 
    width: 100%; /* 親の visual-item の幅いっぱいに広げる */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

/*  2つのアイテムが存在する場合の幅（PC: 65%, スマホ: 25%を再現） */
/* detail-visual内に visual-item が2つ以上ある場合のベース設定 */
.detail-visual .visual-item { 
    width: auto; /* Flexboxに任せる */
    flex-shrink: 0; /* 縮小させない */
    flex-grow: 0;
}

/* 1つ目のアイテム（PC画像: 65%） */
.detail-visual .visual-item:nth-child(1) { 
    max-width: 70%; 
    width: 70%;
}
/* 2つ目のアイテム（スマホ画像: 25%） */
.detail-visual .visual-item:nth-child(2) { 
    max-width: 20%; 
    width: 20%;
}

/* -------------------------------------- */
/* 1つのアイテムの場合のサイズ調整  */
/* -------------------------------------- */

.visual-item.video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 の高さを確保 */
    height: 0; /* padding-bottom を利用するため */
    border-radius: 10px; 
    overflow: hidden;    
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1); 
	border: none;
}

/* 埋め込まれた iframe の設定 */
.visual-item.video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/*  動画が単一のアイテムの場合の幅設定  */
.detail-visual .visual-item:only-child {
    width: 100%; /* 全幅にする */
    max-width: 1000px; /* PCでの最大幅を維持 */
    margin: 0 auto;
}
/* -------------------------------------- */
/*制作事例 詳細情報のテーブルデザイン  */
/* -------------------------------------- */

.detail-info-table {
    max-width: 800px;
    margin: 30px auto 50px;
    border-top: 1px solid #ccc; /* 一番上の線 */
}

.detail-visual .visual-item {
    border-radius: 10px; 
    overflow: hidden; 
}

/* 定義リスト全体のスタイル */
.detail-info-table dl {
    display: flex; /* dtとddを横並びにする */
    border-bottom: 1px solid #ccc; /* 行の下の線 */
    padding: 10px 0;
    margin: 0; /* デフォルトマージンをリセット */
    text-align: left;
}

.detail-info-table dt {
    width: 120px; 
    font-size: 1em;
    font-weight: bold;
    color: #333;
    padding-right: 10px;
    margin-left: 30px;
}

/* 内容部分 */
.detail-info-table dd {
    flex-grow: 1; /* 残りのスペースをすべて占有 */
    margin-left: 0; /* デフォルトマージンをリセット */
    font-size: 1.1em;
    line-height: 1.6;
}

/* リンクアイコンの調整 */
.detail-info-table dd a {
    text-decoration: none; /* 下線を削除 */
    color: #3d933f;
    word-break: break-all;
}

.detail-info-table dd a:hover {
    text-decoration: none; /* 下線を削除 */
    color: #dc1c9a;
    word-break: break-all;
}


.detail-info-table .service-list dt {
    padding-top: 3px; /* 内容の行が長くなった場合、dtを少し下に配置 */
}

/* サービスの内容が多い場合の縦方向の配置を調整 */
.detail-info-table .service-list {
    align-items: flex-start;
}

.description-title {
    font-size: 20px;
    margin: 20px auto;
    font-weight: bold;
    color: #26b430;
}

.description-content {
    max-width: 800px;
    text-align: left;
    margin: 0 auto;
    padding: 0 20px;
}

.description-content p{
    font-size: 1.2em;
}

.detail-description {
    display: inline-block;
    background-color: #ffffff;
    border-radius: 10px;
}

.detail-link-container {
    text-align: center; /* ボタン（インライン要素）を中央に配置 */
    margin-top: 100px; /* 上部に余白を確保 */
    margin-bottom: 80px; /* 下部に余白を確保 */
    padding: 0 20px;
}

.btn-primary-link {
    /* インラインブロック要素として中央寄せとサイズ指定を可能にする */
    display: inline-block; 
    
    /* サイズと形状 */
    padding: 15px 40px;
    border-radius: 5px;
    min-width: 200px;
    
    /* 色と装飾 */
    background-color: #dc1c9a; 
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1em;
    text-decoration: none; /* 下線を削除 */
    
    /* 視覚的な効果 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

/* ホバー時の効果 */
.btn-primary-link:hover {
    background-color: #2e7a30; /* 少し濃い色に変化 */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

a:hover {
    color: #ffffff;
    text-decoration: none;
}
/* -------------------------------------- */
/* スマートフォンでのレイアウト */
/* -------------------------------------- */
@media (max-width: 768px) {
    .works {
        position: relative; 
        padding: 100px 0 20px;
        margin: 30px 0 0;
    }
    .sp-br{
        display: block;
    }
    .works-list {
        /* スマホでは縦に並ぶので、交互配置は解除する */
        flex-direction: column; 
        align-items: center;
        gap: 20px;
    }
    
    .work-item {
        width: 90%;
        /*  スマホ/タブレットでは交互配置をリセット  */
        margin-top: 0 !important; 
    }

    .work-item-spacer {
        display: none;
    }
    .works-bg-text {
        font-size: 10em; 
        top: 20px;
        right: 0;
        opacity: 0.5; 
        transform-origin: 0% 80%; 
        transform: rotate(-90deg);
    }

    .works-list img:hover {
        transform: scale(1.1);
        opacity: 0.6; /* 40%の透明度 */
    }

    
    .works-detail-title {
        /* 左右のパディングを大幅に減らす、または削除 */
        padding: 0.25em 0.5em; 
        /* 中央寄せは親要素の text-align: center; が処理します */
    }

    .works-detail-title::before, 
    .works-detail-title::after { 
        width: 10px; 
        height: 15px; 
    } 

    .detail-visual {
        flex-direction: column;
        gap: 40px;
        align-items: center;
        margin: 20px auto;
        padding: 0;
    }

    /*  すべての visual-item をスマホでは全幅に戻す  */
    .detail-visual .visual-item {
        width: 100% !important; 
        max-width: 100% !important;
    }

    .detail-visual .visual-item:nth-child(2) {
        width: 60% !important; 
        max-width: 300px !important; /* 最大幅も設定（任意） */
        margin: 0 auto; /* 中央に配置 */
    }
    
    /*  スマホ画像が小さくなった分、親を中央寄せにする */
    .detail-visual {
        /* 中央寄せを強化 */
        align-items: center;
    }
    .works-detail-title {
        text-align: left;
        margin: 20px 0 10px;
        font-size: 1.7em;
        padding: 0 20px;
    }
    .detail-info-table dd {
        flex-grow: 1; /* 残りのスペースをすべて占有 */
        margin-left: 0; /* デフォルトマージンをリセット */
        font-size: 1em;
        line-height: 1.6;
    }

    p.description-content{
        font-size: 1.1em;
    }

    .detail-link-container {
        margin-top: 40px;
        margin-bottom: 60px;
    }
    .btn-primary-link {
        width: 80%; /* スマホでは幅を広げてタップしやすくする */
        min-width: auto;
    }

}

@media(max-width:480px){
    .works {
        position: relative; 
        padding: 200px 0 20px;
        margin: 50px 0 0;
    }

    .works-detail-title {
        text-align: left;
        margin: 20px 0 10px;
        font-size: 1.5em;
        padding: 0 15px;
    }

    .detail-info-table dt {
        width: 100px; 
        font-size: 1em;
        font-weight: bold;
        color: #333;
        padding-right: 10px;
        margin-left: 10px;
    }

    .sp-br{
        display: block;
    }

    .works-list {
        margin-top: 0;
	}
	
	.works-list img:hover {
        transform: scale(1.03); 
    }


}

/* -------------------------------------- */
/*  reCAPTCHA バッジを非表示 */
/* -------------------------------------- */
/* reCAPTCHAのバッジ非表示に設定 */
.grecaptcha-badge {
    display: none !important;
    visibility: hidden !important;
}