footer{
    display: flex;
    flex-direction: column;
}

.footer-container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.footer-wrapper, .footer-wrapper-news {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}


/* `.footer-info`（動く部分） */
.footer-info , .footer-news {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: right;
    justify-content: right;
    text-align: right;
    background-image: url('../img/footer-info@2x.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2; /* `.footer-info-content` の上に配置 */
    transition: left 0.4s ease-in-out;
}

/* `.footer-info` をスライドさせる */
.footer-info.active {
    left: -100px;
}

/* `.footer-news` もスライドさせる */
.footer-news.active {
    left: -100px;
}

/* `.footer-info` と `.footer-news` 内の `h2` と `p`（もっと見る）の配置 */
.footer-info .section-heading,
.footer-news .section-heading {
    padding: 8px 24px 0 0; /* 上8px, 右24px, 下0, 左0 */
    text-align: right; /* 右揃え */
    display: flex;
    flex-direction: column;
    align-items: right;
    justify-content: right;
}

/* `.footer-info-content` と `.footer-news-content` をクリック可能に */
.footer-info-content, .footer-news-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #E0E0E0; /* 明るいグレー */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end; /* 右寄せ */
    z-index: 1;
    text-decoration: none; /* 下線を削除 */
    cursor: pointer; /* クリック可能に */
}

/* スライドしたら表示 */
.footer-info.active .footer-info-content {
    left: calc(100% - 100px); /* 200pxスライドしたスペースに表示 */
    opacity: 1;
}

.footer-news.active .footer-news-content {
    left: calc(100% - 100px); /* 200pxスライドしたスペースに表示 */
    opacity: 1;
}

/* `more` を右側に配置して、90度回転 */
.footer-more {
    writing-mode: horizontal-tb; /* 横書き */
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: bold;
    color: black; /* テキストカラー */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(90deg); /* 90度回転＋中央揃え */
    white-space: nowrap; /* 文字の折り返しを防ぐ */
}


/* スライドしたら中身を表示 */
.footer-info.active .footer-info-content {
    left: calc(100% - 100px);
    opacity: 1;
}

.footer-info-content{
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: left;
}  

.footer-info-content .footer-info-link:hover, .footer-news-content .footer-news-link:hover {
    background-color: gray;
}

.footer-info-content .footer-info-link {
    display: inline-block;
    color: white;
    background-color: black;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.footer-info-content .footer-info-link:hover {
    background-color: gray;
}

.footer-news{
    background-image: url('../img/footer-news@2x.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: right;
    justify-content: right;
}
.section-heading h2 {
    font-size: 72px;
    letter-spacing: 7.68px;
    text-align: right;
    display: inline-block; /* インライン要素として扱う */
    padding-right: -1px; /* 余白をなくす（微調整） */
}

.footer-news img {
    display: none;
}

.footer-nav{
    position: relative;
    background-color: #373737;
    color: #F9F9F9;
    display: flex;
    flex-direction: column;
    align-items: left;
    padding: 80px 120px 80px 320px;
}

.footer-logo{
    width: 396px;
    height: auto;
    margin-bottom: 32px;
}

.footer-nav-bottom{
    display: flex;
    flex-direction: row;
    justify-content: left;
}

.footer-nav-left{
    flex-grow: 1;
}

.footer-nav-left p{
    font-size: 14px;
    line-height: 250%; /* 40px */
    font-style: normal;
}

.footer-nav-right{
    flex-grow: 2;
    display: flex;
    flex-direction: row;
    justify-content: left;
    white-space: nowrap;
}

.footer-nav-right ul{
    margin-left: 80px;
}

/* フッターナビのリンク（デフォルト状態） */
.footer-nav-right a {
    font-size: 14px;
    line-height: 250%;
    font-style: normal;
    text-decoration: none; /* 初期状態ではアンダーラインなし */
    position: relative; /* 疑似要素の基準点 */
}

/* ホバー時のアンダーライン */
.footer-nav-right a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px; /* 下方向に少しずらす */
    width: 100%;
    height: 2px;
    background-color: white; /* アンダーラインの色 */
    transform: scaleX(0); /* 初期状態では非表示 */
    transform-origin: left;
    transition: transform 0.3s ease-in-out;
}

/* ホバー時にアンダーラインを表示 */
.footer-nav-right a:hover::after {
    transform: scaleX(1); /* 横幅100%のラインを表示 */
}

.footer-goat{
    position: absolute;
    width: 180px;
    height: auto;
    bottom: 0;
    right: 0;
}

.footer-copyright{
    font-size: 12px;
    line-height: 250%; /* 40px */
    margin-top: 40px;
    font-style: normal;
}


/* デフォルト状態（PC）では `p` を非表示 */
.footer-info .section-heading p,
.footer-news .section-heading p {
    display: none;
}

@media screen and (max-width: 1024px) {
    .footer-wrapper, .footer-wrapper-news {
        height: 200px;
        width: 100%;
    }


    .footer-info .section-heading p,
    .footer-news .section-heading p {
        display: block;
    }
    .footer-info, .footer-news {
        position: relative; /* 絶対配置を解除 */
        left: 0 !important; /* スライドを無効化 */
        height: 200px;
        width: 100%;
    }

    .footer-info.active, .footer-news.active {
        left: 0 !important; /* スライドしないように固定 */
    }

    .footer-info-content, .footer-news-content {
        display: none;
    }

    .section-heading h2 {
        font-size: 24px;
        letter-spacing: 2.88px;
    }

    .footer-info .section-heading, .footer-news .section-heading {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .section-heading p {
        display: inline-block;
        background-color: #F6F6F6; /* 薄いグレー */
        color: #333; /* テキストカラー */
        font-size: 12px;
        font-weight: bold;
        padding: 12px 0; /* 横方向の余白をなくす */
        text-align: center;
        width: 160px; /* ボタンの幅を固定 */
        position: relative;
        clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%); /* 横長の五角形 */
        transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
        margin-top: 20px; /* `h2` からの距離を調整 */
    }

    /* 左側の部分だけ色を変える */
    .section-heading p::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 20%;
        height: 100%;
        background-color: #D0D0D0; /* 少し暗いグレー */
        clip-path: polygon(0% 0%, 100% 0%, 90% 50%, 100% 100%, 0% 100%);
    }

    /* タップ時のボタンエフェクト（右に少し動く） */
    .section-heading p:active {
        background-color: #DCDCDC; /* タップ時に少し暗めのグレー */
        transform: translateX(5px); /* 右に5px動く */
    }



    .footer-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* 左揃え */
        justify-content: flex-start;
        text-align: left;
        width: 100%;
        padding: 100px 40px 24px 40px; /* 左右の余白を追加 */
        margin: 0;
    }

    /* 余計な要素を非表示 */
    .footer-nav-right,
    .footer-goat {
        display: none;
    }

    /* `footer-logo` の左揃え配置 & 間隔調整 */
    .footer-logo {
        max-width: 200px;
        height: auto;
        margin-bottom: 32px; /* 32pxの間隔 */
    }

    /* `footer-nav-left`（住所）を左揃え配置 & 間隔調整 */
    .footer-nav-left {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* 左揃え */
        text-align: left;
        margin-bottom: 32px; /* 32pxの間隔 */
    }

    /* `address` のスタイル */
    .footer-nav-left p {
        font-size: 15px;
        text-align: left;
        margin: 0;
        padding: 0;
    }

    /* `copyright` のスタイル */
    .footer-copyright {
        font-size: 10px;
        text-align: left;
        margin: 0;
        padding: 0;
    }
    
}