/*==================================
  フッター
==================================*/
.footer {
    background-color: var(--color-accent); /* 軽いグレーの背景色 */
    color: var(--color-accent-2);
    padding: 40px 20px;
    font-family: Arial, sans-serif;
    border-top: 1px solid var(--color-background-border);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* 複数のセクションを配置するFlexboxコンテナ */
.footer-sections {
    display: flex;
    flex-wrap: wrap; /* 小さい画面で折り返す */
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

/* 各セクションのスタイル */
.footer-section {
    flex: 1; /* 各セクションが均等な幅を占めるように */
    min-width: 180px; /* 最小幅を設定 */
}

.footer-section-title {
    font-size: var(--font-size-h5);
    font-weight: bold;
    color: var(--color-body-text-dark);
    margin-bottom: 15px;
    border-bottom: 2px solid #ccc; /* セクションタイトルの下線 */
    padding-bottom: 5px;
}

/* フッターリンクのリスト */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--color-body-text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: var(--font-size-body-text);
}

.footer-links a:hover {
    color: #007bff; /* ホバー時に青色に変化 */
    text-decoration: underline;
}

/* コピーライトとSNSアイコンをまとめるセクション */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--color-background-border);
}

.footer-copyright {
    font-size: var(--font-size-caption);
    color: var(--color-body-text-dark);
    margin: 0;
}

/* SNSアイコンのスタイル */
.footer-sns a {
    background-color: var(--color-background);
    padding: 15px 2px 0 3px;
    margin-left: 15px;
    border-radius: 10%;
    transition: color 0.3s ease;
}

.footer-sns img {
    height: 25px;
    width: auto;
}

/*==================================
  一番上に戻るボタン
==================================*/
.back-to-top {
    position: fixed;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--color-body-text-dark);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--font-size-h4);
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.5s ease, visibility 0.5s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    bottom: var(--back-to-top-bottom, 20px);
    border: none;
}

.back-to-top:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .footer-sections {
        flex-direction: column;
        gap: 20px;
    }
    .footer-section {
        min-width: auto;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .footer-copyright {
        order: 2; /* スマホではコピーライトを下に表示 */
    }
    .footer-sns {
        order: 1;
        margin-left: -15px; /* 左揃えの調整 */
    }
    .back-to-top {
        width: 40px;
        height: 40px;
        right: 15px;
    }
    /* SNSアイコンのスタイル */
    .footer-sns a {
        background-color: var(--color-background);
        padding: 15px 3px 0 3px;
        margin-left: 15px;
        border-radius: 10%;
        transition: color 0.3s ease;
    }
}