/* スライダー用レスポンシブ切り替え */
.slider-item-sp {
    display: none !important;
}

@media screen and (max-width: 768px) {
    .slider-item-pc {
        display: none !important;
    }

    .slider-item-sp {
        display: block !important;
    }
}

/* ==== スライダー (有機的シェイプ スプリットレイアウト) ==== */
.slider-split {
    display: flex;
    align-items: flex-start;
    /* 画像とテキストを上揃えに */
    padding-top: 10rem;
    /* ヘッダー分＋余白を上部に取る */
    width: 100%;
    height: 100%;
    gap: 4rem;
}

/* 左側：テキストエリア */
.slider-text-area {
    flex: 1;
    z-index: 5;
}

.slider-catchphrase {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 1rem;
    color: #111;
}

.slider-subtitle {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #555;
}

/* 右側：画像エリア（アメーバ状切り抜き） */
.slider-image-area {
    flex: 1;
    height: 100%;
    /* 枠自体を上下いっぱいまで大きくする */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.slider-blob {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* 参考画像に近い有機的なアメーバ状の切り抜き */
    border-radius: 68% 32% 43% 57% / 51% 47% 53% 49%;
    animation: blob-morph 8s ease-in-out infinite;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

@keyframes blob-morph {
    0% {
        border-radius: 68% 32% 43% 57% / 51% 47% 53% 49%;
    }

    33% {
        border-radius: 41% 59% 49% 51% / 60% 41% 59% 40%;
    }

    66% {
        border-radius: 56% 44% 63% 37% / 41% 65% 35% 59%;
    }

    100% {
        border-radius: 68% 32% 43% 57% / 51% 47% 53% 49%;
    }
}

/* ==== 巨大な背景模様（アメーバ） ==== */
.slider-bg-pattern {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 70%;
    height: 140%;
    background-color: #e5f2f0; /* 薄いブルーグリーン（ミント）系の大図形 */
    border-radius: 50% 60% 40% 70% / 60% 50% 70% 40%;
    z-index: 0;
    opacity: 0.8;
}

.slider-bg-pattern::after {
    content: "";
    position: absolute;
    bottom: -20%;
    right: -40%;
    width: 80%;
    height: 90%;
    background-color: #eaf5f4; /* 模様の重なり */
    border-radius: 70% 40% 50% 30% / 40% 60% 40% 70%;
    z-index: 0;
}

/* ==== 次のスライドプレビュー（左下） ==== */
.slider-next-preview {
    position: absolute;
    bottom: -50px;
    left: -20px;
    width: 440px; /* 横長に大きく変更 */
    height: 280px; /* 縦も大きく */
    background-size: cover;
    background-position: center;
    border-radius: 60% 80% 60% 10% / 70% 60% 80% 10%; /* 横長のプレビュー用の変形 */
    z-index: 10;
    border: 8px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* スマホ用レスポンシブ (縦積み) */
@media screen and (max-width: 768px) {
    .top-slider {
        height: 48rem !important;
    }

    .slider-split {
        flex-direction: column-reverse;
        /* 画像を上（右上に配置するため）、テキストを下に */
        justify-content: flex-end;
        align-items: flex-end;
        /* 右揃えに寄せるベース */
        gap: 1rem;
        padding-top: 0;
        /* モバイルでは上ぴったりに */
        text-align: left;
        /* テキストは左揃え */
    }

    .slider-text-area {
        flex: none;
        width: 100%;
        padding-top: 0;
        align-self: flex-start;
        /* テキストは左側に配置 */
    }

    .slider-catchphrase {
        font-size: 2rem;
    }

    .slider-subtitle {
        font-size: 0.9rem;
    }

    .slider-image-area {
        width: calc(100% + 20px);
        /* 右側のパディング（.container）を無視して画面端まで届かせる */
        height: 380px; /* 縦幅を大きく変更 */
        flex: none;
        margin-right: -20px;
        /* 画面右端にくっつける */
        margin-top: -30px;
        /* 少し上にめり込ませてヘッダー裏に潜り込ませる */
        display: flex;
        justify-content: flex-end;
        align-items: flex-start;
        margin-bottom: 2rem;
    }

    .slider-blob {
        width: 100%;
        height: 100%;
        border-radius: 40% 0 0 50% / 30% 0 0 40%;
        /* 左側が丸く、右と上がピタッとくっつく形 */
        animation: none;
        /* スマホで右上に固定する場合は形を崩さない方が綺麗に見えるためアニメーション停止（任意） */
    }

    .slider-next-preview {
        width: 280px; /* 横長に大きく変更 */
        height: 180px; /* 縦も大きく */
        bottom: -30px;
        left: -10px;
        border-width: 5px;
        border-radius: 60% 80% 60% 10% / 70% 60% 80% 10%; /* 横長のプレビュー用の変形 */
    }
}

/* スライダーインジケーター（ドット） */
.slider-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* ==== コンテンツ1 セクション ==== */
.content1-section {
    padding: 5rem 0;
}

.content1-inner {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.content1-text-col {
    flex: 1;
    min-width: 0;
}

.content1-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    color: #888;
}

.content1-catchphrase {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    color: #111;
}

.content1-description {
    font-size: 1rem;
    line-height: 1.9;
    color: #555;
}

.content1-image-col {
    flex: 0 0 45%;
    max-width: 45%;
}

.content1-image {
    width: 100%;
    height: auto;
    display: block;
}

.content1-btn-wrap {
    margin-top: 2rem;
}

.content1-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.85rem 2.2rem;
    border: 2px solid currentColor;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: inherit;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.content1-btn::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

.content1-btn:hover {
    opacity: 0.8;
    filter: brightness(0.9);
}

@media screen and (max-width: 768px) {
    .content1-section {
        padding: 3.5rem 0;
    }

    .content1-inner {
        flex-direction: column;
        gap: 2rem;
    }

    .content1-image-col {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    .content1-catchphrase {
        font-size: 1.7rem;
    }
}

/* --- コンテンツ1 アニメーション --- */
.content1-subtitle,
.content1-catchphrase,
.content1-description,
.content1-btn-wrap,
.content1-image-col {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.content1-section.is-visible .content1-subtitle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

.content1-section.is-visible .content1-catchphrase {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.content1-section.is-visible .content1-description {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.content1-section.is-visible .content1-btn-wrap {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.45s;
}

.content1-section.is-visible .content1-image-col {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

/* ==== 区切り画像1 セクション ==== */
.divider-image {
    width: 100%;
}

.divider-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

@media screen and (max-width: 768px) {
    .divider-image img {
        height: 200px;
    }
}

/* --- 区切り画像 アニメーション (下から上) --- */
.divider-image-1 {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.divider-image-1.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* コンテンツ2 セクションのスタイル */
.content2-section {
    padding: 6rem 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}


.content2-section.container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.content2-section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    padding: 0 4%;
}

.content2-section-subtitle {
    font-size: 0.9rem;
    color: #888;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.content2-section-catchphrase {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #111;
    margin-bottom: 1.5rem;
}

.content2-section-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

/* --- コンテンツ2 共通項目 ヘッダーアニメーション --- */
.content2-section-subtitle,
.content2-section-catchphrase,
.content2-section-description {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.content2-section-header.is-visible .content2-section-subtitle {
    transition-delay: 0s;
    opacity: 1;
    transform: translateY(0);
}

.content2-section-header.is-visible .content2-section-catchphrase {
    transition-delay: 0.15s;
    opacity: 1;
    transform: translateY(0);
}

.content2-section-header.is-visible .content2-section-description {
    transition-delay: 0.3s;
    opacity: 1;
    transform: translateY(0);
}

.content2-row {
    width: 100%;
    margin: 0 0 3rem 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
    opacity: 0;
    transform: translateX(50px);
    /* セット1: 右から左へ */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.content2-row.reverse {
    flex-direction: row-reverse;
    transform: translateX(-50px);
    /* セット2: 左から右へ */
}

.content2-row.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.content2-row:last-child {
    margin-bottom: 0;
}

/* --- コンテンツ2 セット内の連続アニメーション (右から左) --- */
.content2-label,
.content2-catchphrase,
.content2-description,
.content2-btn-wrap {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 偶数番(.reverse)のセットの場合は、逆方向（左から右）にスライド */
.content2-row.reverse .content2-label,
.content2-row.reverse .content2-catchphrase,
.content2-row.reverse .content2-description,
.content2-row.reverse .content2-btn-wrap {
    transform: translateX(-30px);
}

/* 親要素(.content2-row)が表示されたタイミングで、子要素をずらして表示 */
.content2-row.is-visible .content2-label {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
    /* 行全体のアニメーションに少し遅れて開始 */
}

.content2-row.is-visible .content2-catchphrase {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.35s;
}

.content2-row.is-visible .content2-description {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s;
}

.content2-row.is-visible .content2-btn-wrap {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.65s;
}

.content2-image {
    width: 38%;
    flex-shrink: 0;
    padding-left: 3vw;
    box-sizing: border-box;
}

.content2-row.reverse .content2-image {
    padding-left: 0;
    padding-right: 3vw;
}

.content2-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: block;
}

.content2-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    padding: 3.5rem 4rem;
    padding-right: max(4rem, calc(50vw - 500px));
    margin-left: -5%;
    margin-top: 4rem;
    z-index: 10;
    position: relative;
    border-radius: 24px 0 0 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    border-right: none;
    box-sizing: border-box;
}

.content2-row.reverse .content2-text {
    margin-left: 0;
    margin-right: -5%;
    border-radius: 0 24px 24px 0;
}

.content2-bg-number {
    position: absolute;
    right: 30px;
    top: 20px;
    font-size: 8rem;
    font-weight: 900;
    color: #e6f0ed;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.content2-label {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.content2-headline-logo {
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.content2-headline-logo img {
    max-width: 150px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.content2-catchphrase {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.35;
    margin-bottom: 1.5rem;
    color: #222;
    position: relative;
    z-index: 1;
}

.content2-description {
    font-size: 1rem;
    line-height: 1.9;
    color: #444;
    margin-bottom: 1.5rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.content2-btn-wrap {
    margin-top: 1rem;
    text-align: left;
}

.content2-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: normal;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.content2-btn:hover {
    opacity: 0.7;
}

.content2-btn-arrow {
    font-size: 0.8em;
}

/* スマホ用のレスポンシブスタイル */
@media screen and (max-width: 768px) {

    .content2-section {
        padding: 4rem 0;
        text-align: center;
        overflow: hidden;
    }

    .content2-row,
    .content2-row.reverse {
        flex-direction: column;
        gap: 0;
        /* margin-bottom: 5rem; */
        align-items: stretch;
        padding: 0;
    }

    .content2-row.reverse .content2-text {
        margin-top: -3rem;
        margin-left: 0;
        margin-right: auto;
        border-radius: 0 24px 24px 0;
        border-left: none;
        border-right: 1px solid #f0f0f0;
    }

    .content2-image,
    .content2-row.reverse .content2-image {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .content2-text {
        flex: none;
        width: 92%;
        margin-left: auto;
        margin-right: 0;
        margin-top: -3rem;
        padding: 2.5rem 1.5rem;
        align-items: flex-start;
        text-align: left;
        background: #fff;
        border-radius: 24px 0 0 24px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        border: 1px solid #f0f0f0;
        border-right: none;
        box-sizing: border-box;
    }

    .content2-bg-number {
        right: 15px;
        top: 10px;
        font-size: 5rem;
    }

    .content2-section-catchphrase {
        font-size: 1.7rem;
    }

    .content2-label {
        font-size: 0.9rem;
    }

    .content2-catchphrase {
        font-size: 1.7rem !important;
    }

    .content2-description {
        font-size: 1rem !important;
    }

    .content2-btn-wrap {
        text-align: left;
        width: 100%;
        margin-top: 1.5rem;
    }

    .free-space-section {
        text-align: center;
    }


    /* フリースペース セクションのスタイル */
    .free-space-section {
        padding: 0 4%;
    }

    .free-space-section .container {
        max-width: 1000px;
        margin: 0 auto;
        padding: 0;
    }

    /* ==== コンテンツ3 セクション ==== */
    .content3-section {
        padding: 5rem 4%;
    }

    .content3-section .container {
        max-width: 1100px;
        margin: 0 auto;
    }

    .content3-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .content3-item {
        display: block;
    }

    .content3-item-inner {
        display: block;
        text-decoration: none;
        color: inherit;
        transition: opacity 0.25s ease;
    }

    .content3-item-inner:hover {
        opacity: 0.75;
    }

    .content3-image-wrap {
        border-radius: 14px;
        overflow: hidden;
        aspect-ratio: 4 / 3;
        margin-bottom: 1.2rem;
    }

    .content3-image-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }

    .content3-item-inner:hover .content3-image-wrap img {
        transform: scale(1.04);
    }

    .content3-label {
        font-size: 1rem;
        font-weight: bold;
        text-align: center;
        margin: 0;
        color: #111;
    }

    @media screen and (max-width: 768px) {
        .content3-section {
            padding: 3rem 4%;
        }

        .content3-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
        }
    }

    @media screen and (max-width: 480px) {
        .content3-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }
    }
}

/* <- This closes the @media screen and (max-width: 768px) that was left open */

/* --- ブログセクション アニメーション --- */
.blog-subtitle,
.blog-catchphrase,
.blog-description,
.blog-slider-viewport {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.blog-section.is-visible .blog-subtitle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

.blog-section.is-visible .blog-catchphrase {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.blog-section.is-visible .blog-description {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.blog-section.is-visible .blog-slider-viewport {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.45s;
}

/* --- お知らせ & 製品 アニメーション --- */
.news-section,
.product-section {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.news-section.is-visible,
.product-section.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* トップページ各コンテンツ小見出しフォントサイズ統一 */
.slider-subtitle,
.content1-subtitle,
.content2-section-subtitle,
.content2-label,
.blog-subtitle {
    font-size: 1.2rem !important;
}

@media screen and (max-width: 768px) {

    .slider-subtitle,
    .content1-subtitle,
    .content2-section-subtitle,
    .content2-label,
    .blog-subtitle {
        font-size: 0.9rem !important;
    }
}