/* ========================================
   浮動アクションボタン（レスポンシブ専用）
   ======================================== */

/* 浮動ボタンコンテナ */
.floating-action-buttons {
    display: none;
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 998;
    flex-direction: column;
    gap: 12px;
}

/* 個別の浮動ボタン */
.fab-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: visible;
}

.fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.fab-button:active {
    transform: scale(0.95);
}

/* 予約ボタン（ゴールド） */
.fab-reserve {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #C9A052 100%);
    color: var(--white);
}

.fab-reserve:hover {
    background: linear-gradient(135deg, #C9A052 0%, var(--accent-gold) 100%);
}

/* 診療内容ボタン（ネイビー） */
.fab-treatment {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #1a4d7a 100%);
    color: var(--white);
}

.fab-treatment:hover {
    background: linear-gradient(135deg, #1a4d7a 0%, var(--primary-navy) 100%);
}

/* アイコン */
.fab-button i {
    font-size: 1.5rem;
}

/* ツールチップ（ホバー時に左から表示） */
.fab-button::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 68px;
    background: rgba(10, 37, 64, 0.95);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ツールチップの三角形 */
.fab-button::after {
    content: '';
    position: absolute;
    right: 60px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent rgba(10, 37, 64, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.fab-button:hover::before,
.fab-button:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* レスポンシブ表示（768px以下で表示） */
@media (max-width: 768px) {
    .floating-action-buttons {
        display: flex;
    }
    
    /* ヒーローセクションのボタンを非表示 */
    .hero-buttons {
        display: none !important;
    }
}

/* 小型スマホ対応 */
@media (max-width: 480px) {
    .floating-action-buttons {
        right: 12px;
    }
    
    .fab-button {
        width: 52px;
        height: 52px;
    }
    
    .fab-button i {
        font-size: 1.3rem;
    }
    
    /* ツールチップを小さく */
    .fab-button::before {
        font-size: 0.75rem;
        padding: 6px 12px;
        right: 64px;
    }
    
    .fab-button::after {
        right: 56px;
    }
}

/* 極小デバイス対応 */
@media (max-width: 360px) {
    .fab-button {
        width: 48px;
        height: 48px;
    }
    
    .fab-button i {
        font-size: 1.2rem;
    }
}

/* スクロール時のアニメーション */
@keyframes fabFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.floating-action-buttons {
    animation: fabFadeIn 0.4s ease-out;
}

/* モバイルCTAとの干渉を避ける調整 */
@media (max-width: 968px) {
    .floating-action-buttons {
        /* モバイルCTAバー（高さ約80px）の上に配置 */
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        /* モバイルCTAが表示されている時は少し上に */
        margin-bottom: 40px;
    }
}

/* タブレット横向き対応 */
@media (min-width: 769px) and (max-width: 968px) and (orientation: landscape) {
    .floating-action-buttons {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }
}
