/*
Theme Name:namiki-test
*/

html {
    width: 100%;
    overflow-x: hidden;
}

html,
body {
    height: 100%;
    /* HTMLとBodyの高さをビューポートに合わせる */
    margin: 0;
    padding: 0;
    width: 100%;
}

/* ベース設定とリセット */

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 共通セクションタイトル */
.section-title {
    font-size: 50px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 60px;
    margin-top: 80px;
}

/* -------------------- 1. トップの行動喚起エリア -------------------- */
.cta-top-section {
    background-color: #fff;
    padding: 50px 20px;
    text-align: center;
}

.cta-text {
    font-size: 35px;
    font-weight: 800;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 40px 60px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 35px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #333;
}

/* -------------------- 2. 事業内容セクション -------------------- */
.business-section {
    margin: 0 auto;
    padding: 50px 20px;
    /* max-widthは設定されていませんが、このpaddingがコンテンツの左右の余白になります */
}

.service-category {
    margin-bottom: 80px;
    display: flex;
    /* 補完要素はすべて削除 */
    /* max-width, margin: auto, border, background, overflow: hidden, position: relative は削除 */
}


/* カテゴリ名（WEB LAB / MUSICIANS LAB）のコンテナ */
.category-name {
    flex-shrink: 0;
    width: 35%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 60px;
    font-weight: bold;
    padding: 20px 150px;
    white-space: nowrap;
    z-index: 2;
    position: relative;
    color: #000;
    letter-spacing: -0.02em;
}

/* カテゴリ名の左側に視覚的な強調線を追加 */
.category-name::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: linear-gradient(to right, #005400, #00aa00);
    border-radius: 2px;
}

/* サービス項目（FC本部立ち上げなど）uのコンテナ */
.service-list {
    flex-grow: 1;
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* !!! 修正点: service-row に position:relative を追加し、擬似要素を追加 !!! */
/* .service-row {
    position: relative;
} */
/* 1. 行を左に隠した初期状態 */
.service-row {
    opacity: 0;
    transform: translateX(-60px);
    /* 左にスライドだけ。上下方向には動かさない */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: transform, opacity;
    position: relative;
}

/* 2. 表示されたときの状態（フェードイン + スライド） */
.service-row.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* 行ごとに遅延させて順番にアニメーション */
.service-row:nth-child(1) {
    transition-delay: 0.1s;
}

.service-row:nth-child(2) {
    transition-delay: 0.3s;
}

.service-row:nth-child(3) {
    transition-delay: 0.5s;
}

.service-row:nth-child(4) {
    transition-delay: 0.7s;
}

/* !!! 新規追加: service-row のグラデーションを画面端まで広げる擬似要素 !!! */
.service-row::before {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    z-index: -1;
    /* service-item のコンテンツの背面に隠す */

    /* コンテナの左端に合わせる */
    left: 0;
    right: 0;

    /* 背景を親要素に合わせる */
    width: 100%;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
}

/* 1行目: FC本部立ち上げ */
.service-list > a:nth-child(1) .service-row::before {
    background: 
        linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 30%),
        url('../images/2FC本部立ち上げ.webp') no-repeat right center;
    background-size: cover;
}

/* 2行目: HP制作 */
.service-list > a:nth-child(2) .service-row::before {
    background: 
        linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 30%),
        url('../images/3HP制作.webp') no-repeat right center;
    background-size: cover;
}

/* 3行目: 社内システム制作 */
.service-list > a:nth-child(3) .service-row::before {
    background: 
        linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 30%),
        url('../images/4社内システム制作.webp') no-repeat right center;
    background-size: cover;
}

/* 4行目: ブランドロゴ制作 */
.service-list > a:nth-child(4) .service-row::before {
    background: 
        linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 30%),
        url('../images/5ブランドロゴ制作.webp') no-repeat right center;
    background-size: cover;
}
/* service-row のボーダー/区切り線は、ご提示のコードにはないのでここでは設定しません */

/* リンク要素全体にホバーエフェクトを追加 */
.service-list > a {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.service-list > a:hover .service-row::before {
    opacity: 0.85;
}

.service-list > a:hover .service-text {
    color: #005400;
    transform: translateX(10px);
}

/* サービス項目（各行） */
.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    /* 修正: グラデーションを擬似要素に任せる */
    background: transparent;

    margin: 20px;
    padding: 40px 40px;
    /* サービス項目間の区切り線は、ご提示のコードにはないのでここでは設定しません */

    position: relative;
    /* テキストの重なり順を制御 */
    z-index: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-list > a:hover .service-item {
    padding-left: 50px;
}

/* サービス名 (文字を右寄せ) */
.service-text {
    font-size: 30px;
    font-weight: 800;
    text-align: left;
    position: relative;
    flex-grow: 1;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

/* 画像スペース */
.service-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background-color: transparent;
}

/* -------------------- MUSICIANS LAB の調整 -------------------- */
.service-category:last-of-type {
    margin-bottom: 80px;
    /* 補完要素はすべて削除 */
}


/* -------------------- 3. ニュースセクション -------------------- */
.news-section {
    max-width: 1000px;
    /* ニュースリストの最大幅 */
    margin: 0 auto;
    text-align: center;
}

.news-list li {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: left;
    /* テキストを左寄せ */
    padding-left: 20px;
    /* 箇条書きのインデント */
    position: relative;
}

/* 箇条書きのドットをカスタム */
.news-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    /* 垂直位置調整 */
    width: 6px;
    height: 6px;
    background-color: black;
    border-radius: 50%;
}

/* -------------------- Blogセクション -------------------- */
.blog-section {
    padding: 50px 20px 100px 20px;
    background-color: #fff;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-title {
    font-size: 36px;
    font-weight: bold;
    color: #000;
    text-align: center;
    margin-bottom: 50px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.blog-card {
    display: block;
    text-decoration: none;
    color: #333;
    transition: opacity 0.3s;
}

.blog-card:hover {
    opacity: 0.8;
}

/* !!! 修正点1: img.blog-thumbnail のスタイルを追加 !!! */
.blog-thumbnail {
    width: 100%;
    /* 親要素の幅いっぱいに広げる */
    height: 180px;
    /* 固定の高さを設定 (デザイン画像に合わせて調整) */
    object-fit: cover;
    /* 画像がはみ出さないように、縦横比を維持しつつトリミング */
    border-radius: 35px;
    /* 角丸 */
    margin-bottom: 15px;
    display: block;
    /* img要素はinlineなので、blockにして margin-bottom を適用しやすくする */
}

.blog-meta {
    padding: 0 5px;
}

.blog-date {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.blog-text {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    line-height: 1.5;
}


/* --- Webフォントの読み込み設定例 --- */
/* 実際に使用するには、フォントファイル（woff, woff2など）が必要です。 */
/* @font-face {
    font-family: 'Corporate Logo Bold Ver3';
    src: url('fonts/corporate-logo-bold-ver3.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'F910 New Comic';
    src: url('fonts/f910-new-comic.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
} */

/* --- フォントクラスの定義 --- */
/* フォントファイルがない場合は、指定された代替フォントが適用されます。 */
.font-corporate-bold {
    font-family: 'Corporate Logo Bold Ver3', 'Arial Black', sans-serif;
}

.font-f910 {
    font-family: 'F910 New Comic', 'Arial', sans-serif;
}

/* -------------------- ベース設定とリセット -------------------- */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    overflow-x: hidden
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* -------------------- 2. メインビジュアル/ページヘッダー (グレーの部分) -------------------- */


.page-header-section {
    /* グラデーション */
    background: url('../images/1NAMIKI_LAB.webp');
    background-size: cover;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.header-content {
    margin: 0 auto;
    height: 100%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    width: 100%;
}

/* -------------------- キャッチコピーエリア -------------------- */
.catchphrase-area-frontpage {
    margin-left: auto;
    align-self: center;
    position: relative;
    right: 100px;
}

.catchphrase-line-frontpage {
    margin: 10px 0;

    /* 文字は左揃えを維持 */
    text-align: left;

    font-size: 25px;
    font-weight: 700;
    color: #fff;

    white-space: nowrap;
}

/* -------------------- newsエリア -------------------- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
    width: 100%;
}

.news-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
    width: 100%;
    gap: 8px;
}

.news-item:hover {
    background-color: #f5f5f5;
}

.news-date {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.news-title {
    font-size: 20px;
    color: #333;
    line-height: 1.6;
    text-align: center;
    font-weight: bold;
}

.news-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* -------------------- blogエリア -------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 20px 0;
}

.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: opacity 0.3s;
}

.blog-card-link:hover {
    opacity: 0.8;
}

.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px;
    background-color: #b0b0b0;
    margin-bottom: 16px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #b0b0b0;
    color: #666;
    font-size: 14px;
}

.blog-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-card-date {
    font-size: 14px;
    color: #333;
    font-weight: 400;
}

.blog-card-title {
    font-size: 15px;
    font-weight: 400;
    color: #333;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: bold;
}


/* ==================== レスポンシブ対応 ==================== */

/* タブレット対応 (1024px以下) */
@media screen and (max-width: 1024px) {
    .section-title {
        font-size: 40px;
        margin-bottom: 40px;
        margin-top: 60px;
    }

    .catchphrase-area-frontpage {
        right: 150px;
    }

    .catchphrase-line-frontpage {
        font-size: 32px;
    }

    .category-name {
        font-size: 50px;
        padding: 20px 80px;
        width: 40%;
    }

    .service-item {
        padding: 30px 30px;
        margin: 15px;
    }

    .service-text {
        font-size: 24px;
    }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .news-item {
        padding: 15px;
    }

    .news-date {
        font-size: 12px;
    }

    .news-title {
        font-size: 18px;
    }
}

/* タブレット対応 (900px以下) */
@media screen and (max-width: 900px) {
    .section-title {
        font-size: 36px;
    }

    .catchphrase-area-frontpage {
        right: 120px;
    }

    .catchphrase-line-frontpage {
        font-size: 28px;
        white-space: normal;
    }

    .category-name {
        font-size: 40px;
        padding: 20px 60px;
        width: 45%;
    }

    .service-item {
        padding: 25px 25px;
        margin: 12px;
    }

    .service-text {
        font-size: 20px;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .blog-card-image {
        height: 160px;
    }

    .blog-card-date {
        font-size: 12px;
    }

    .blog-card-title {
        font-size: 14px;
    }

    .news-item {
        padding: 12px;
    }
}

/* タブレット対応 (768px以下) */
@media screen and (max-width: 768px) {
    .page-header-section {
        min-height: 300px;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 30px;
        margin-top: 50px;
    }

    .cta-button {
        padding: 25px 40px;
        font-size: 20px;
    }

    .cta-text {
        font-size: 24px;
    }

    .business-section {
        padding: 40px 15px;
    }

    .catchphrase-area-frontpage {
        right: 80px;
    }

    .catchphrase-line-frontpage {
        font-size: 22px;
        white-space: normal;
    }

    .service-category {
        flex-direction: column;
        margin-bottom: 60px;
    }

    .category-name {
        font-size: 32px;
        padding: 15px 20px;
        width: 100%;
        text-align: left;
        white-space: normal;
    }

    .category-name::before {
        left: 0;
        width: 4px;
    }

    .service-list {
        flex: 1;
    }

    .service-item {
        padding: 20px 20px;
        margin: 10px;
        cursor: pointer;
    }

    .service-text {
        font-size: 18px;
    }

    /* タッチデバイス向けのアクティブ状態 */
    .service-list > a:active .service-text {
        color: #005400;
        transform: translateX(8px);
    }

    .service-row::before {
        left: 0;
        right: 0;
        width: 100%;
        background-size: cover;
        background-position: center;
    }

    .blog-section {
        padding: 40px 15px 80px 15px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }

    .blog-card {
        max-width: 100%;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-card-date {
        font-size: 13px;
    }

    .blog-card-title {
        font-size: 15px;
    }

    .news-section {
        max-width: 100%;
        padding: 40px 15px;
    }

    .news-item {
        padding: 15px 10px;
        gap: 5px;
    }

    .news-date {
        font-size: 12px;
    }

    .news-title {
        font-size: 16px;
    }
}

/* スマホ対応 (600px以下) */
@media screen and (max-width: 600px) {
    .page-header-section {
        min-height: 250px;
        background-size: cover;
    }

    .header-content {
        width: 100%;
    }

    .logo-large {
        max-width: 100px;
        left: 50%;
        transform: translateX(-50%);
        top: 30%;
    }

    .catchphrase-area-frontpage {
        position: absolute;
        right: 10px;
        left: auto;
        bottom: 20px;
    }

    .catchphrase-line-frontpage {
        font-size: 16px;
        margin: 5px 0;
        white-space: normal;
        font-size: 14px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 25px;
        margin-top: 40px;
    }

    .main-content-wrapper {
        padding: 0;
    }

    .main-content-inner {
        padding: 0;
    }

    .business-section {
        padding: 30px 10px;
    }

    .service-category {
        margin-bottom: 40px;
    }

    .category-name {
        font-size: 24px;
        padding: 10px 15px;
        width: 100%;
        text-align: left;
    }

    .category-name::before {
        left: 0;
        width: 3px;
        height: 60%;
    }

    .service-item {
        padding: 15px 15px;
        margin: 8px;
        flex-direction: column;
    }

    .service-item:active {
        background-color: rgba(0, 84, 0, 0.05);
    }

    .service-text {
        font-size: 16px;
    }

    .service-row::before {
        left: 0;
        right: 0;
        width: 100%;
        background-size: cover;
        background-position: center;
    }

    .cta-button {
        padding: 18px 30px;
        font-size: 16px;
    }

    .cta-text {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .blog-section {
        padding: 30px 10px 60px 10px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px 0;
    }

    .blog-card-image {
        height: 180px;
    }

    .blog-card-date {
        font-size: 12px;
    }

    .blog-card-title {
        font-size: 14px;
    }

    .news-section {
        padding: 30px 10px;
    }

    .news-item {
        padding: 12px 8px;
        gap: 4px;
    }

    .news-date {
        font-size: 11px;
    }

    .news-title {
        font-size: 14px;
        line-height: 1.4;
    }

    .news-empty {
        padding: 30px 10px;
        font-size: 14px;
    }

    .blog-container {
        max-width: 100%;
        padding: 0;
    }

    .section-title a {
        font-size: 28px;
    }
}

/* 小さいスマホ対応 (480px以下) */
@media screen and (max-width: 480px) {
    .page-header-section {
        min-height: 220px;
    }

    .logo-large {
        max-width: 80px;
    }

    .catchphrase-line-frontpage {
        font-size: 12px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
        margin-top: 35px;
    }

    .business-section {
        padding: 20px 8px;
    }

    .category-name {
        font-size: 20px;
        padding: 8px 12px;
    }

    .service-item {
        padding: 12px 12px;
        margin: 6px;
    }

    .service-text {
        font-size: 14px;
    }

    .blog-section {
        padding: 20px 8px 50px 8px;
    }

    .blog-card-image {
        height: 150px;
    }

    .news-section {
        padding: 20px 8px;
    }

    .news-item {
        padding: 10px 6px;
    }

    .cta-button {
        padding: 15px 25px;
        font-size: 14px;
    }

    .cta-text {
        font-size: 16px;
    }
}