/**
 * 追従バナー用CSS
 * PC右下とスマホ下部の固定表示バナー
 */

/* 共通スタイル */
.follow-banner {
    position: fixed;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.follow-banner.show {
    display: block;
    opacity: 1;
}

.follow-banner.hide {
    opacity: 0;
    pointer-events: none;
}

/* PC用バナー（左下固定） */
.follow-banner.pc {
    bottom: 20px;
    left: 20px;
    width: 270px;  /* 1080px / 4 = 表示サイズ */
    height: 375px; /* 1500px / 4 = 表示サイズ */
    border-radius: 12px;
}

.follow-banner.pc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* スマホ用バナー（下部固定） */
.follow-banner.sp {
    bottom: 60px; /* フッターの高さ分上に配置 */
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1001; /* フッターより上に表示 */
}

.follow-banner.sp .banner-content {
    width: 100%;
    padding: 0;
    margin: 0 auto;
}

.follow-banner.sp img {
    width: 100%;
    aspect-ratio: 720 / 200; /* 3.6:1 のアスペクト比 */
    object-fit: cover;
    display: block;
}

/* バナーリンク */
.follow-banner a {
    display: block;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.follow-banner.pc a {
    position: relative;
}

.follow-banner.sp {
    z-index:999999;
}

.follow-banner.sp a {
    display: block;
    width: 100%;
    padding: 0;
}

/* バツボタン */
.follow-banner .close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: background 0.3s ease;
    z-index: 9999;
}

.follow-banner.pc .close-btn {
    position: absolute;
    top: -10px; /* バナー上部にはみ出し */
    right: -5px;
    background: rgba(0, 0, 0, 0.8);
    font-size: 14px;
    border-radius: 50%;
    z-index: 9999;
}

.follow-banner .close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.follow-banner.sp .close-btn {
    position: absolute;
    top: -15px; /* バナー上部にはみ出し */
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    width: 30px;
    height: 30px;
    font-size: 14px;
    border-radius: 50%;
    z-index: 9999;
}

/* ホバーエフェクト */
.follow-banner.pc:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.follow-banner.sp:hover {
    background: rgba(255, 255, 255, 1);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .follow-banner.pc {
        display: none !important;
    }

    .follow-banner.sp {
        display: block;
    }
}

@media (min-width: 769px) {
    .follow-banner.sp {
        display: none !important;
    }

    .follow-banner.pc {
        display: block;
    }
}

/* より小さなPC画面での調整 */
@media (max-width: 1024px) and (min-width: 769px) {
    .follow-banner.pc {
        width: 216px;
        height: 300px; /* 1500/1080 * 216 = 300 */
        bottom: 15px;
        left: 15px;
    }
}

/* スマホ横画面での調整 */
@media (max-width: 768px) and (orientation: landscape) {
    .follow-banner.sp {
        bottom: 60px; /* 横画面時のフッター調整 */
    }

    .follow-banner.sp .close-btn {
        width: 25px;
        height: 25px;
        font-size: 12px;
        top: -12px;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.follow-banner.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.follow-banner.fade-out {
    animation: fadeOut 0.3s ease-in forwards;
}