/* 全体設定 */
body {
    margin: 0;
    font-family: "M PLUS 1p", sans-serif;
    background-color: #f9f9fb;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.5s;
    text-shadow: 1px 1px 4px #000;
}

header,
main {
    opacity: 0.8;
}

/* ヘッダー部 */
header {
    text-align: center;
    position: relative;
}

.headerLogo {
    max-width: 600px;
    width: calc(100% - 32px);
    height: auto;
    animation: float 3s ease-in-out infinite;
    background-color: #22222222;
    border-radius: 16px;
}

/* ヘッダーロゴ浮遊アニメーション */
@keyframes float {
    0% {
        transform: translateY(10px);
    }
    50% {
        transform: translateY(15px);
    }
    100% {
        transform: translateY(10px);
    }
}

header h1 {
    font-size: 32px;
    margin: 5px 0px;
}

header p {
    margin: 3.2px 0;
    font-size: 16px;
}

/* 横並びにするラッパー */
.header-flex {
    display: flex;
    align-items: stretch; /* 高さ揃え */
    gap: 1rem;
    & .card {
        min-height: 150px; /* お好みで */
    }
}

/* アイコンラッパー */
.self-icon-wrapper {
    flex: 0 0 auto;
    display: flex;
    align-items: stretch; /* 親の高さに合わせる */
}

/* 自画像アイコン */
.self-icon {
    width: auto;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    max-height: none; /* 150px上限を外す（必要に応じて） */
}

/* カードコンテナ */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    padding: 32px 16px;
    max-width: 960px;
    margin: auto;
}

/* カード要素 */
.card {
    background-color: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    flex: 1 1 250px;
    text-align: center;
    transition: transform 0.2s ease;
}

.contents:hover {
    transform: translateY(-5px);
}

.card a {
    text-decoration: none;
    color: #333;
}

.cardIcon {
    font-size: 32px; /* 2rem */
    object-fit: contain;
    vertical-align: middle;

    width: 48px;
    height: 48px;
    overflow: hidden; /* はみ出しを隠す */
    border-radius: 8px;
    margin: auto;

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 中央トリミング */
    }
}

.lang {
    font-size: 14.4px; /* 0.9rem */
    color: #666;
}

/* フッター */
footer {
    text-align: center;
    padding: 16px; /* 1rem */
    font-size: 13.6px; /* 0.85rem */
    background-color: #e4f3ff;
    margin-top: auto;
}

/* モバイル対応 */
@media (max-width: 600px) {
    header h1 {
        font-size: 24px; /* 1.5rem */
    }
}

.backGroundMask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-image: linear-gradient(#444c),
        repeating-linear-gradient(
            -45deg,
            #f2f2f210 0px,
            #f2f2f210 15px,
            transparent 15px,
            transparent 30px
        );
}

/* PC用の動画背景設定 */
.videoWrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 2s ease;
    opacity: 0;
}

video.active {
    opacity: 1;
}

/* スマホ用の画像背景設定 */
.bgImageSlideshowWrapper {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    display: none; /* 初期状態は非表示 */
}

.backgroundImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1s ease;
    opacity: 1;
}
